feat: rename generate_user_config ibd field to skip_ibd

This commit is contained in:
Youngjoon Lee 2026-07-07 22:31:29 +09:00
parent 88d57c92b5
commit f9cb850868
No known key found for this signature in database
GPG Key ID: E11646AEA0B0F1EA
3 changed files with 8 additions and 8 deletions

View File

@ -144,7 +144,7 @@ namespace {
std::string state_path_data;
std::string storage_path_data;
std::string logs_path_data;
bool ibd_val;
bool skip_ibd_val;
std::string log_filter_data;
std::string kms_file_data;
@ -235,12 +235,12 @@ namespace {
ffi_args.logs_path = nullptr;
}
// ibd (bool -> const bool*)
if (args.contains("ibd") && args["ibd"].is_boolean()) {
ibd_val = args["ibd"].get<bool>();
ffi_args.ibd = &ibd_val;
// skip_ibd (bool -> const bool*)
if (args.contains("skip_ibd") && args["skip_ibd"].is_boolean()) {
skip_ibd_val = args["skip_ibd"].get<bool>();
ffi_args.skip_ibd = &skip_ibd_val;
} else {
ffi_args.ibd = nullptr;
ffi_args.skip_ibd = nullptr;
}
// log_filter (string -> const char*)

View File

@ -62,7 +62,7 @@ typedef struct {
const char* state_path;
const char* storage_path;
const char* logs_path;
const bool* ibd;
const bool* skip_ibd;
const char* log_filter;
const char* kms_file;
} GenerateConfigArgs;

View File

@ -216,7 +216,7 @@ LOGOS_TEST(generate_user_config_with_all_fields) {
"http_addr": "0.0.0.0:8080",
"external_address": "1.2.3.4",
"state_path": "/tmp/state",
"ibd": true,
"skip_ibd": true,
"log_filter": "warn,logos_blockchain=debug",
"kms_file": "/tmp/kms.yaml"
})";