aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_tests.cpp
diff options
context:
space:
mode:
authorMD Islam <[email protected]>2021-05-25 18:23:36 -0400
committerMD Islam <[email protected]>2021-05-25 18:23:36 -0400
commit6a2b1cce6da438f9690c516cc6023799105c88fe (patch)
tree8dca818d99aa0539064708aa8f7ea11215db6a2b /src/test/rpc_tests.cpp
parentMerge pull request #1916 from hashtagcyber/master (diff)
downloaddiscoin-6a2b1cce6da438f9690c516cc6023799105c88fe.tar.xz
discoin-6a2b1cce6da438f9690c516cc6023799105c88fe.zip
Add functionality to generate auxpow blocks in regtest
This roughly reverts the work done here that disabled auxpow generation in regtest: https://github.com/dogecoin/dogecoin/pull/1431/files\#diff-ccc24453c13307f815879738d3bf00eec351417537fbf10dde1468180cacd2f1R127-R137 This is a pretty severe functionality change since auxpow is critical to Dogecoin and wallet integrators need to be able to parse the extra data in auxpow blocks. For future wallet integrators: Dogecoin follows similar schemes as Namecoin for the merged mining support and the spec is here: https://en.bitcoin.it/wiki/Merged_mining_specification pr review: GetHash -> GetPoWHash
Diffstat (limited to 'src/test/rpc_tests.cpp')
-rw-r--r--src/test/rpc_tests.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 8539a9a52..5c7b5b0fe 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -341,6 +341,12 @@ BOOST_AUTO_TEST_CASE(rpc_convert_values_generatetoaddress)
BOOST_CHECK_EQUAL(result[0].get_int(), 1);
BOOST_CHECK_EQUAL(result[1].get_str(), "mhMbmE2tE9xzJYCV9aNC8jKWN31vtGrguU");
BOOST_CHECK_EQUAL(result[2].get_int(), 9);
+
+ BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("1")("mhMbmE2tE9xzJYCV9aNC8jKWN31vtGrguU")("9")("1")));
+ BOOST_CHECK_EQUAL(result[0].get_int(), 1);
+ BOOST_CHECK_EQUAL(result[1].get_str(), "mhMbmE2tE9xzJYCV9aNC8jKWN31vtGrguU");
+ BOOST_CHECK_EQUAL(result[2].get_int(), 9);
+ BOOST_CHECK_EQUAL(result[3].get_int(), 1);
}
BOOST_AUTO_TEST_SUITE_END()