mirror of
https://github.com/logos-blockchain/logos-blockchain-module.git
synced 2026-07-13 10:39:32 +00:00
Update refs from latest ffi
This commit is contained in:
parent
8813c80985
commit
66a74910cc
8
flake.lock
generated
8
flake.lock
generated
@ -24,11 +24,11 @@
|
||||
"rust-rapidsnark": "rust-rapidsnark"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1783586767,
|
||||
"narHash": "sha256-/oEB5DqR0pZQ4XR4D22PgbBDj3kb1/j6FXVxACUdZvo=",
|
||||
"lastModified": 1783675573,
|
||||
"narHash": "sha256-uDMtkfIevKV8GpiCyUbeJ3DtbmRpbhu5KhisSKIx7o8=",
|
||||
"ref": "refs/heads/fix/join-blend-ffi",
|
||||
"rev": "4b6f4a36f40ffc184b7ebebaab0418e7518d115c",
|
||||
"revCount": 1902,
|
||||
"rev": "cc7b06a465f00fae68ebc9c675b099e2643f8dd5",
|
||||
"revCount": 1903,
|
||||
"type": "git",
|
||||
"url": "file:///Users/netwave/projects/rust/nomos-node"
|
||||
},
|
||||
|
||||
@ -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*)
|
||||
@ -425,7 +425,7 @@ StdLogosResult LogosBlockchainModule::stop() {
|
||||
|
||||
s_instance = nullptr;
|
||||
|
||||
OperationStatus status = stop_node(node);
|
||||
OperationStatus status = shutdown_node(node);
|
||||
if (!is_ok(&status)) {
|
||||
fprintf(stderr, "Could not stop the node: %s\n", operation_status::take_message(status).c_str());
|
||||
}
|
||||
|
||||
@ -58,8 +58,8 @@ NodeResult start_lb_node(const char* config_path, const char* deployment) {
|
||||
return result;
|
||||
}
|
||||
|
||||
OperationStatus stop_node(LogosBlockchainNode* node) {
|
||||
LOGOS_CMOCK_RECORD("stop_node");
|
||||
OperationStatus shutdown_node(LogosBlockchainNode* node) {
|
||||
LOGOS_CMOCK_RECORD("shutdown_node");
|
||||
return make_status(0);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
@ -162,7 +162,7 @@ bool is_ok(const OperationStatus* status);
|
||||
// Lifecycle
|
||||
OperationStatus generate_user_config(GenerateConfigArgs args);
|
||||
NodeResult start_lb_node(const char* config_path, const char* deployment);
|
||||
OperationStatus stop_node(LogosBlockchainNode* node);
|
||||
OperationStatus shutdown_node(LogosBlockchainNode* node);
|
||||
OperationStatus subscribe_to_new_blocks(LogosBlockchainNode* node, BlockCallback callback);
|
||||
|
||||
// Config management
|
||||
|
||||
@ -354,7 +354,7 @@ LOGOS_TEST(stop_succeeds_with_running_node) {
|
||||
LOGOS_ASSERT_TRUE(module != nullptr);
|
||||
|
||||
LOGOS_ASSERT_TRUE(module->stop().success);
|
||||
LOGOS_ASSERT(t.cFunctionCalled("stop_node"));
|
||||
LOGOS_ASSERT(t.cFunctionCalled("shutdown_node"));
|
||||
delete module;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user