Add sync optimizations: assumevalid, parallel script verify, IBD skip

- assumevalid flag to skip script verification for known-good blocks
- CCheckQueue thread pool for parallel signature/script validation
- Deferred wallet scan until after IBD completes
- Guard UPnP usage for builds without miniupnpc
- Fix LogPrintf -> printf in clearwallettransactions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 02:01:30 -07:00
parent f3d5c677a0
commit 6fc31fec60
8 changed files with 371 additions and 39 deletions
+3 -1
View File
@@ -347,8 +347,10 @@ bool CheckStake(CBlock* pblock, CWallet& wallet)
if(!pblock->IsProofOfStake())
return error("CheckStake() : %s is not a proof-of-stake block", hash.GetHex().c_str());
if (pblock->vtx.size() < 2)
return error("CheckStake() : block has no coinstake transaction");
// verify hash target and signature of coinstake tx
//bool fIsInitialDownload = IsInitialBlockDownload();
if (!CheckProofOfStake(pblock->vtx[1], pblock->nBits, proofHash, hashTarget))
return error("CheckStake() : proof-of-stake checking failed");