Skip to content

Commit 0e747b2

Browse files
authored
Get output pk path as command line input (#28)
1 parent 9635706 commit 0e747b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ int main (int argc, char **argv)
298298
std::cerr << "-verify <vk.json> <proof.json>: Verify a proof" << std::endl;
299299
std::cerr << "-exportcircuit <block.json> <circuit.json>: Exports the rc1s circuit to json (circom - not all fields)" << std::endl;
300300
std::cerr << "-exportwitness <block.json> <witness.json>: Exports the witness to json (circom)" << std::endl;
301-
std::cerr << "-createpk <block.json> <pk.json>: Creates the proving key using a bellman pk" << std::endl;
301+
std::cerr << "-createpk <block.json> <pk.json> <pk.raw>: Creates the proving key using a bellman pk" << std::endl;
302302
return 1;
303303
}
304304

@@ -373,7 +373,7 @@ int main (int argc, char **argv)
373373
}
374374
else if (strcmp(argv[1], "-createpk") == 0)
375375
{
376-
if (argc != 4)
376+
if (argc != 5)
377377
{
378378
std::cout << "Invalid number of arguments!"<< std::endl;
379379
return 1;
@@ -571,11 +571,11 @@ int main (int argc, char **argv)
571571

572572
if (mode == Mode::CreatePk)
573573
{
574-
if (!pk_bellman2ethsnarks(pb, argv[3], (baseFilename + "_pk.raw").c_str()))
574+
if (!pk_bellman2ethsnarks(pb, argv[3], argv[4]))
575575
{
576576
return 1;
577577
}
578-
std::cout << "pk file created: " << (baseFilename + "_pk.raw").c_str() << std::endl;
578+
std::cout << "pk file created: " << argv[4] << std::endl;
579579
}
580580

581581
return 0;

0 commit comments

Comments
 (0)