Update TxID to use eth Keccak256

- Update TxID to use eth Keccak256
- Added more tests to L2Tx TxID calculation to check compatibility with
js version from https://github.com/hermeznetwork/hermezjs/pull/57
This commit is contained in:
arnaucube
2021-02-01 15:24:57 +01:00
parent f0886b3d2a
commit c1cd37913f
8 changed files with 111 additions and 45 deletions

View File

@@ -21,7 +21,7 @@ func TestNewPoolL2Tx(t *testing.T) {
}
poolL2Tx, err := NewPoolL2Tx(poolL2Tx)
assert.NoError(t, err)
assert.Equal(t, "0x024f67ec893467419cdfacfc9152e55dc7ce16088952bf2b3442732fd046bd031c", poolL2Tx.TxID.String())
assert.Equal(t, "0x02fb52b5d0b9ef2626c11701bb751b2720c76d59946b9a48146ac153bb6e63bf6a", poolL2Tx.TxID.String())
}
func TestTxCompressedData(t *testing.T) {