Skip to content

Commit

Permalink
add nerpa buildtype
Browse files Browse the repository at this point in the history
  • Loading branch information
ta0li committed Apr 2, 2021
1 parent 1053218 commit 3940407
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build/params_nerpanet.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ func init() {
//miner.WPoStChallengeLookback = abi.ChainEpoch(2)

Devnet = false

BuildType = BuildNerpanet
}

const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
Expand Down
7 changes: 5 additions & 2 deletions build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
Build2k = 0x2
BuildDebug = 0x3
BuildCalibnet = 0x4
BuildNerpanet = 0x5
)

func buildType() string {
Expand All @@ -29,6 +30,8 @@ func buildType() string {
return "+debug"
case BuildCalibnet:
return "+calibnet"
case BuildNerpanet:
return "+nerpanet"
default:
return "+huh?"
}
Expand Down Expand Up @@ -86,8 +89,8 @@ func VersionForType(nodeType NodeType) (Version, error) {

// semver versions of the rpc api exposed
var (
FullAPIVersion = newVer(1, 1, 0)
MinerAPIVersion = newVer(1, 0, 1)
FullAPIVersion = newVer(1, 1, 0)
MinerAPIVersion = newVer(1, 0, 1)
)

//nolint:varcheck,deadcode
Expand Down
2 changes: 1 addition & 1 deletion miner/multiminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func NewMiner(api api.FullNode, verifier ffiwrapper.Verifier, minerManager miner
}

switch build.BuildType {
case build.BuildCalibnet, build.BuildMainnet: // The time to wait for the latest block is counted in
case build.BuildCalibnet, build.BuildMainnet, build.BuildNerpanet: // The time to wait for the latest block is counted in
miner.mineTimeout = time.Duration(build.BlockDelaySecs-build.PropagationDelaySecs*2) * time.Second
default:
miner.mineTimeout = time.Millisecond * 2800 // 0.2S is used to select messages and generate blocks
Expand Down

0 comments on commit 3940407

Please sign in to comment.