@@ -32,8 +32,6 @@ double CoinToDouble(double surrogate);
32
32
extern void TxToJSON (const CTransaction& tx, const uint256 hashBlock, UniValue& entry);
33
33
UniValue ContractToJson (const GRC::Contract& contract);
34
34
35
- GRC::BlockFinder RPCBlockFinder;
36
-
37
35
UniValue MRCToJson (const GRC::MRC& mrc) {
38
36
UniValue json (UniValue::VOBJ);
39
37
@@ -471,7 +469,7 @@ UniValue showblock(const UniValue& params, bool fHelp)
471
469
472
470
LOCK (cs_main);
473
471
474
- CBlockIndex* pblockindex = RPCBlockFinder. FindByHeight (nHeight);
472
+ CBlockIndex* pblockindex = GRC::BlockFinder:: FindByHeight (nHeight);
475
473
476
474
if (pblockindex == nullptr )
477
475
throw JSONRPCError (RPC_INVALID_ADDRESS_OR_KEY, " Block not found" );
@@ -587,7 +585,7 @@ UniValue getblockhash(const UniValue& params, bool fHelp)
587
585
588
586
LOCK (cs_main);
589
587
590
- CBlockIndex* RPCpblockindex = RPCBlockFinder. FindByHeight (nHeight);
588
+ CBlockIndex* RPCpblockindex = GRC::BlockFinder:: FindByHeight (nHeight);
591
589
592
590
return RPCpblockindex->phashBlock ->GetHex ();
593
591
}
@@ -634,9 +632,8 @@ UniValue getblockbynumber(const UniValue& params, bool fHelp)
634
632
LOCK (cs_main);
635
633
636
634
CBlock block;
637
- static GRC::BlockFinder block_finder;
638
635
639
- CBlockIndex* pblockindex = block_finder. FindByHeight (nHeight);
636
+ CBlockIndex* pblockindex = GRC::BlockFinder:: FindByHeight (nHeight);
640
637
ReadBlockFromDisk (block, pblockindex, Params ().GetConsensus ());
641
638
642
639
return blockToJSON (block, pblockindex, params.size () > 1 ? params[1 ].get_bool () : false );
0 commit comments