mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
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:
@@ -51,7 +51,7 @@ func TestAccountCreationAuthSignVerify(t *testing.T) {
|
||||
|
||||
func TestKeccak256JSComp(t *testing.T) {
|
||||
// check keccak256 compatible with js version
|
||||
h := ethCrypto.Keccak256Hash([]byte("test")).Bytes()
|
||||
h := ethCrypto.Keccak256([]byte("test"))
|
||||
assert.Equal(t, "9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658",
|
||||
hex.EncodeToString(h))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user