From 71ce8845d5a9675173a4c33ea54f72a709b4afe1 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Mon, 20 Jul 2020 21:50:03 +0200 Subject: [PATCH] Fix nil big int Signed-off-by: Jakub Sztandera --- node/impl/full/mpool.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/impl/full/mpool.go b/node/impl/full/mpool.go index 50eb0ce00..8bc90666a 100644 --- a/node/impl/full/mpool.go +++ b/node/impl/full/mpool.go @@ -101,7 +101,8 @@ func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message) (*t } msg.GasLimit = int64(float64(gasLimit) * GasMargin) } - if types.BigCmp(msg.GasPrice, types.NewInt(0)) == 0 { + + if msg.GasPrice == types.EmptyInt || types.BigCmp(msg.GasPrice, types.NewInt(0)) == 0 { gasPrice, err := a.GasEstimateGasPrice(ctx, 2, msg.From, msg.GasLimit, types.TipSetKey{}) if err != nil { return nil, xerrors.Errorf("estimating gas price: %w", err)