Changeset View
Changeset View
Standalone View
Standalone View
src/test/rpc_tests.cpp
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | |||||
BOOST_AUTO_TEST_CASE(rpc_rawsign) { | BOOST_AUTO_TEST_CASE(rpc_rawsign) { | ||||
UniValue r; | UniValue r; | ||||
// input is a 1-of-2 multisig (so is output): | // input is a 1-of-2 multisig (so is output): | ||||
std::string prevout = "[{\"txid\":" | std::string prevout = "[{\"txid\":" | ||||
"\"b4cc287e58f87cdae59417329f710f3ecd75a4ee1d2872b724" | "\"b4cc287e58f87cdae59417329f710f3ecd75a4ee1d2872b724" | ||||
"8f50977c8493f3\"," | "8f50977c8493f3\"," | ||||
"\"vout\":1,\"scriptPubKey\":" | "\"vout\":1,\"scriptPubKey\":" | ||||
"\"a914b10c9df5f7edf436c697f02f1efdba4cf399615187\"," | "\"a914b10c9df5f7edf436c697f02f1efdba4cf399615187\"," | ||||
"\"amount\":\"3.14159\"," | "\"amount\":3.14159," | ||||
"\"redeemScript\":" | "\"redeemScript\":" | ||||
"\"512103debedc17b3df2badbcdd86d5feb4562b86fe182e5998" | "\"512103debedc17b3df2badbcdd86d5feb4562b86fe182e5998" | ||||
"abd8bcd4f122c6155b1b21027e940bb73ab8732bfdf7f9216ece" | "abd8bcd4f122c6155b1b21027e940bb73ab8732bfdf7f9216ece" | ||||
"fca5b94d6df834e77e108f68e66f126044c052ae\"}]"; | "fca5b94d6df834e77e108f68e66f126044c052ae\"}]"; | ||||
r = CallRPC(std::string("createrawtransaction ") + prevout + " " + | r = CallRPC(std::string("createrawtransaction ") + prevout + " " + | ||||
"{\"3HqAe9LtNBjnsfM4CyYaWTnvCaUYT7v4oZ\":11}"); | "{\"3HqAe9LtNBjnsfM4CyYaWTnvCaUYT7v4oZ\":11}"); | ||||
std::string notsigned = r.get_str(); | std::string notsigned = r.get_str(); | ||||
std::string privkey1 = | std::string privkey1 = | ||||
▲ Show 20 Lines • Show All 376 Lines • Show Last 20 Lines |