mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-28 20:28:46 +02:00
tracing: cast block_connected duration to nanoseconds
When the tracepoint was introduced in8f37f5c2a5
, the connect_block duration was passed in microseconds `µs`. By starting to use steady clock infabf1cdb20
this changed to nanoseconds `ns`. As the test only checked if the duration value is `> 0` as a plausibility check, this went unnoticed. I detected this when setting up monitoring for block validation time as part of the Great Consensus Cleanup Revival discussion. This change casts the duration explicitly to nanoseconds (as it has been nanoseconds for the last three releases; switching back now would 'break' the broken API again; there don't seem to be many users affected), updates the documentation and adds a check for an upper bound to the tracepoint interface tests. The upper bound is quite lax as mining the block takes much longer than connecting the empty test block. It's however able to detect incorrect duration units passed.
This commit is contained in:
@@ -106,7 +106,7 @@ Arguments passed:
|
||||
3. Transactions in the Block as `uint64`
|
||||
4. Inputs spend in the Block as `int32`
|
||||
5. SigOps in the Block (excluding coinbase SigOps) `uint64`
|
||||
6. Time it took to connect the Block in microseconds (µs) as `uint64`
|
||||
6. Time it took to connect the Block in nanoseconds (ns) as `uint64`
|
||||
|
||||
### Context `utxocache`
|
||||
|
||||
|
Reference in New Issue
Block a user