diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index a1a6bec6f9c..129b89c3cd9 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -831,6 +831,11 @@ func (a *EthModule) EthSendRawTransaction(ctx context.Context, rawTx ethtypes.Et return ethtypes.EmptyEthHash, err } + txHash, err := txArgs.TxHash() + if err != nil { + return ethtypes.EmptyEthHash, err + } + smsg, err := ethtypes.ToSignedFilecoinMessage(txArgs) if err != nil { return ethtypes.EmptyEthHash, err @@ -841,6 +846,12 @@ func (a *EthModule) EthSendRawTransaction(ctx context.Context, rawTx ethtypes.Et return ethtypes.EmptyEthHash, err } + // make it immediately available in the transaction hash lookup db, even though it will also + // eventually get there via the mpool + if err := a.EthTxHashManager.TransactionHashLookup.UpsertHash(txHash, smsg.Cid()); err != nil { + log.Errorf("error inserting tx mapping to db: %s", err) + } + return ethtypes.EthHashFromTxBytes(rawTx), nil }