mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge f467b28ac3 into merged_master (Bitcoin PR bitcoin/bitcoin#27673)
This commit is contained in:
commit
9ecb615294
1 changed files with 4 additions and 8 deletions
|
|
@ -3066,7 +3066,6 @@ bool Chainstate::DisconnectTip(BlockValidationState& state, DisconnectedBlockTra
|
|||
return true;
|
||||
}
|
||||
|
||||
static SteadyClock::duration time_read_from_disk_total{};
|
||||
static SteadyClock::duration time_connect_total{};
|
||||
static SteadyClock::duration time_flush{};
|
||||
static SteadyClock::duration time_chainstate{};
|
||||
|
|
@ -3148,17 +3147,14 @@ bool Chainstate::ConnectTip(BlockValidationState& state, CBlockIndex* pindexNew,
|
|||
|
||||
// Apply the block atomically to the chain state.
|
||||
const auto time_2{SteadyClock::now()};
|
||||
time_read_from_disk_total += time_2 - time_1;
|
||||
SteadyClock::time_point time_3;
|
||||
LogPrint(BCLog::BENCH, " - Load block from disk: %.2fms [%.2fs (%.2fms/blk)]\n",
|
||||
Ticks<MillisecondsDouble>(time_2 - time_1),
|
||||
Ticks<SecondsDouble>(time_read_from_disk_total),
|
||||
Ticks<MillisecondsDouble>(time_read_from_disk_total) / num_blocks_total);
|
||||
|
||||
// When adding aggregate statistics in the future, keep in mind that
|
||||
// num_blocks_total may be zero until the ConnectBlock() call below.
|
||||
LogPrint(BCLog::BENCH, " - Load block from disk: %.2fms\n",
|
||||
Ticks<MillisecondsDouble>(time_2 - time_1));
|
||||
// ELEMENTS:
|
||||
// For mempool removal with pegin conflicts
|
||||
std::set<std::pair<uint256, COutPoint>> setPeginsSpent;
|
||||
|
||||
{
|
||||
CCoinsViewCache view(&CoinsTip());
|
||||
bool rv = ConnectBlock(blockConnecting, state, pindexNew, view, &setPeginsSpent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue