Browse Source

Add -stopat CLI arg so we can pause a full node and call getsnapshot/gettxoutsetinfo at a certain block height

stopat
Jonathan "Duke" Leto 5 years ago
parent
commit
8b9311e637
  1. 8
      src/main.cpp

8
src/main.cpp

@ -213,7 +213,7 @@ namespace {
} // anon namespace } // anon namespace
char ASSETCHAINS_SYMBOL[65] = { "HUSH" }; char ASSETCHAINS_SYMBOL[65] = { "HUSH" };
uint32_t HUSH_STOPAT = GetArg("-stopat",0); uint32_t HUSH_STOPAT = 0;
#include "komodo_validation011.h" #include "komodo_validation011.h"
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -2216,8 +2216,10 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
{ {
const CChainParams& chainparams = Params(); const CChainParams& chainparams = Params();
AssertLockHeld(cs_main); AssertLockHeld(cs_main);
HUSH_STOPAT = GetArg("-stopat",0);
if ( HUSH_STOPAT != 0 && pindex->nHeight > HUSH_STOPAT ) { if (HUSH_STOPAT)
printf("Going to stopat=%d\n", HUSH_STOPAT);
if (HUSH_STOPAT != 0 && pindex->nHeight > HUSH_STOPAT) {
printf("Stopping at block height %d\n", HUSH_STOPAT); printf("Stopping at block height %d\n", HUSH_STOPAT);
return(false); return(false);
} }

Loading…
Cancel
Save