Load Sapling testnet parameters into memory.
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
#include "librustzcash.h"
|
||||
|
||||
CClientUIInterface uiInterface; // Declared but not defined in ui_interface.h
|
||||
CWallet* pwalletMain;
|
||||
ZCJoinSplit *pzcashParams;
|
||||
@@ -36,6 +38,20 @@ JoinSplitTestingSetup::JoinSplitTestingSetup()
|
||||
boost::filesystem::path pk_path = ZC_GetParamsDir() / "sprout-proving.key";
|
||||
boost::filesystem::path vk_path = ZC_GetParamsDir() / "sprout-verifying.key";
|
||||
pzcashParams = ZCJoinSplit::Prepared(vk_path.string(), pk_path.string());
|
||||
|
||||
boost::filesystem::path sapling_spend = ZC_GetParamsDir() / "sapling-spend-testnet.params";
|
||||
boost::filesystem::path sapling_output = ZC_GetParamsDir() / "sapling-output-testnet.params";
|
||||
boost::filesystem::path sprout_groth16 = ZC_GetParamsDir() / "sprout-groth16-testnet.params";
|
||||
|
||||
std::string sapling_spend_str = sapling_spend.string();
|
||||
std::string sapling_output_str = sapling_output.string();
|
||||
std::string sprout_groth16_str = sprout_groth16.string();
|
||||
|
||||
librustzcash_init_zksnark_params(
|
||||
sapling_spend_str.c_str(),
|
||||
sapling_output_str.c_str(),
|
||||
sprout_groth16_str.c_str()
|
||||
);
|
||||
}
|
||||
|
||||
JoinSplitTestingSetup::~JoinSplitTestingSetup()
|
||||
|
||||
Reference in New Issue
Block a user