mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Merge pull request #359 from hermeznetwork/feature/integration25
Extend Coordinator tests
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user