Merge pull request #10306 from filecoin-project/steb/error-cleanup

fix: eth: cleanup error cases
This commit is contained in:
Aayush Rajasekaran 2023-02-17 15:22:07 -05:00 committed by GitHub
commit e3e78f1dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -926,7 +926,7 @@ func (a *EthModule) EthEstimateGas(ctx context.Context, tx ethtypes.EthCall) (et
expectedGas, err := ethGasSearch(ctx, a.Chain, a.Stmgr, a.Mpool, gassedMsg, ts)
if err != nil {
log.Errorw("expected gas", "err", err)
return 0, xerrors.Errorf("gas search failed: %w", err)
}
return ethtypes.EthUint64(expectedGas), nil
@ -2188,11 +2188,13 @@ func (m *EthTxHashManager) ProcessSignedMessage(ctx context.Context, msg *types.
ethTx, err := newEthTxFromSignedMessage(ctx, msg, m.StateAPI)
if err != nil {
log.Errorf("error converting filecoin message to eth tx: %s", err)
return
}
err = m.TransactionHashLookup.UpsertHash(ethTx.Hash, msg.Cid())
if err != nil {
log.Errorf("error inserting tx mapping to db: %s", err)
return
}
}