Extend Coordinator tests

This commit is contained in:
Eduard S
2020-12-16 13:03:25 +01:00
parent 8e1bfd150d
commit 6a9b5ce420
12 changed files with 325 additions and 89 deletions

View File

@@ -486,7 +486,8 @@ func updateAccountInTreeDB(sto db.Storage, mt *merkletree.MerkleTree, idx common
}
if mt != nil {
return mt.Update(idx.BigInt(), v)
proof, err := mt.Update(idx.BigInt(), v)
return proof, tracerr.Wrap(err)
}
return nil, nil
}
@@ -504,6 +505,11 @@ func (s *StateDB) MTGetRoot() *big.Int {
return s.mt.Root().BigInt()
}
// MerkleTree returns the underlying StateDB merkle tree. It can be nil.
func (s *StateDB) MerkleTree() *merkletree.MerkleTree {
return s.mt
}
// LocalStateDB represents the local StateDB which allows to make copies from
// the synchronizer StateDB, and is used by the tx-selector and the
// batch-builder. LocalStateDB is an in-memory storage.