mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
validator: properly initialize and verify genesis block monotree
This commit is contained in:
@@ -18,7 +18,7 @@ darkfi = {path = "../../../", features = ["bs58", "validator"]}
|
||||
darkfi_money_contract = {path = "../../../src/contract/money", features = ["no-entrypoint", "client"]}
|
||||
darkfi-contract-test-harness = {path = "../../../src/contract/test-harness"}
|
||||
darkfi-sdk = {path = "../../../src/sdk"}
|
||||
darkfi-serial = "0.5.0"
|
||||
darkfi-serial = "0.5.1"
|
||||
|
||||
# Misc
|
||||
bs58 = "0.5.1"
|
||||
|
||||
@@ -170,7 +170,8 @@ fn main() -> Result<()> {
|
||||
genesis_block.header.transactions_root = tree.root(0).unwrap();
|
||||
|
||||
// Grab the updated contracts states root
|
||||
let state_monotree = overlay.lock().unwrap().get_state_monotree()?;
|
||||
let mut state_monotree = overlay.lock().unwrap().get_state_monotree()?;
|
||||
overlay.lock().unwrap().contracts.update_state_monotree(&mut state_monotree)?;
|
||||
let Some(state_root) = state_monotree.get_headroot()? else {
|
||||
return Err(Error::ContractsStatesRootNotFoundError);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user