From b5d0fe2e24c3e55e1f9741833440327f27907dc9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 20 Apr 2018 11:55:06 +0300 Subject: [PATCH] Test --- src/komodo_bitcoind.h | 14 -------------- src/main.cpp | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 374e1e646..9468338aa 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -1343,17 +1343,3 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height) else return(0); } -CBlockIndex *komodo_ensure(CBlock *pblock,uint256 hash) -{ - CBlockIndex *pindex; - BlockMap::iterator miSelf = mapBlockIndex.find(hash); - if ( miSelf != mapBlockIndex.end() ) - { - if ( (pindex= miSelf->second) == 0 ) // create pindex so first Accept block doesnt fail - { - pindex = AddToBlockIndex(*pblock); - fprintf(stderr,"Block header %s is already known, but without pindex -> ensured %p\n",hash.ToString().c_str(),pindex); - } - } -} - diff --git a/src/main.cpp b/src/main.cpp index 27ac26108..0509da5ed 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4103,6 +4103,20 @@ static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned void komodo_currentheight_set(int32_t height); +CBlockIndex *komodo_ensure(CBlock *pblock,uint256 hash) +{ + CBlockIndex *pindex; + BlockMap::iterator miSelf = mapBlockIndex.find(hash); + if ( miSelf != mapBlockIndex.end() ) + { + if ( (pindex= miSelf->second) == 0 ) // create pindex so first Accept block doesnt fail + { + pindex = AddToBlockIndex(*pblock); + fprintf(stderr,"Block header %s is already known, but without pindex -> ensured %p\n",hash.ToString().c_str(),pindex); + } + } +} + bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNode* pfrom, CBlock* pblock, bool fForceProcessing, CDiskBlockPos *dbp) { // Preliminary checks