mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Add lll to linter checks
Updated: batchbuilder common coordinator db/statedb eth log node priceupdater prover synchronizer test/* txprocessor txselector Pending (once https://github.com/hermeznetwork/hermez-node/tree/feature/serveapicli is merged to master): Update golangci-lint version to v1.37.1 api apitypes cli config db/historydb db/l2db
This commit is contained in:
@@ -181,7 +181,8 @@ Transfer(1) H-O: 5 (1)
|
||||
Transfer(1) I-H: 5 (1)
|
||||
Exit(1) A: 5 (1)
|
||||
|
||||
// create CoordinatorTx CreateAccount for D, TokenId 2, used at SetPool0 for 'PoolTransfer(2) B-D: 3 (1)'
|
||||
// create CoordinatorTx CreateAccount for D, TokenId 2, used at SetPool0 for
|
||||
// 'PoolTransfer(2) B-D: 3 (1)'
|
||||
CreateAccountCoordinator(2) D
|
||||
|
||||
> batchL1
|
||||
|
||||
@@ -25,8 +25,14 @@ import (
|
||||
func GenerateJsUsers(t *testing.T) []til.User {
|
||||
// same values than in the js test
|
||||
// skJsHex is equivalent to the 0000...000i js private key in commonjs
|
||||
skJsHex := []string{"7eb258e61862aae75c6c1d1f7efae5006ffc9e4d5596a6ff95f3df4ea209ea7f", "c005700f76f4b4cec710805c21595688648524df0a9d467afae537b7a7118819", "b373d14c67fb2a517bf4ac831c93341eec8e1b38dbc14e7d725b292a7cf84707", "2064b68d04a7aaae0ac3b36bf6f1850b380f1423be94a506c531940bd4a48b76"}
|
||||
addrHex := []string{"0x7e5f4552091a69125d5dfcb7b8c2659029395bdf", "0x2b5ad5c4795c026514f8317c7a215e218dccd6cf", "0x6813eb9362372eef6200f3b1dbc3f819671cba69", "0x1eff47bc3a10a45d4b230b5d10e37751fe6aa718"}
|
||||
skJsHex := []string{"7eb258e61862aae75c6c1d1f7efae5006ffc9e4d5596a6ff95f3df4ea209ea7f",
|
||||
"c005700f76f4b4cec710805c21595688648524df0a9d467afae537b7a7118819",
|
||||
"b373d14c67fb2a517bf4ac831c93341eec8e1b38dbc14e7d725b292a7cf84707",
|
||||
"2064b68d04a7aaae0ac3b36bf6f1850b380f1423be94a506c531940bd4a48b76"}
|
||||
addrHex := []string{"0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
|
||||
"0x2b5ad5c4795c026514f8317c7a215e218dccd6cf",
|
||||
"0x6813eb9362372eef6200f3b1dbc3f819671cba69",
|
||||
"0x1eff47bc3a10a45d4b230b5d10e37751fe6aa718"}
|
||||
var users []til.User
|
||||
for i := 0; i < len(skJsHex); i++ {
|
||||
skJs, err := hex.DecodeString(skJsHex[i])
|
||||
@@ -41,10 +47,14 @@ func GenerateJsUsers(t *testing.T) []til.User {
|
||||
}
|
||||
users = append(users, user)
|
||||
}
|
||||
assert.Equal(t, "d746824f7d0ac5044a573f51b278acb56d823bec39551d1d7bf7378b68a1b021", users[0].BJJ.Public().String())
|
||||
assert.Equal(t, "4d05c307400c65795f02db96b1b81c60386fd53e947d9d3f749f3d99b1853909", users[1].BJJ.Public().String())
|
||||
assert.Equal(t, "38ffa002724562eb2a952a2503e206248962406cf16392ff32759b6f2a41fe11", users[2].BJJ.Public().String())
|
||||
assert.Equal(t, "c719e6401190be7fa7fbfcd3448fe2755233c01575341a3b09edadf5454f760b", users[3].BJJ.Public().String())
|
||||
assert.Equal(t, "d746824f7d0ac5044a573f51b278acb56d823bec39551d1d7bf7378b68a1b021",
|
||||
users[0].BJJ.Public().String())
|
||||
assert.Equal(t, "4d05c307400c65795f02db96b1b81c60386fd53e947d9d3f749f3d99b1853909",
|
||||
users[1].BJJ.Public().String())
|
||||
assert.Equal(t, "38ffa002724562eb2a952a2503e206248962406cf16392ff32759b6f2a41fe11",
|
||||
users[2].BJJ.Public().String())
|
||||
assert.Equal(t, "c719e6401190be7fa7fbfcd3448fe2755233c01575341a3b09edadf5454f760b",
|
||||
users[3].BJJ.Public().String())
|
||||
|
||||
return users
|
||||
}
|
||||
@@ -58,7 +68,9 @@ func signL2Tx(t *testing.T, chainID uint16, user til.User, l2Tx common.PoolL2Tx)
|
||||
}
|
||||
|
||||
// GenerateTxsZKInputsHash0 generates the transactions for the TestZKInputsHash0
|
||||
func GenerateTxsZKInputsHash0(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
func GenerateTxsZKInputsHash0(t *testing.T, chainID uint16) (users []til.User,
|
||||
coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx,
|
||||
l2Txs []common.PoolL2Tx) {
|
||||
// same values than in the js test
|
||||
users = GenerateJsUsers(t)
|
||||
|
||||
@@ -93,7 +105,9 @@ func GenerateTxsZKInputsHash0(t *testing.T, chainID uint16) (users []til.User, c
|
||||
}
|
||||
|
||||
// GenerateTxsZKInputsHash1 generates the transactions for the TestZKInputsHash1
|
||||
func GenerateTxsZKInputsHash1(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
func GenerateTxsZKInputsHash1(t *testing.T, chainID uint16) (users []til.User,
|
||||
coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx,
|
||||
l2Txs []common.PoolL2Tx) {
|
||||
// same values than in the js test
|
||||
users = GenerateJsUsers(t)
|
||||
l1UserTxs = []common.L1Tx{
|
||||
@@ -138,7 +152,9 @@ func GenerateTxsZKInputsHash1(t *testing.T, chainID uint16) (users []til.User, c
|
||||
}
|
||||
|
||||
// GenerateTxsZKInputs0 generates the transactions for the TestZKInputs0
|
||||
func GenerateTxsZKInputs0(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
func GenerateTxsZKInputs0(t *testing.T, chainID uint16) (users []til.User,
|
||||
coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx,
|
||||
l2Txs []common.PoolL2Tx) {
|
||||
// same values than in the js test
|
||||
users = GenerateJsUsers(t)
|
||||
|
||||
@@ -175,7 +191,8 @@ func GenerateTxsZKInputs0(t *testing.T, chainID uint16) (users []til.User, coord
|
||||
}
|
||||
|
||||
// GenerateTxsZKInputs1 generates the transactions for the TestZKInputs1
|
||||
func GenerateTxsZKInputs1(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
func GenerateTxsZKInputs1(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx,
|
||||
l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
// same values than in the js test
|
||||
users = GenerateJsUsers(t)
|
||||
|
||||
@@ -222,7 +239,8 @@ func GenerateTxsZKInputs1(t *testing.T, chainID uint16) (users []til.User, coord
|
||||
}
|
||||
|
||||
// GenerateTxsZKInputs2 generates the transactions for the TestZKInputs2
|
||||
func GenerateTxsZKInputs2(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
func GenerateTxsZKInputs2(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx,
|
||||
l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
// same values than in the js test
|
||||
users = GenerateJsUsers(t)
|
||||
|
||||
@@ -301,7 +319,8 @@ func GenerateTxsZKInputs2(t *testing.T, chainID uint16) (users []til.User, coord
|
||||
}
|
||||
|
||||
// GenerateTxsZKInputs3 generates the transactions for the TestZKInputs3
|
||||
func GenerateTxsZKInputs3(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
func GenerateTxsZKInputs3(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx,
|
||||
l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
// same values than in the js test
|
||||
users = GenerateJsUsers(t)
|
||||
|
||||
@@ -380,7 +399,8 @@ func GenerateTxsZKInputs3(t *testing.T, chainID uint16) (users []til.User, coord
|
||||
}
|
||||
|
||||
// GenerateTxsZKInputs4 generates the transactions for the TestZKInputs4
|
||||
func GenerateTxsZKInputs4(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
func GenerateTxsZKInputs4(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx,
|
||||
l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
// same values than in the js test
|
||||
users = GenerateJsUsers(t)
|
||||
|
||||
@@ -469,7 +489,8 @@ func GenerateTxsZKInputs4(t *testing.T, chainID uint16) (users []til.User, coord
|
||||
}
|
||||
|
||||
// GenerateTxsZKInputs5 generates the transactions for the TestZKInputs5
|
||||
func GenerateTxsZKInputs5(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx, l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
func GenerateTxsZKInputs5(t *testing.T, chainID uint16) (users []til.User, coordIdxs []common.Idx,
|
||||
l1UserTxs []common.L1Tx, l1CoordTxs []common.L1Tx, l2Txs []common.PoolL2Tx) {
|
||||
// same values than in the js test
|
||||
users = GenerateJsUsers(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user