mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Update TxSelector to return CoordIdxs used & other
- StateDB - Update GetIdxByEthAddrBJJ to return ErrToIdxNotFound when idx not found, so can be checked at upper levels - TxSelector - rm CoordIdxsDB that is no longer needed (also related methods) - add `getCoordIdx` method to get the Coordinator Idx for a given TokenID - Update coordinator account creation related to new TokenIDs from L2Txs - Reorganize GetL1L2TxSelection - return CoordIdxs used in the selection - Update go-merkletree version which avoids marshaling Siblings to json with 'null' value in case of empty array
This commit is contained in:
@@ -123,7 +123,7 @@ func (kvdb *KVDB) reset(batchNum common.BatchNum, closeCurrent bool) error {
|
||||
}
|
||||
kvdb.db = sto
|
||||
kvdb.CurrentIdx = 255
|
||||
kvdb.CurrentBatch = batchNum
|
||||
kvdb.CurrentBatch = 0
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -210,6 +210,11 @@ func (kvdb *KVDB) ResetFromSynchronizer(batchNum common.BatchNum, synchronizerKV
|
||||
if err != nil {
|
||||
return tracerr.Wrap(err)
|
||||
}
|
||||
// get currentIdx
|
||||
kvdb.CurrentIdx, err = kvdb.GetCurrentIdx()
|
||||
if err != nil {
|
||||
return tracerr.Wrap(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user