mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Pass chain and client variables where needed
This commit does not change behavior. All it does is pass new function
parameters.
It is easiest to review this change with:
git log -p -n1 -U0 --word-diff-regex=.
This commit is contained in:
@@ -4,8 +4,11 @@
|
||||
|
||||
#include <rpc/server.h>
|
||||
#include <rpc/client.h>
|
||||
#include <rpc/util.h>
|
||||
|
||||
#include <core_io.h>
|
||||
#include <init.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <key_io.h>
|
||||
#include <netbase.h>
|
||||
|
||||
@@ -112,10 +115,14 @@ BOOST_AUTO_TEST_CASE(rpc_rawsign)
|
||||
std::string notsigned = r.get_str();
|
||||
std::string privkey1 = "\"KzsXybp9jX64P5ekX1KUxRQ79Jht9uzW7LorgwE65i5rWACL6LQe\"";
|
||||
std::string privkey2 = "\"Kyhdf5LuKTRx4ge69ybABsiUAWjVRK4XGxAKk2FQLp2HjGMy87Z4\"";
|
||||
InitInterfaces interfaces;
|
||||
interfaces.chain = interfaces::MakeChain();
|
||||
g_rpc_interfaces = &interfaces;
|
||||
r = CallRPC(std::string("signrawtransactionwithkey ")+notsigned+" [] "+prevout);
|
||||
BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == false);
|
||||
r = CallRPC(std::string("signrawtransactionwithkey ")+notsigned+" ["+privkey1+","+privkey2+"] "+prevout);
|
||||
BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == true);
|
||||
g_rpc_interfaces = nullptr;
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(rpc_createraw_op_return)
|
||||
|
||||
Reference in New Issue
Block a user