mirror of https://github.com/bitcoin/bitcoin
When the tracepoint was introduced inpull/29877/head8f37f5c2a5
, 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.
parent
9cb9651d92
commit
cd0edf26c0
Loading…
Reference in new issue