feat(testenv): add genesis_hash
method
This gets the genesis hash of the env blockchain.
This commit is contained in:
parent
886d72e3d5
commit
494d253493
@ -250,6 +250,12 @@ impl TestEnv {
|
|||||||
}))
|
}))
|
||||||
.expect("must craft tip")
|
.expect("must craft tip")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get the genesis hash of the blockchain.
|
||||||
|
pub fn genesis_hash(&self) -> anyhow::Result<BlockHash> {
|
||||||
|
let hash = self.bitcoind.client.get_block_hash(0)?;
|
||||||
|
Ok(hash)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user