HomePhabricator

Remove GetSpendHeight

Description

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D12455

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Nov 23 2021, 17:03
PiRKCommitted on Nov 10 2022, 15:06
PiRKPushed on Nov 10 2022, 15:06
Reviewer
Restricted Project
Differential Revision
D12455: Remove GetSpendHeight
Parents
rABC096a1319b882: MOVEONLY: update_lock_points to txmempool.h
Branches
Unknown
Tags
Unknown

Event Timeline