Commit fd11df9
committed
Genesis bootstrap: use max_target when sharechain is empty
When share_bits==0 (empty chain), miners couldn't create shares because
the bits guard blocked share creation and VARDIFF had no floor reference.
Fix: fall back to m_share_max_bits (or hardcoded 0x1e0fffff for LTC
testnet) when share_bits is zero. This matches p2pool's behavior of
setting desired_share_target = 2**256-1 when chain is empty, allowing
miners to create genesis shares immediately.
Also applies max_target as VARDIFF floor during bootstrap — prevents
miners from working at uselessly low difficulty when no share target
reference exists.1 parent 3a4d0a4 commit fd11df9
2 files changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4442 | 4442 | | |
4443 | 4443 | | |
4444 | 4444 | | |
| 4445 | + | |
| 4446 | + | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
4445 | 4453 | | |
4446 | 4454 | | |
4447 | 4455 | | |
| |||
0 commit comments