HomePhabricator

[avalanche] introduce EnsureAvalanche helper for RPC calls

Description

[avalanche] introduce EnsureAvalanche helper for RPC calls

Summary:
This diff is split out of D16224.

This factors the if (!g_avalanche) { throw... code out of the RPC code.
The NodeContext argument to the function is currently unused, but it will become used in D16224, so adding it now will save us from having to modify all the callsites again later.

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on May 30 2024, 06:57
teamcityPushed on May 30 2024, 13:47
Parents
rSTAGING8c9c1fdcba2e: [avalanche] initialize avalanche before node.peerman
Branches
Unknown
Tags
Unknown

Event Timeline