From 342d3e14783f837739455121f8872cc410ed172a Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Mon, 30 Dec 2013 15:12:52 -0200 Subject: [PATCH] just learned that scrypt is too slow for CBlockTreeDB::LoadBlockIndexGuts. disable CheckIndex() like litecoin does. --- src/main.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.h b/src/main.h index 26290efa..9af58618 100644 --- a/src/main.h +++ b/src/main.h @@ -756,7 +756,10 @@ public: bool CheckIndex() const { - return CheckProofOfWork(CBlock(GetBlockHeader()).GetPoWHash(), nBits); + /** Scrypt is used for block proof-of-work, but for purposes of performance the index internally uses sha256. + * This check was considered unneccessary given the other safeguards like the genesis and checkpoints. */ + return true; + //return CheckProofOfWork(CBlock(GetBlockHeader()).GetPoWHash(), nBits); } enum { nMedianTimeSpan=11 };