Merge pull request #359 from hermeznetwork/feature/integration25

Extend Coordinator tests
This commit is contained in:
arnau
2020-12-16 18:07:44 +01:00
committed by GitHub
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.