Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 6: [PATCH 06/17] feat(wallet): preserve Roots signing and spend controls on v31

src/test/rpc_tests.cpp

Before: src/test/rpc_tests.cpp · After: src/test/rpc_tests.cpp

File metadata
index b435fb8992b38b2397ea6f4062d24d1cc567c254..1eadb092ad3c1a91f7181709f0d6ab977d63ab7a 100644

Download original patch · Release notes

Diff rows 1–24 of 24. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/test/rpc_tests.cpp CHANGED
@@ -86,6 +86,24 @@ UniValue RPCTestingSetup::CallRPC(std::string args)
86
86
 
87
87
  BOOST_FIXTURE_TEST_SUITE(rpc_tests, RPCTestingSetup)
88
88
 
89
+ BOOST_AUTO_TEST_CASE(sweep_scan_shares_reservation_and_prechecks_cancellation)
90
+ {
91
+ std::map<COutPoint, Coin> coins;
92
+ {
93
+ rpc::scan::Reserver reserver;
94
+ BOOST_REQUIRE(reserver.reserve());
95
+ BOOST_CHECK(ScanUTXOSet(m_node, {}, coins) == interfaces::ScanResult::BUSY);
96
+ rpc::scan::g_progress = 75;
97
+ }
98
+ BOOST_CHECK_EQUAL(rpc::scan::g_progress.load(), 0);
99
+ BOOST_CHECK(!rpc::scan::g_in_progress.load());
100
+ BOOST_CHECK(ScanUTXOSet(m_node, {}, coins, [] { return true; }) == interfaces::ScanResult::ABORTED);
101
+ BOOST_CHECK(coins.empty());
102
+ rpc::scan::Reserver available;
103
+ BOOST_CHECK(available.reserve());
104
+ }
105
+
106
+
89
107
  BOOST_AUTO_TEST_CASE(rpc_namedparams)
90
108
  {
91
109
  const std::vector<std::pair<std::string, bool>> arg_names{{"arg1", false}, {"arg2", false}, {"arg3", false}, {"arg4", false}, {"arg5", false}};