Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETH RPC: receipts: use correct txtype in receipts #12332

Merged
merged 3 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- https://github.com/filecoin-project/lotus/pull/12295 Upgrade to go-f3 v0.0.6
- https://github.com/filecoin-project/lotus/pull/12292: feat: p2p: allow overriding bootstrap nodes with environmemnt variable
- https://github.com/filecoin-project/lotus/pull/12319: feat: `lotus send CLI`: allow sending to ETH addresses
https://github.com/filecoin-project/lotus/pull/12332: fix: ETH RPC: receipts: use correct txtype in receipts
aarshkshah1992 marked this conversation as resolved.
Show resolved Hide resolved

## New features

Expand Down
2 changes: 2 additions & 0 deletions itests/eth_legacy_transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func TestLegacyValueTransferValidSignature(t *testing.T) {
require.EqualValues(t, ethAddr, receipt.From)
require.EqualValues(t, ethAddr2, *receipt.To)
require.EqualValues(t, hash, receipt.TransactionHash)
require.EqualValues(t, ethtypes.EthLegacyTxType, receipt.Type)

// Success.
require.EqualValues(t, ethtypes.EthUint64(0x1), receipt.Status)
Expand Down Expand Up @@ -227,6 +228,7 @@ func TestLegacyEIP155ValueTransferValidSignature(t *testing.T) {
require.EqualValues(t, ethAddr, receipt.From)
require.EqualValues(t, ethAddr2, *receipt.To)
require.EqualValues(t, hash, receipt.TransactionHash)
require.EqualValues(t, ethtypes.EthLegacyTxType, receipt.Type)

// Success.
require.EqualValues(t, ethtypes.EthUint64(0x1), receipt.Status)
Expand Down
1 change: 1 addition & 0 deletions itests/eth_transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func TestValueTransferValidSignature(t *testing.T) {
require.EqualValues(t, ethAddr, receipt.From)
require.EqualValues(t, ethAddr2, *receipt.To)
require.EqualValues(t, hash, receipt.TransactionHash)
require.EqualValues(t, ethtypes.EIP1559TxType, receipt.Type)

// Success.
require.EqualValues(t, ethtypes.EthUint64(0x1), receipt.Status)
Expand Down
2 changes: 1 addition & 1 deletion node/impl/full/eth_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, lookup *api.MsgLook
TransactionIndex: transactionIndex,
BlockHash: blockHash,
BlockNumber: blockNumber,
Type: ethtypes.EthUint64(2),
Type: tx.Type,
Logs: []ethtypes.EthLog{}, // empty log array is compulsory when no logs, or libraries like ethers.js break
LogsBloom: ethtypes.NewEmptyEthBloom(),
}
Expand Down
Loading