mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 19:36:44 +01:00
TxSelector Coord fees & Nonces checks & other
- Add missing Fees to CoordAccounts after processing PoolL2Txs - Add Nonces checks for L2Txs (txs with incorrect nonces not included in the selection) - Add missing MakeCheckpoint() at the LocalAccountsDB once the selection is done - Add TxSelector test of full flow using Til.SetBlockchainMinimumFlow0 checking balances & parameters
This commit is contained in:
@@ -674,6 +674,15 @@ func (tc *Context) generatePoolL2Txs() ([]common.PoolL2Tx, error) {
|
||||
return txs, nil
|
||||
}
|
||||
|
||||
// RestartNonces sets all the Users.Accounts.Nonces to 0
|
||||
func (tc *Context) RestartNonces() {
|
||||
for name, user := range tc.Users {
|
||||
for tokenID := range user.Accounts {
|
||||
tc.Users[name].Accounts[tokenID].Nonce = common.Nonce(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// generateKeys generates BabyJubJub & Address keys for the given list of user
|
||||
// names in a deterministic way. This means, that for the same given
|
||||
// 'userNames' in a certain order, the keys will be always the same.
|
||||
|
||||
Reference in New Issue
Block a user