Rewrites the LWMA difficulty algorithm to match the C++ daemon exactly: - Uses N=60 window with linear weighting (position 1..n) - Clamps solve times to [-6T, 6T] - Excludes genesis block from the difficulty window - Selects target based on hardfork: 120s pre-HF2, 240s post-HF2 On testnet, HF2 activates at height 10 (active from height 11), doubling the target from 120s to 240s. The previous fixed 120s target produced exactly half the expected difficulty from height 11 onward. Integration test verifies all 2576 testnet blocks match the daemon. Co-Authored-By: Charon <charon@lethean.io> |
||
|---|---|---|
| .. | ||
| blocks.go | ||
| blocks_test.go | ||
| client.go | ||
| client_test.go | ||
| info.go | ||
| info_test.go | ||
| integration_test.go | ||
| mining.go | ||
| mining_test.go | ||
| transactions.go | ||
| transactions_test.go | ||
| types.go | ||
| wallet.go | ||
| wallet_test.go | ||