Page MenuHomePhabricator

Fix UB with bench on genesis block
ClosedPublic

Authored by PiRK on Jan 8 2021, 22:40.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABCad59559de161: Fix UB with bench on genesis block
Summary

During the loading of the genesis block, the bench print lines in ConnectTip divide by zero due to early return in ConnectBlock.

Increment nBlocksTotal before returning in ConnectBlock

This is a backport of Core PR15283

Test Plan

ninja && ./src/bitcoind -debug=bench | grep "Connect total:"

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable