From 16372caf5380be14b761bf095bb6bdabbe7a79d8 Mon Sep 17 00:00:00 2001 From: millken Date: Tue, 20 Feb 2024 15:38:15 +0800 Subject: [PATCH 1/2] update tests --- action/rlp_tx_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/action/rlp_tx_test.go b/action/rlp_tx_test.go index ca6bf9a5fe..811767e778 100644 --- a/action/rlp_tx_test.go +++ b/action/rlp_tx_test.go @@ -399,6 +399,24 @@ var ( } ) +func TestIssue4104(t *testing.T) { + require := require.New(t) + singer, err := NewEthSigner(iotextypes.Encoding_ETHEREUM_ACCESSLIST, 1) + require.ErrorIs(err, ErrInvalidAct) + require.Nil(singer) + + tx := types.NewTx(&types.DynamicFeeTx{ + To: nil, + Nonce: 4, + Value: big.NewInt(4), + Gas: 4, + GasTipCap: big.NewInt(44), + GasFeeCap: big.NewInt(1045), + }) + _, _, _, err = ExtractTypeSigPubkey(tx) + require.ErrorIs(err, ErrNotSupported) +} + func TestEthTxDecodeVerify(t *testing.T) { require := require.New(t) From 1c12c61447529a06f970ed0a14c1d18a716256aa Mon Sep 17 00:00:00 2001 From: millken Date: Mon, 26 Feb 2024 10:23:06 +0800 Subject: [PATCH 2/2] fix comments --- action/rlp_tx_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action/rlp_tx_test.go b/action/rlp_tx_test.go index 811767e778..785c70daac 100644 --- a/action/rlp_tx_test.go +++ b/action/rlp_tx_test.go @@ -399,7 +399,7 @@ var ( } ) -func TestIssue4104(t *testing.T) { +func TestNewEthSignerError(t *testing.T) { require := require.New(t) singer, err := NewEthSigner(iotextypes.Encoding_ETHEREUM_ACCESSLIST, 1) require.ErrorIs(err, ErrInvalidAct)