mirror of
https://github.com/filecoin-project/lotus.git
synced 2025-08-06 16:41:19 +08:00
ETH RPC: receipts: use correct txtype in receipts (#12332)
* fix bug in receipt for txtype for legacy txns * update ChangeLog * Update CHANGELOG.md Co-authored-by: Rod Vagg <rod@vagg.org> --------- Co-authored-by: Rod Vagg <rod@vagg.org>
This commit is contained in:
@ -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
|
||||
|
||||
## New features
|
||||
|
||||
|
@ -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)
|
||||
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user