Page MenuHomePhabricator

Remove GetSpendHeight
ClosedPublic

Authored by PiRK on Nov 10 2022, 08:59.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC150344e02b43: Remove GetSpendHeight
Summary

It is unclear what the goal of the helper is, as the caller already knows the spend height before calling the helper.

Also, in case the coins view is corrupted, LookupBlockIndex will return nullptr. Dereferencing a nullptr is UB.

Fix both issues by removing it. Also, add a sanity check, which aborts if the coins view is corrupted.

This is a backport of core#23630

Test Plan

ninja all check-all

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Nov 10 2022, 08:59
This revision is now accepted and ready to land.Nov 10 2022, 14:00
This revision was automatically updated to reflect the committed changes.