Test
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -4129,6 +4129,18 @@ bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNo
|
|||||||
|
|
||||||
// Store to disk
|
// Store to disk
|
||||||
CBlockIndex *pindex = NULL;
|
CBlockIndex *pindex = NULL;
|
||||||
|
if ( ASSETCHAINS_STAKED != 0 )
|
||||||
|
{
|
||||||
|
BlockMap::iterator miSelf = mapBlockIndex.find(hash);
|
||||||
|
if ( miSelf != mapBlockIndex.end() )
|
||||||
|
{
|
||||||
|
if ( (pindex= miSelf->second) == 0 )
|
||||||
|
{
|
||||||
|
fprint(stderr,"Block header is already known, but without pindex\n",hash.ToString().c_str());
|
||||||
|
AddToBlockIndex(block);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
bool ret = AcceptBlock(*pblock, state, &pindex, fRequested, dbp);
|
bool ret = AcceptBlock(*pblock, state, &pindex, fRequested, dbp);
|
||||||
if (pindex && pfrom) {
|
if (pindex && pfrom) {
|
||||||
mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId();
|
mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId();
|
||||||
|
|||||||
Reference in New Issue
Block a user