Skip to content

Commit

Permalink
chaincfg: fix deployment bit numbers
Browse files Browse the repository at this point in the history
On signet all previous soft forks and also taproot are always activated,
meaning the version is always 0x20000000 for all blocks. To make sure
they activate properly in `btcd` we therefore need to use the correct
bit to mask the version.
This means that on any custom signet there would need to be 2016 blocks
mined before SegWit or Taproot can be used.
  • Loading branch information
guggero authored and jcvernaleo committed May 11, 2021
1 parent 0ec4bdc commit 7b6c2b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chaincfg/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,17 +670,17 @@ func CustomSignetParams(challenge []byte, dnsSeeds []DNSSeed) Params {
ExpireTime: 1230767999, // December 31, 2008 UTC
},
DeploymentCSV: {
BitNumber: 0,
BitNumber: 29,
StartTime: 0, // Always available for vote
ExpireTime: math.MaxInt64, // Never expires
},
DeploymentSegwit: {
BitNumber: 1,
BitNumber: 29,
StartTime: 0, // Always available for vote
ExpireTime: math.MaxInt64, // Never expires.
},
DeploymentTaproot: {
BitNumber: 2,
BitNumber: 29,
StartTime: 0, // Always available for vote
ExpireTime: math.MaxInt64, // Never expires.
},
Expand Down

0 comments on commit 7b6c2b3

Please sign in to comment.