From 534c68383ab862504941ca4db591eba48fe76961 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Mon, 23 Jan 2023 15:06:04 -0500 Subject: [PATCH] wip --- chain/types/ethtypes/eth_transactions.go | 3 +++ node/impl/full/eth.go | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/chain/types/ethtypes/eth_transactions.go b/chain/types/ethtypes/eth_transactions.go index 0c9bc03a8f9..8ed4c7a0469 100644 --- a/chain/types/ethtypes/eth_transactions.go +++ b/chain/types/ethtypes/eth_transactions.go @@ -103,7 +103,10 @@ func EthTxFromSignedEthMessage(smsg *types.SignedMessage) (EthTx, error) { // - From (not valid) // - To (not valid) func EthTxFromNativeMessage(msg *types.Message) EthTx { + // We don't care if we error here, conversion is best effort for non-eth transactions + addr, _ := EthAddressFromFilecoinAddress(msg.To) return EthTx{ + To: &addr, Nonce: EthUint64(msg.Nonce), ChainID: EthUint64(build.Eip155ChainId), Value: EthBigInt(msg.Value), diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index 2264510c539..5ab1cefebc6 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -1712,11 +1712,6 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, lookup *api.MsgLook effectiveGasPrice := big.Div(replay.GasCost.TotalCost, big.NewInt(lookup.Receipt.GasUsed)) receipt.EffectiveGasPrice = ethtypes.EthBigInt(effectiveGasPrice) - // V.Int will be nil for non-eth transactions, so we want return here and skip eth-specific stuff - if tx.V.Int == nil { - return receipt, nil - } - if receipt.To == nil && lookup.Receipt.ExitCode.IsSuccess() { // Create and Create2 return the same things. var ret eam.CreateExternalReturn