Skip to content

Commit 87cbdb8

Browse files
committed
Globals: Explicit Consensus::Params arg for main:
-CheckBlockIndex -DisconnectTip -GetTransaction -InvalidateBlock -ProcessGetData -ReadBlockFromDisk
1 parent 725539e commit 87cbdb8

File tree

7 files changed

+52
-45
lines changed

7 files changed

+52
-45
lines changed

src/main.cpp

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void EraseOrphansFor(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
9292
* in the last Consensus::Params::nMajorityWindow blocks, starting at pstart and going backwards.
9393
*/
9494
static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned nRequired, const Consensus::Params& consensusParams);
95-
static void CheckBlockIndex();
95+
static void CheckBlockIndex(const Consensus::Params& consensusParams);
9696

9797
/** Constant stuff for coinbase transactions we create: */
9898
CScript COINBASE_FLAGS;
@@ -998,7 +998,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
998998
}
999999

10001000
/** Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock */
1001-
bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock, bool fAllowSlow)
1001+
bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow)
10021002
{
10031003
CBlockIndex *pindexSlow = NULL;
10041004

@@ -1044,7 +1044,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
10441044

10451045
if (pindexSlow) {
10461046
CBlock block;
1047-
if (ReadBlockFromDisk(block, pindexSlow)) {
1047+
if (ReadBlockFromDisk(block, pindexSlow, consensusParams)) {
10481048
BOOST_FOREACH(const CTransaction &tx, block.vtx) {
10491049
if (tx.GetHash() == hash) {
10501050
txOut = tx;
@@ -1089,7 +1089,7 @@ bool WriteBlockToDisk(const CBlock& block, CDiskBlockPos& pos, const CMessageHea
10891089
return true;
10901090
}
10911091

1092-
bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
1092+
bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus::Params& consensusParams)
10931093
{
10941094
block.SetNull();
10951095

@@ -1107,15 +1107,15 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
11071107
}
11081108

11091109
// Check the header
1110-
if (!CheckProofOfWork(block.GetHash(), block.nBits, Params().GetConsensus()))
1110+
if (!CheckProofOfWork(block.GetHash(), block.nBits, consensusParams))
11111111
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
11121112

11131113
return true;
11141114
}
11151115

1116-
bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex)
1116+
bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex, const Consensus::Params& consensusParams)
11171117
{
1118-
if (!ReadBlockFromDisk(block, pindex->GetBlockPos()))
1118+
if (!ReadBlockFromDisk(block, pindex->GetBlockPos(), consensusParams))
11191119
return false;
11201120
if (block.GetHash() != pindex->GetBlockHash())
11211121
return error("ReadBlockFromDisk(CBlock&, CBlockIndex*): GetHash() doesn't match index for %s at %s",
@@ -2064,13 +2064,14 @@ void static UpdateTip(CBlockIndex *pindexNew) {
20642064
}
20652065

20662066
/** Disconnect chainActive's tip. You want to manually re-limit mempool size after this */
2067-
bool static DisconnectTip(CValidationState &state) {
2067+
bool static DisconnectTip(CValidationState& state, const Consensus::Params& consensusParams)
2068+
{
20682069
CBlockIndex *pindexDelete = chainActive.Tip();
20692070
assert(pindexDelete);
20702071
mempool.check(pcoinsTip);
20712072
// Read block from disk.
20722073
CBlock block;
2073-
if (!ReadBlockFromDisk(block, pindexDelete))
2074+
if (!ReadBlockFromDisk(block, pindexDelete, consensusParams))
20742075
return AbortNode(state, "Failed to read block");
20752076
// Apply the block atomically to the chain state.
20762077
int64_t nStart = GetTimeMicros();
@@ -2125,13 +2126,14 @@ static int64_t nTimePostConnect = 0;
21252126
* corresponding to pindexNew, to bypass loading it again from disk.
21262127
*/
21272128
bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, const CBlock *pblock) {
2129+
const CChainParams& chainparams = Params();
21282130
assert(pindexNew->pprev == chainActive.Tip());
21292131
mempool.check(pcoinsTip);
21302132
// Read block from disk.
21312133
int64_t nTime1 = GetTimeMicros();
21322134
CBlock block;
21332135
if (!pblock) {
2134-
if (!ReadBlockFromDisk(block, pindexNew))
2136+
if (!ReadBlockFromDisk(block, pindexNew, chainparams.GetConsensus()))
21352137
return AbortNode(state, "Failed to read block");
21362138
pblock = █
21372139
}
@@ -2257,6 +2259,7 @@ static void PruneBlockIndexCandidates() {
22572259
* pblock is either NULL or a pointer to a CBlock corresponding to pindexMostWork.
22582260
*/
22592261
static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork, const CBlock *pblock) {
2262+
const CChainParams& chainparams = Params();
22602263
AssertLockHeld(cs_main);
22612264
bool fInvalidFound = false;
22622265
const CBlockIndex *pindexOldTip = chainActive.Tip();
@@ -2265,7 +2268,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
22652268
// Disconnect active blocks which are no longer in the best chain.
22662269
bool fBlocksDisconnected = false;
22672270
while (chainActive.Tip() && chainActive.Tip() != pindexFork) {
2268-
if (!DisconnectTip(state))
2271+
if (!DisconnectTip(state, chainparams.GetConsensus()))
22692272
return false;
22702273
fBlocksDisconnected = true;
22712274
}
@@ -2333,7 +2336,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
23332336
bool ActivateBestChain(CValidationState &state, const CBlock *pblock) {
23342337
CBlockIndex *pindexNewTip = NULL;
23352338
CBlockIndex *pindexMostWork = NULL;
2336-
const CChainParams& chainParams = Params();
2339+
const CChainParams& chainparams = Params();
23372340
do {
23382341
boost::this_thread::interruption_point();
23392342

@@ -2360,7 +2363,7 @@ bool ActivateBestChain(CValidationState &state, const CBlock *pblock) {
23602363
// Relay inventory, but don't relay old inventory during initial block download.
23612364
int nBlockEstimate = 0;
23622365
if (fCheckpointsEnabled)
2363-
nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints());
2366+
nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints());
23642367
{
23652368
LOCK(cs_vNodes);
23662369
BOOST_FOREACH(CNode* pnode, vNodes)
@@ -2372,7 +2375,7 @@ bool ActivateBestChain(CValidationState &state, const CBlock *pblock) {
23722375
uiInterface.NotifyBlockTip(hashNewTip);
23732376
}
23742377
} while(pindexMostWork != chainActive.Tip());
2375-
CheckBlockIndex();
2378+
CheckBlockIndex(chainparams.GetConsensus());
23762379

23772380
// Write changes periodically to disk, after relay.
23782381
if (!FlushStateToDisk(state, FLUSH_STATE_PERIODIC)) {
@@ -2382,7 +2385,8 @@ bool ActivateBestChain(CValidationState &state, const CBlock *pblock) {
23822385
return true;
23832386
}
23842387

2385-
bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
2388+
bool InvalidateBlock(CValidationState& state, const Consensus::Params& consensusParams, CBlockIndex *pindex)
2389+
{
23862390
AssertLockHeld(cs_main);
23872391

23882392
// Mark the block itself as invalid.
@@ -2397,7 +2401,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
23972401
setBlockIndexCandidates.erase(pindexWalk);
23982402
// ActivateBestChain considers blocks already in chainActive
23992403
// unconditionally valid already, so force disconnect away from it.
2400-
if (!DisconnectTip(state)) {
2404+
if (!DisconnectTip(state, consensusParams)) {
24012405
return false;
24022406
}
24032407
}
@@ -2899,6 +2903,7 @@ static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned
28992903

29002904
bool ProcessNewBlock(CValidationState &state, const CNode* pfrom, const CBlock* pblock, bool fForceProcessing, CDiskBlockPos *dbp)
29012905
{
2906+
const CChainParams& chainparams = Params();
29022907
// Preliminary checks
29032908
bool checked = CheckBlock(*pblock, state);
29042909

@@ -2916,7 +2921,7 @@ bool ProcessNewBlock(CValidationState &state, const CNode* pfrom, const CBlock*
29162921
if (pindex && pfrom) {
29172922
mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId();
29182923
}
2919-
CheckBlockIndex();
2924+
CheckBlockIndex(chainparams.GetConsensus());
29202925
if (!ret)
29212926
return error("%s: AcceptBlock FAILED", __func__);
29222927
}
@@ -3248,6 +3253,7 @@ CVerifyDB::~CVerifyDB()
32483253

32493254
bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth)
32503255
{
3256+
const CChainParams& chainparams = Params();
32513257
LOCK(cs_main);
32523258
if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL)
32533259
return true;
@@ -3272,7 +3278,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
32723278
break;
32733279
CBlock block;
32743280
// check level 0: read from disk
3275-
if (!ReadBlockFromDisk(block, pindex))
3281+
if (!ReadBlockFromDisk(block, pindex, chainparams.GetConsensus()))
32763282
return error("VerifyDB(): *** ReadBlockFromDisk failed at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());
32773283
// check level 1: verify block validity
32783284
if (nCheckLevel >= 1 && !CheckBlock(block, state))
@@ -3312,7 +3318,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
33123318
uiInterface.ShowProgress(_("Verifying blocks..."), std::max(1, std::min(99, 100 - (int)(((double)(chainActive.Height() - pindex->nHeight)) / (double)nCheckDepth * 50))));
33133319
pindex = chainActive.Next(pindex);
33143320
CBlock block;
3315-
if (!ReadBlockFromDisk(block, pindex))
3321+
if (!ReadBlockFromDisk(block, pindex, chainparams.GetConsensus()))
33163322
return error("VerifyDB(): *** ReadBlockFromDisk failed at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());
33173323
if (!ConnectBlock(block, state, pindex, coins))
33183324
return error("VerifyDB(): *** found unconnectable block at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());
@@ -3485,7 +3491,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
34853491
std::pair<std::multimap<uint256, CDiskBlockPos>::iterator, std::multimap<uint256, CDiskBlockPos>::iterator> range = mapBlocksUnknownParent.equal_range(head);
34863492
while (range.first != range.second) {
34873493
std::multimap<uint256, CDiskBlockPos>::iterator it = range.first;
3488-
if (ReadBlockFromDisk(block, it->second))
3494+
if (ReadBlockFromDisk(block, it->second, chainparams.GetConsensus()))
34893495
{
34903496
LogPrintf("%s: Processing out of order child %s of %s\n", __func__, block.GetHash().ToString(),
34913497
head.ToString());
@@ -3512,9 +3518,8 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
35123518
return nLoaded > 0;
35133519
}
35143520

3515-
void static CheckBlockIndex()
3521+
void static CheckBlockIndex(const Consensus::Params& consensusParams)
35163522
{
3517-
const Consensus::Params& consensusParams = Params().GetConsensus();
35183523
if (!fCheckBlockIndex) {
35193524
return;
35203525
}
@@ -3796,7 +3801,7 @@ bool static AlreadyHave(const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
37963801
return true;
37973802
}
37983803

3799-
void static ProcessGetData(CNode* pfrom)
3804+
void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParams)
38003805
{
38013806
std::deque<CInv>::iterator it = pfrom->vRecvGetData.begin();
38023807

@@ -3851,7 +3856,7 @@ void static ProcessGetData(CNode* pfrom)
38513856
{
38523857
// Send block from disk
38533858
CBlock block;
3854-
if (!ReadBlockFromDisk(block, (*mi).second))
3859+
if (!ReadBlockFromDisk(block, (*mi).second, consensusParams))
38553860
assert(!"cannot load block from disk");
38563861
if (inv.type == MSG_BLOCK)
38573862
pfrom->PushMessage("block", block);
@@ -4243,7 +4248,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
42434248
LogPrint("net", "received getdata for: %s peer=%d\n", vInv[0].ToString(), pfrom->id);
42444249

42454250
pfrom->vRecvGetData.insert(pfrom->vRecvGetData.end(), vInv.begin(), vInv.end());
4246-
ProcessGetData(pfrom);
4251+
ProcessGetData(pfrom, chainparams.GetConsensus());
42474252
}
42484253

42494254

@@ -4509,7 +4514,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
45094514
pfrom->PushMessage("getheaders", chainActive.GetLocator(pindexLast), uint256());
45104515
}
45114516

4512-
CheckBlockIndex();
4517+
CheckBlockIndex(chainparams.GetConsensus());
45134518
}
45144519

45154520
else if (strCommand == "block" && !fImporting && !fReindex) // Ignore blocks received while importing
@@ -4793,6 +4798,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
47934798
// requires LOCK(cs_vRecvMsg)
47944799
bool ProcessMessages(CNode* pfrom)
47954800
{
4801+
const CChainParams& chainparams = Params();
47964802
//if (fDebug)
47974803
// LogPrintf("%s(%u messages)\n", __func__, pfrom->vRecvMsg.size());
47984804

@@ -4807,7 +4813,7 @@ bool ProcessMessages(CNode* pfrom)
48074813
bool fOk = true;
48084814

48094815
if (!pfrom->vRecvGetData.empty())
4810-
ProcessGetData(pfrom);
4816+
ProcessGetData(pfrom, chainparams.GetConsensus());
48114817

48124818
// this maintains the order of responses
48134819
if (!pfrom->vRecvGetData.empty()) return fOk;
@@ -4834,15 +4840,15 @@ bool ProcessMessages(CNode* pfrom)
48344840
it++;
48354841

48364842
// Scan for message start
4837-
if (memcmp(msg.hdr.pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE) != 0) {
4843+
if (memcmp(msg.hdr.pchMessageStart, chainparams.MessageStart(), MESSAGE_START_SIZE) != 0) {
48384844
LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", SanitizeString(msg.hdr.GetCommand()), pfrom->id);
48394845
fOk = false;
48404846
break;
48414847
}
48424848

48434849
// Read header
48444850
CMessageHeader& hdr = msg.hdr;
4845-
if (!hdr.IsValid(Params().MessageStart()))
4851+
if (!hdr.IsValid(chainparams.MessageStart()))
48464852
{
48474853
LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n", SanitizeString(hdr.GetCommand()), pfrom->id);
48484854
continue;

src/main.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ bool IsInitialBlockDownload();
189189
/** Format a string that describes several potential problems detected by the core */
190190
std::string GetWarnings(const std::string& strFor);
191191
/** Retrieve a transaction (from memory pool, or from disk, if possible) */
192-
bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock, bool fAllowSlow = false);
192+
bool GetTransaction(const uint256 &hash, CTransaction &tx, const Consensus::Params& params, uint256 &hashBlock, bool fAllowSlow = false);
193193
/** Find the best known block, and make it the tip of the block chain */
194194
bool ActivateBestChain(CValidationState &state, const CBlock *pblock = NULL);
195195
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams);
@@ -350,9 +350,8 @@ class CScriptCheck
350350

351351
/** Functions for disk access for blocks */
352352
bool WriteBlockToDisk(const CBlock& block, CDiskBlockPos& pos, const CMessageHeader::MessageStartChars& messageStart);
353-
bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos);
354-
bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
355-
353+
bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus::Params& consensusParams);
354+
bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex, const Consensus::Params& consensusParams);
356355

357356
/** Functions for validating blocks and updating the block tree */
358357

@@ -378,8 +377,7 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
378377

379378
/** Store block on disk. If dbp is non-NULL, the file is known to already reside on disk */
380379
bool AcceptBlock(const CBlock& block, CValidationState& state, CBlockIndex **pindex, bool fRequested, CDiskBlockPos* dbp);
381-
bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex **ppindex= NULL);
382-
380+
bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, const Consensus::Params& consensusParams, CBlockIndex **ppindex= NULL);
383381

384382

385383
class CBlockFileInfo
@@ -448,7 +446,7 @@ class CVerifyDB {
448446
CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator);
449447

450448
/** Mark a block as invalid. */
451-
bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex);
449+
bool InvalidateBlock(CValidationState& state, const Consensus::Params& consensusParams, CBlockIndex *pindex);
452450

453451
/** Remove invalidity status from a block and its descendants. */
454452
bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex);

src/rest.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#include "chain.h"
7+
#include "chainparams.h"
78
#include "primitives/block.h"
89
#include "primitives/transaction.h"
910
#include "main.h"
@@ -223,7 +224,7 @@ static bool rest_block(HTTPRequest* req,
223224
if (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0)
224225
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not available (pruned data)");
225226

226-
if (!ReadBlockFromDisk(block, pblockindex))
227+
if (!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))
227228
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
228229
}
229230

@@ -360,7 +361,7 @@ static bool rest_tx(HTTPRequest* req, const std::string& strURIPart)
360361

361362
CTransaction tx;
362363
uint256 hashBlock = uint256();
363-
if (!GetTransaction(hash, tx, hashBlock, true))
364+
if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true))
364365
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
365366

366367
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);

src/rpcblockchain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ UniValue getblock(const UniValue& params, bool fHelp)
405405
if (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0)
406406
throw JSONRPCError(RPC_INTERNAL_ERROR, "Block not available (pruned data)");
407407

408-
if(!ReadBlockFromDisk(block, pblockindex))
408+
if(!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))
409409
throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
410410

411411
if (!fVerbose)
@@ -824,7 +824,7 @@ UniValue invalidateblock(const UniValue& params, bool fHelp)
824824
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
825825

826826
CBlockIndex* pblockindex = mapBlockIndex[hash];
827-
InvalidateBlock(state, pblockindex);
827+
InvalidateBlock(state, Params().GetConsensus(), pblockindex);
828828
}
829829

830830
if (state.IsValid()) {

src/rpcrawtransaction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
186186

187187
CTransaction tx;
188188
uint256 hashBlock;
189-
if (!GetTransaction(hash, tx, hashBlock, true))
189+
if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true))
190190
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction");
191191

192192
string strHex = EncodeHexTx(tx);
@@ -256,15 +256,15 @@ UniValue gettxoutproof(const UniValue& params, bool fHelp)
256256
if (pblockindex == NULL)
257257
{
258258
CTransaction tx;
259-
if (!GetTransaction(oneTxid, tx, hashBlock, false) || hashBlock.IsNull())
259+
if (!GetTransaction(oneTxid, tx, Params().GetConsensus(), hashBlock, false) || hashBlock.IsNull())
260260
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Transaction not yet in block");
261261
if (!mapBlockIndex.count(hashBlock))
262262
throw JSONRPCError(RPC_INTERNAL_ERROR, "Transaction index corrupt");
263263
pblockindex = mapBlockIndex[hashBlock];
264264
}
265265

266266
CBlock block;
267-
if(!ReadBlockFromDisk(block, pblockindex))
267+
if(!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))
268268
throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
269269

270270
unsigned int ntxFound = 0;

0 commit comments

Comments
 (0)