Fix sync-freeze: backpressure, prune protection, eviction direction, bridge-repair + PoS header guard
Sync-freeze patch (original): - Backpressure ceiling HEADER_FRONT_MAX_AHEAD=8000 - PruneHeaders protects live sync window (nProtectFloor) - Hard-cap eviction from highest-height first - Bridge-repair getheaders from connected tip via PathReachesChain Additional fix: - Skip PoW check on PoS headers (nonce=0) in AddHeaderNode Block 1026 is PoS but within the 0-9000 PoW range — old code rejected valid PoS headers and severed the chain at height 1025 Verified: from-zero no-snapshot sync reached block 17k+ past the old 15k freeze zone. 132/132 unit tests pass.
This commit is contained in:
@@ -50,6 +50,7 @@ private:
|
||||
void PruneHeaders();
|
||||
bool AddHeaderNode(const CBlock& header, const uint256& hashHeader);
|
||||
std::vector<uint256> GetDownloadPath(uint256 hashTip) const;
|
||||
bool PathReachesChain(const std::vector<uint256>& vPath) const;
|
||||
void ContinueHeaders(CNode* pfrom, const uint256& hashTip);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user