Fix TxProcessor TokenID use &updates at Til&Common

- Til
  - tests that were using `til.SetBlockchainMinimumFlow0` have been
updated, as now the L1CoordinatorTxs are placed simulating TxSelector
creation (when needed, not before)
  - Add `EthSk` to `tc.User` to allow to sign `AccoutCreationAuths` at
the tests flows
- TxProcessor
  - for L2Txs get TokenID from tx.FromIdx Account.TokenID instead than
  - update tests vectors for new values
from tx.TokenID (which not always is set)
- Common
  - move TxIDsFromL2Txs & TxIDsFromPoolL2Txs from `coordinator` to
`common` to allow usage from other packages
This commit is contained in:
arnaucube
2021-01-02 20:54:08 +01:00
parent 926943cb71
commit 48bdec1397
8 changed files with 57 additions and 43 deletions

View File

@@ -123,6 +123,7 @@ type Account struct {
type User struct {
Name string
BJJ *babyjub.PrivateKey
EthSk *ecdsa.PrivateKey
Addr ethCommon.Address
Accounts map[common.TokenID]*Account
}
@@ -696,6 +697,7 @@ func (tc *Context) generateKeys(userNames []string) {
u := User{
Name: userNames[i-1],
BJJ: &sk,
EthSk: &key,
Addr: addr,
Accounts: make(map[common.TokenID]*Account),
}