simply merkle root calc
This commit is contained in:
parent
584f814465
commit
ca42d3ed4f
|
@ -59,11 +59,12 @@ impl StateWitness {
|
||||||
pub fn commit(&self) -> StateCommitment {
|
pub fn commit(&self) -> StateCommitment {
|
||||||
let io_root = cl::merkle::node(self.events_root(), self.included_txs_root());
|
let io_root = cl::merkle::node(self.events_root(), self.included_txs_root());
|
||||||
|
|
||||||
let balances_root = self.balances_root();
|
let root = cl::merkle::root([
|
||||||
let zone_id = self.zone_metadata.id();
|
self.events_root(),
|
||||||
let state_root = cl::merkle::node(zone_id, balances_root);
|
self.included_txs_root(),
|
||||||
|
zone_id,
|
||||||
let root = cl::merkle::node(io_root, state_root);
|
balances_root,
|
||||||
|
]);
|
||||||
|
|
||||||
StateCommitment(root)
|
StateCommitment(root)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue