Test
This commit is contained in:
@@ -1343,17 +1343,3 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
|||||||
else return(0);
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
14
src/main.cpp
14
src/main.cpp
@@ -4103,6 +4103,20 @@ static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned
|
|||||||
|
|
||||||
void komodo_currentheight_set(int32_t height);
|
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)
|
bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNode* pfrom, CBlock* pblock, bool fForceProcessing, CDiskBlockPos *dbp)
|
||||||
{
|
{
|
||||||
// Preliminary checks
|
// Preliminary checks
|
||||||
|
|||||||
Reference in New Issue
Block a user