mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 19:36:44 +01:00
Extend ethclient test, implement new TxID spec
- Implement new TxID spec that distinguishes L1UserTx and L1CoordinatorTx - Replace some type []*Foo by []Foo - Fix HistoryDB & L2DB bug: in case of error, a rollback was applied and the returned error was nil - Reorder inserts in historydb.NewHistoryDB() to follow foreign key dependencies - Add initial synchronizer test with test.Client (for now, only tested l1UserTxs, blocks, addToken) - Update L1UserTx event in test.Client
This commit is contained in:
@@ -111,10 +111,10 @@ func (tx *L2Tx) PoolL2Tx() *PoolL2Tx {
|
||||
|
||||
// L2TxsToPoolL2Txs returns an array of []*PoolL2Tx from an array of []*L2Tx,
|
||||
// where the PoolL2Tx only have the parameters of a L2Tx filled.
|
||||
func L2TxsToPoolL2Txs(txs []*L2Tx) []*PoolL2Tx {
|
||||
var r []*PoolL2Tx
|
||||
func L2TxsToPoolL2Txs(txs []*L2Tx) []PoolL2Tx {
|
||||
var r []PoolL2Tx
|
||||
for _, tx := range txs {
|
||||
r = append(r, tx.PoolL2Tx())
|
||||
r = append(r, *tx.PoolL2Tx())
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user