mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +01:00
Update TxID to avoid collisions on DB (fix #503)
This commit is contained in:
@@ -282,7 +282,7 @@ func GenL2Txs(
|
||||
amount := big.NewInt(int64(i + 1))
|
||||
fee := common.FeeSelector(i % 256) //nolint:gomnd
|
||||
tx := common.L2Tx{
|
||||
TxID: common.TxID([12]byte{2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, byte(i)}), // only for testing purposes
|
||||
TxID: common.TxID([common.TxIDLen]byte{2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, byte(i)}), // only for testing purposes
|
||||
BatchNum: batches[i%len(batches)].BatchNum,
|
||||
Position: i - fromIdx,
|
||||
Amount: amount,
|
||||
|
||||
@@ -370,7 +370,6 @@ func (tc *Context) generateBlocks() ([]common.BlockData, error) {
|
||||
}
|
||||
tc.currBatch.L1Batch = true
|
||||
if err := tc.setIdxs(); err != nil {
|
||||
log.Error(err)
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
toForgeL1TxsNum := int64(tc.openToForge)
|
||||
|
||||
Reference in New Issue
Block a user