Commit a6a6887
committed
fix(testnet4): do not compute difficulty adjustment
Raised by: bitcoindevkit/bdk-cli#197
Users of `Testnet4` will run into problems when loading headers from the
database, as the network allows for minimum difficulty blocks. Instead
of adding logic for the header timestamps just for the sake of
`Testnet4`, I am opting to simply ignore the difficutly adjustment. This
boolean does not evaluate to `true` on `Bitcoin`, which is easily
verified in `rust-bitcoin`.
Notably `Signet` does not allow minimum difficulty blocks, so difficulty
adjustment logic is still tested by a testnet as well as mainnet. This
is only dropping `Testnet4`1 parent 813a262 commit a6a6887
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
| |||
0 commit comments