From 90fced7cb2c4219063e0ec958519d8c71d5d1d04 Mon Sep 17 00:00:00 2001 From: Maciej Witowski Date: Wed, 1 Feb 2023 17:27:50 +0100 Subject: [PATCH] Test: assert all fields returned from EthGetTransactionByHash have expected values Related to https://github.com/filecoin-project/lotus/pull/10151#discussion_r1092358973 --- itests/eth_transactions_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/itests/eth_transactions_test.go b/itests/eth_transactions_test.go index 6ba63608a..357f411c9 100644 --- a/itests/eth_transactions_test.go +++ b/itests/eth_transactions_test.go @@ -87,7 +87,19 @@ func TestValueTransferValidSignature(t *testing.T) { ethTx, err := client.EthGetTransactionByHash(ctx, &hash) require.Nil(t, err) require.EqualValues(t, ethAddr, ethTx.From) - + require.EqualValues(t, ethAddr2, *ethTx.To) + require.EqualValues(t, tx.ChainID, ethTx.ChainID) + require.EqualValues(t, tx.Nonce, ethTx.Nonce) + require.EqualValues(t, hash, ethTx.Hash) + require.EqualValues(t, tx.Value, ethTx.Value) + require.EqualValues(t, 2, ethTx.Type) + require.EqualValues(t, ethtypes.EthBytes{}, ethTx.Input) + require.EqualValues(t, tx.GasLimit, ethTx.Gas) + require.EqualValues(t, tx.MaxFeePerGas, ethTx.MaxFeePerGas) + require.EqualValues(t, tx.MaxPriorityFeePerGas, ethTx.MaxPriorityFeePerGas) + require.EqualValues(t, tx.V, ethTx.V) + require.EqualValues(t, tx.R, ethTx.R) + require.EqualValues(t, tx.S, ethTx.S) } func TestLegacyTransaction(t *testing.T) {