Merge pull request #6148 from filecoin-project/feat/mpool-nv12-clean

mpool: Cleanup pre-nv12 selection logic
This commit is contained in:
Łukasz Magiera 2021-04-30 18:01:02 +02:00 committed by GitHub
commit 5cc94dcdf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,9 +11,7 @@ import (
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
tbig "github.com/filecoin-project/go-state-types/big" tbig "github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/specs-actors/v3/actors/builtin"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/messagepool/gasguess" "github.com/filecoin-project/lotus/chain/messagepool/gasguess"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
@ -700,17 +698,6 @@ func (*MessagePool) getGasPerf(gasReward *big.Int, gasLimit int64) float64 {
return r return r
} }
func isMessageMute(m *types.Message, ts *types.TipSet) bool {
if api.RunningNodeType != api.NodeFull || ts.Height() > build.UpgradeActorsV4Height {
return false
}
if m.To == builtin.StoragePowerActorAddr {
return m.Method == builtin.MethodsPower.CreateMiner
}
return false
}
func (mp *MessagePool) createMessageChains(actor address.Address, mset map[uint64]*types.SignedMessage, baseFee types.BigInt, ts *types.TipSet) []*msgChain { func (mp *MessagePool) createMessageChains(actor address.Address, mset map[uint64]*types.SignedMessage, baseFee types.BigInt, ts *types.TipSet) []*msgChain {
// collect all messages // collect all messages
msgs := make([]*types.SignedMessage, 0, len(mset)) msgs := make([]*types.SignedMessage, 0, len(mset))
@ -772,10 +759,6 @@ func (mp *MessagePool) createMessageChains(actor address.Address, mset map[uint6
break break
} }
if isMessageMute(&m.Message, ts) {
break
}
balance = new(big.Int).Sub(balance, required) balance = new(big.Int).Sub(balance, required)
value := m.Message.Value.Int value := m.Message.Value.Int