mirror of
https://github.com/filecoin-project/lotus.git
synced 2025-08-26 02:38:58 +08:00
feat: api: Clean API for Miners (#12112)
* proofparams alternate * createminer * const factored from /build and types updated to use it * buildconstants for more places * deprecate msg * itest cleanup * alerting interface * house cleaning * rm policy and drand from buildconstants * clean up curio further * aussie waffle * pr fixes * fix lints * little fixes * oops this got updated * unbreak test builds * test fixes * comments - cleanups * itests fix alerting * rm obsolete alertinginterface * spelling oops * changelog * tests need buildconstants port * Fully migrate BlockGasTarget * ulimit should not depend on build * complete the simplest deprecations * bringing back versions
This commit is contained in:

committed by
GitHub

parent
a57dce3136
commit
21abfc69fb
@ -16,7 +16,7 @@ import (
|
||||
"github.com/filecoin-project/go-state-types/big"
|
||||
|
||||
lapi "github.com/filecoin-project/lotus/api"
|
||||
"github.com/filecoin-project/lotus/build"
|
||||
"github.com/filecoin-project/lotus/build/buildconstants"
|
||||
"github.com/filecoin-project/lotus/chain/messagepool"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/node/config"
|
||||
@ -712,7 +712,7 @@ var MpoolGasPerfCmd = &cli.Command{
|
||||
|
||||
baseFee := ts.Blocks()[0].ParentBaseFee
|
||||
|
||||
bigBlockGasLimit := big.NewInt(build.BlockGasLimit)
|
||||
bigBlockGasLimit := big.NewInt(buildconstants.BlockGasLimit)
|
||||
|
||||
getGasReward := func(msg *types.SignedMessage) big.Int {
|
||||
maxPremium := types.BigSub(msg.Message.GasFeeCap, baseFee)
|
||||
@ -723,7 +723,7 @@ var MpoolGasPerfCmd = &cli.Command{
|
||||
}
|
||||
|
||||
getGasPerf := func(gasReward big.Int, gasLimit int64) float64 {
|
||||
// gasPerf = gasReward * build.BlockGasLimit / gasLimit
|
||||
// gasPerf = gasReward * buildconstants.BlockGasLimit / gasLimit
|
||||
a := new(stdbig.Rat).SetInt(new(stdbig.Int).Mul(gasReward.Int, bigBlockGasLimit.Int))
|
||||
b := stdbig.NewRat(1, gasLimit)
|
||||
c := new(stdbig.Rat).Mul(a, b)
|
||||
|
Reference in New Issue
Block a user