mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Add idx for txs that creat account, step1
This commit is contained in:
@@ -143,9 +143,14 @@ func genTestTxs(
|
||||
bn := common.BatchNum(*tx.L1Info.ToForgeL1TxsNum + 2)
|
||||
tx.BatchNum = &bn
|
||||
}
|
||||
// If FromIdx is not nil
|
||||
idxStr := idxToHez(l1.FromIdx, token.Symbol)
|
||||
tx.FromIdx = &idxStr
|
||||
// TODO: User L1 txs that create txs will have fromAccountIndex equal to the idx of the
|
||||
// created account. Once this is done this test will be broken and will need to be updated here.
|
||||
// At the moment they are null
|
||||
if l1.Type != common.TxTypeCreateAccountDeposit &&
|
||||
l1.Type != common.TxTypeCreateAccountDepositTransfer {
|
||||
idxStr := idxToHez(l1.FromIdx, token.Symbol)
|
||||
tx.FromIdx = &idxStr
|
||||
}
|
||||
// If tx has a normal ToIdx (>255), set FromEthAddr and FromBJJ
|
||||
if l1.ToIdx >= common.UserThreshold {
|
||||
// find account
|
||||
|
||||
Reference in New Issue
Block a user