Page MenuHomePhabricator

univalue: Throw exception on invalid pushes over silent ignore
ClosedPublic

Authored by Fabien on Jun 5 2024, 09:48.

Details

Summary
The return value of the push* helpers is never used, but important to determine if the operation was successful. One way to fix this would be to add the "nodiscard" attribute. However, this would make the code (and this diff) overly verbose for no reason.

So fix it by removing the never used return value. Also, fail verbosely in case of a programming mistake.

Backport of core#25551.

Depends on D16276.

Test Plan
ninja all check-all

Diff Detail

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