From b4ff9ba22060373085f7f1b7e4be3e164f9d29a6 Mon Sep 17 00:00:00 2001 From: vyzo Date: Tue, 4 Aug 2020 22:12:15 +0300 Subject: [PATCH] better minGas sanity check --- chain/messagepool/selection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chain/messagepool/selection.go b/chain/messagepool/selection.go index 751811baa..16131e102 100644 --- a/chain/messagepool/selection.go +++ b/chain/messagepool/selection.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/messagepool/gasguess" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/chain/vm" ) type msgChain struct { @@ -141,7 +142,6 @@ func (mp *MessagePool) createMessageChains(actor address.Address, mset *msgSet, return a } - minGas := guessgas.MinGas a, _ := mp.api.StateGetActor(actor, nil) curNonce := a.Nonce balance := a.Balance @@ -155,6 +155,7 @@ func (mp *MessagePool) createMessageChains(actor address.Address, mset *msgSet, } curNonce++ + minGas := vm.PricelistByEpoch(ts.Height()).OnChainMessage(m.ChainLength()) if m.GasLimit < minGas { break }