From af4c2cda175cb73be1a40f9c86880059b0f5abe1 Mon Sep 17 00:00:00 2001 From: Aarsh Shah Date: Wed, 1 May 2024 13:57:44 +0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Rod Vagg --- chain/types/ethtypes/eth_1559_transactions.go | 2 +- chain/types/ethtypes/eth_transactions.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chain/types/ethtypes/eth_1559_transactions.go b/chain/types/ethtypes/eth_1559_transactions.go index 22982bc1d54..8720dc5e72f 100644 --- a/chain/types/ethtypes/eth_1559_transactions.go +++ b/chain/types/ethtypes/eth_1559_transactions.go @@ -262,7 +262,7 @@ func (tx *Eth1559TxArgs) packTxFields() ([]interface{}, error) { func parseEip1559Tx(data []byte) (*Eth1559TxArgs, error) { if data[0] != Eip1559TxType { - return nil, xerrors.Errorf("not an EIP-1559 transaction: first byte is not 2") + return nil, xerrors.Errorf(fmt.Sprintf("not an EIP-1559 transaction: first byte is not %d", Eip1559TxType)) } d, err := DecodeRLP(data[1:]) diff --git a/chain/types/ethtypes/eth_transactions.go b/chain/types/ethtypes/eth_transactions.go index 82f6e482566..39f8e4b7892 100644 --- a/chain/types/ethtypes/eth_transactions.go +++ b/chain/types/ethtypes/eth_transactions.go @@ -22,10 +22,10 @@ import ( const ( // LegacyHomesteadEthTxSignaturePrefix defines the prefix byte used to identify the signature of a legacy Homestead Ethereum transaction. LegacyHomesteadEthTxSignaturePrefix = 0x01 - Eip1559TxType = 0x2 + Eip1559TxType = 0x02 - ethLegacyHomesteadTxType = 0x0 - ethLegacyHomesteadTxChainID = 0x0 + ethLegacyHomesteadTxType = 0x00 + ethLegacyHomesteadTxChainID = 0x00 ) // EthTransaction defines the interface for Ethereum-like transactions.