aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2023-12-13 11:43:16 -0500
committerRyan Ofsky <ryan@ofsky.org>2024-05-16 10:16:08 -0500
commit02e62c6c9af4beabaeea58fb1ea3ad0dc5094678 (patch)
tree3ddfb29afa69039b8d2444d3d2cd2e069e823aee /src/wallet/test
parent0d44c44ae33434f366229c612d6edeedf7658963 (diff)
downloadbitcoin-02e62c6c9af4beabaeea58fb1ea3ad0dc5094678.tar.xz
common: Add PSBTError enum
Add separate PSBTError enum instead of reusing TransactionError enum for PSBT operations, and drop unused error codes. The error codes returned by PSBT operations and transaction broadcast functions mostly do not overlap, so using an unified enum makes it harder to call any of these functions and know which errors actually need to be handled. Define PSBTError in the common library because PSBT functionality is implemented in the common library and used by both the node (for rawtransaction RPCs) and the wallet.
Diffstat (limited to 'src/wallet/test')
-rw-r--r--src/wallet/test/psbt_wallet_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/test/psbt_wallet_tests.cpp b/src/wallet/test/psbt_wallet_tests.cpp
index 9f533bf6ed..e924f90630 100644
--- a/src/wallet/test/psbt_wallet_tests.cpp
+++ b/src/wallet/test/psbt_wallet_tests.cpp
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(psbt_updater_test)
// Fill transaction with our data
bool complete = true;
- BOOST_REQUIRE_EQUAL(TransactionError::OK, m_wallet.FillPSBT(psbtx, complete, SIGHASH_ALL, false, true));
+ BOOST_REQUIRE(!m_wallet.FillPSBT(psbtx, complete, SIGHASH_ALL, false, true));
// Get the final tx
DataStream ssTx{};
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(psbt_updater_test)
// Try to sign the mutated input
SignatureData sigdata;
- BOOST_CHECK(m_wallet.FillPSBT(psbtx, complete, SIGHASH_ALL, true, true) != TransactionError::OK);
+ BOOST_CHECK(m_wallet.FillPSBT(psbtx, complete, SIGHASH_ALL, true, true));
}
BOOST_AUTO_TEST_CASE(parse_hd_keypath)