Fix nil big int
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
a5334eb2b3
commit
71ce8845d5
@ -101,7 +101,8 @@ func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message) (*t
|
|||||||
}
|
}
|
||||||
msg.GasLimit = int64(float64(gasLimit) * GasMargin)
|
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{})
|
gasPrice, err := a.GasEstimateGasPrice(ctx, 2, msg.From, msg.GasLimit, types.TipSetKey{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Errorf("estimating gas price: %w", err)
|
return nil, xerrors.Errorf("estimating gas price: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user