mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
pow-testgiver support
This commit is contained in:
parent
dbde9c1c40
commit
f064b1047a
257 changed files with 6665 additions and 2608 deletions
|
@ -51,7 +51,7 @@
|
|||
#include "vm/cells/MerkleProof.h"
|
||||
|
||||
#include "td/utils/Container.h"
|
||||
#include "td/utils/OptionsParser.h"
|
||||
#include "td/utils/OptionParser.h"
|
||||
#include "td/utils/Random.h"
|
||||
#include "td/utils/filesystem.h"
|
||||
#include "td/utils/tests.h"
|
||||
|
@ -789,26 +789,23 @@ int main(int argc, char* argv[]) {
|
|||
td::set_default_failure_signal_handler();
|
||||
using tonlib_api::make_object;
|
||||
|
||||
td::OptionsParser p;
|
||||
td::OptionParser p;
|
||||
std::string global_config_str;
|
||||
std::string giver_key_str;
|
||||
std::string giver_key_pwd = "cucumber";
|
||||
std::string keystore_dir = "test-keystore";
|
||||
bool reset_keystore_dir = false;
|
||||
p.add_option('C', "global-config", "file to read global config", [&](td::Slice fname) {
|
||||
p.add_checked_option('C', "global-config", "file to read global config", [&](td::Slice fname) {
|
||||
TRY_RESULT(str, td::read_file_str(fname.str()));
|
||||
global_config_str = std::move(str);
|
||||
return td::Status::OK();
|
||||
});
|
||||
p.add_option('G', "giver-key", "file with a wallet key that should be used as a giver", [&](td::Slice fname) {
|
||||
p.add_checked_option('G', "giver-key", "file with a wallet key that should be used as a giver", [&](td::Slice fname) {
|
||||
TRY_RESULT(str, td::read_file_str(fname.str()));
|
||||
giver_key_str = std::move(str);
|
||||
return td::Status::OK();
|
||||
});
|
||||
p.add_option('f', "force", "reser keystore dir", [&]() {
|
||||
reset_keystore_dir = true;
|
||||
return td::Status::OK();
|
||||
});
|
||||
p.add_option('f', "force", "reser keystore dir", [&]() { reset_keystore_dir = true; });
|
||||
p.run(argc, argv).ensure();
|
||||
|
||||
if (reset_keystore_dir) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue