Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoff Stuart committed Jan 23, 2023
1 parent 5b3e4ee commit 534c683
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions chain/types/ethtypes/eth_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 0 additions & 5 deletions node/impl/full/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 534c683

Please sign in to comment.