Lazily load the proving key at time of first pour.

This commit is contained in:
Sean Bowe
2016-03-15 14:16:05 -06:00
parent 3af297cc57
commit 8f8c4c6c0c
4 changed files with 32 additions and 12 deletions

View File

@@ -127,6 +127,17 @@ ZerocashParams::ZerocashParams(
params_vk_v1 = new zerocash_pour_verification_key<ZerocashParams::zerocash_pp>(keypair->vk);
}
ZerocashParams::ZerocashParams(
const unsigned int tree_depth,
zerocash_pour_verification_key<ZerocashParams::zerocash_pp>* p_vk_1,
std::string proving_key_path
) :
treeDepth(tree_depth), provingKeyPath(proving_key_path)
{
params_vk_v1 = new zerocash_pour_verification_key<ZerocashParams::zerocash_pp>(*p_vk_1);
params_pk_v1 = NULL;
}
ZerocashParams::ZerocashParams(
const unsigned int tree_depth,
zerocash_pour_proving_key<ZerocashParams::zerocash_pp>* p_pk_1,