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:
arnaucube
2021-01-03 17:26:07 +01:00
parent 48bdec1397
commit 135144636a
4 changed files with 470 additions and 185 deletions

View File

@@ -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.