Merge pull request #6055 from str4d/wallet-updatedtransaction-softlock-fix
Move "previous coinbase" UI monitoring into ThreadNotifyWallets
This commit is contained in:
commit
606e5ed134
|
@ -3623,14 +3623,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
||||||
int64_t nTime3 = GetTimeMicros(); nTimeIndex += nTime3 - nTime2;
|
int64_t nTime3 = GetTimeMicros(); nTimeIndex += nTime3 - nTime2;
|
||||||
LogPrint("bench", " - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001);
|
LogPrint("bench", " - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001);
|
||||||
|
|
||||||
// Watch for changes to the previous coinbase transaction.
|
|
||||||
static uint256 hashPrevBestCoinBase;
|
|
||||||
GetMainSignals().UpdatedTransaction(hashPrevBestCoinBase);
|
|
||||||
hashPrevBestCoinBase = block.vtx[0].GetHash();
|
|
||||||
|
|
||||||
int64_t nTime4 = GetTimeMicros(); nTimeCallbacks += nTime4 - nTime3;
|
|
||||||
LogPrint("bench", " - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeCallbacks * 0.000001);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,6 +250,11 @@ void ThreadNotifyWallets(CBlockIndex *pindexLastTip)
|
||||||
// exploitable as a timing channel.
|
// exploitable as a timing channel.
|
||||||
GetMainSignals().ChainTip(blockData.pindex, &block, blockData.oldTrees);
|
GetMainSignals().ChainTip(blockData.pindex, &block, blockData.oldTrees);
|
||||||
|
|
||||||
|
// Notify UI to display prev block's coinbase if it was ours.
|
||||||
|
static uint256 hashPrevBestCoinBase;
|
||||||
|
GetMainSignals().UpdatedTransaction(hashPrevBestCoinBase);
|
||||||
|
hashPrevBestCoinBase = block.vtx[0].GetHash();
|
||||||
|
|
||||||
// This block is done!
|
// This block is done!
|
||||||
pindexLastTip = blockData.pindex;
|
pindexLastTip = blockData.pindex;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue