Skip to content

Commit

Permalink
mining: Use test net block ver on simnet.
Browse files Browse the repository at this point in the history
This modifies the mining code to produce blocks on the simulation
network with the same block version as other test networks as opposed to
the block version used on the main network.
  • Loading branch information
davecgh committed Jan 11, 2022
1 parent 8525c7d commit 151d21e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/mining/mining.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ const (
generatedBlockVersion = 9

// generatedBlockVersionTest is the version of the block being generated
// for networks other than the main and simulation networks.
// for networks other than the main network.
generatedBlockVersionTest = 10

// blockHeaderOverhead is the max number of bytes it takes to serialize
Expand Down Expand Up @@ -2296,9 +2296,7 @@ nextPriorityQueueItem:

// Choose the block version to generate based on the network.
blockVersion := int32(generatedBlockVersion)
if g.cfg.ChainParams.Net != wire.MainNet &&
g.cfg.ChainParams.Net != wire.SimNet {

if g.cfg.ChainParams.Net != wire.MainNet {
blockVersion = generatedBlockVersionTest
}

Expand Down

0 comments on commit 151d21e

Please sign in to comment.