HomePhabricator

[backport#15408] Remove unused TransactionError constants

Description

[backport#15408] Remove unused TransactionError constants

Summary:
Fixup to #14978, which introduced a bunch of unused enum values, such as UNKNOWN_ERROR, ERROR_COUNT and TRANSACTION_ERR_LAST. None of those have a meaning in the context of an enum class, where the compiler can infer if all cases have been covered in a switch-case.

Also, move the global ::maxTxFee back to the rpc caller, so it can be set on a per call basis (in the future).

https://github.com/bitcoin/bitcoin/pull/15408/commits/fa9b60c842741dc92a33925fca5796ebaa4510bd


Depends on D6000

This is a backport of Core PR15408 plus:

A few code cleanups in util/error.h/.cpp
Corrected a comment in validation.cpp (regtest no longer supporting non-standard transactions re: D5764)

Test Plan:

cmake .. -GNinja -DENABLE_WERROR=ON
ninja check-all
cmake .. -GNinja -DENABLE_WERROR=ON -DBUILD_BITCOIN_WALLET=OFF
ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Feb 14 2019, 15:01
majcostaCommitted on May 11 2020, 15:09
abc-botPushed on May 11 2020, 15:10
Reviewer
Restricted Project
Differential Revision
D6012: [backport#15408] Remove unused TransactionError constants
Parents
rSTAGING5517f469f9e5: [backport#14356] fix converttopsbt permitsigdata arg, add basic test
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/19897, tag: phabricator/base/19893, tag: phabricator/base/19892