aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-05-18 16:56:48 +0200
committerMacroFake <falke.marco@gmail.com>2022-05-18 16:56:56 +0200
commit002411dc53753b52fef645484258e8baf41585a1 (patch)
treea83f7d4b952687bd6c560b1af50431e551115c25 /test
parent629e250cbdee84c20d362da845d7aacfb84ddabe (diff)
parent3a998d2e37bf76667b08cd947807ada1305520d7 (diff)
Merge bitcoin/bitcoin#25157: Fix -rpcwait with -netinfo returning negative time durations
3a998d2e37bf76667b08cd947807ada1305520d7 Use steady_clock in ConnectAndCallRPC and inline time call in loop conditional (Jon Atack) 3799d2dcdd736dd24850b192e1b264bee1cd5e5a Fix -rpcwait with -netinfo printing negative time durations (Jon Atack) Pull request description: - Fix `bitcoin-cli -rpcwait -netinfo 1` returning negative time durations on its first invocation after node startup in the "send", "recv", and "age" columns (potentially the "txn" and "blk" columns also). To reproduce, start bitcoind on mainnet (for a longer startup time) and run `bitcoin-cli -rpcwait -netinfo <n>` where n is 1 or larger. The negative time durations are larger with a slower CPU speed or e.g. higher `checkblocks`/`checklevel` config option settings. Examples: ``` <-> type net mping ping send recv txn blk hb addrp addrl age id out manual onion -126 -126 -2 0 ms ms sec sec min min min ``` ``` <-> type net mping ping send recv txn blk hb addrp addrl age id out manual cjdns -64 -64 -1 0 ms ms sec sec min min min ``` ``` <-> type net mping ping send recv txn blk hb addrp addrl age id out manual ipv4 -89 -89 * . -1 0 ms ms sec sec min min min ``` ``` <-> type net mping ping send recv txn blk hb addrp addrl age id out manual ipv6 -133 * . -2 0 ms ms sec sec min min min ``` - Use `steady_clock` in ConnectAndCallRPC and inline the time call in the loop conditional to avoid unnecessary invocations and an unneeded local variable allocation. ACKs for top commit: MarcoFalke: cr ACK 3a998d2e37bf76667b08cd947807ada1305520d7 Tree-SHA512: 141430d47189ad9f646ce8e51cb31c21b395f6294bb27ba9f7ae4c1e1505a63209a4a19662a0b462806437a9cfd07f1ea114e775adc2872d87397fe823f8b8dc
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions