trb

trb
Log | Files | Refs

commit 9e5001af551a55646652cf2af3ddb3a26d22b323
parent 4a8b42242c25cabdcf70e9be0a5b278e5ca1769c
Author: Shinoa-Fores <btcinfo@sdf.org>
Date:   Wed, 13 Jan 2021 17:27:46 -0500

asciilifeform_add_verifyall_option.vpatch

Diffstat:
Mbitcoin/src/init.cpp | 2++
Mbitcoin/src/main.cpp | 2+-
Mbitcoin/src/util.cpp | 1+
Mbitcoin/src/util.h | 1+
4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/bitcoin/src/init.cpp b/bitcoin/src/init.cpp @@ -174,6 +174,7 @@ bool AppInit2(int argc, char* argv[]) " -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") + " -debug \t\t " + _("Output extra debugging information\n") + " -caneat \t\t " + _("Permit the use of 'eatblock'\n") + + " -verifyall \t\t " + _("Forbid the skipping of ECDSA signature verification between checkpoints.\n") + " -logtimestamps \t " + _("Prepend debug output with timestamp\n") + " -printtoconsole \t " + _("Send trace/debug info to console instead of debug.log file\n") + " -rpcuser=<user> \t " + _("Username for JSON-RPC connections\n") + @@ -196,6 +197,7 @@ bool AppInit2(int argc, char* argv[]) fDebug = GetBoolArg("-debug"); fDaemon = GetBoolArg("-daemon"); fCanEat = GetBoolArg("-caneat"); + fVerifyAll = GetBoolArg("-verifyall"); if (fDaemon) fServer = true; diff --git a/bitcoin/src/main.cpp b/bitcoin/src/main.cpp @@ -832,7 +832,7 @@ bool CTransaction::ConnectInputs(CTxDB& txdb, map<uint256, CTxIndex>& mapTestPoo // Skip ECDSA signature verification when connecting blocks (fBlock=true) // before the last blockchain checkpoint. This is safe because block merkle hashes are // still computed and checked, and any change will be caught at the next checkpoint. - if (!(fBlock && (nBestHeight < Checkpoints::GetTotalBlocksEstimate()))) + if (fVerifyAll || (!(fBlock && (nBestHeight < Checkpoints::GetTotalBlocksEstimate())))) // Verify signature if (!VerifySignature(txPrev, *this, i)) return DoS(100,error("ConnectInputs() : %s VerifySignature failed", GetHash().ToString().substr(0,10).c_str())); diff --git a/bitcoin/src/util.cpp b/bitcoin/src/util.cpp @@ -21,6 +21,7 @@ bool fDebug = false; bool fPrintToConsole = false; bool fPrintToDebugger = false; bool fCanEat = false; +bool fVerifyAll = false; char pszSetDataDir[MAX_PATH] = ""; bool fRequestShutdown = false; bool fShutdown = false; diff --git a/bitcoin/src/util.h b/bitcoin/src/util.h @@ -111,6 +111,7 @@ extern bool fDebug; extern bool fPrintToConsole; extern bool fPrintToDebugger; extern bool fCanEat; +extern bool fVerifyAll; extern char pszSetDataDir[MAX_PATH]; extern bool fRequestShutdown; extern bool fShutdown;