[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