mirror of
https://github.com/logos-blockchain/logos-blockchain-module.git
synced 2026-01-05 22:53:09 +00:00
Update with c-bindings fixes.
This commit is contained in:
parent
cf836f195b
commit
c85f547a69
14
library.cpp
14
library.cpp
@ -37,12 +37,12 @@ public:
|
|||||||
QByteArray configPathBytes = config_path.toUtf8();
|
QByteArray configPathBytes = config_path.toUtf8();
|
||||||
InitializedNomosNodeResult result = start_nomos_node(configPathBytes.constData());
|
InitializedNomosNodeResult result = start_nomos_node(configPathBytes.constData());
|
||||||
|
|
||||||
if (result.error_code != None) {
|
if (!is_ok(&result.error)) {
|
||||||
qCritical() << "Failed to start Nomos node. Error code:" << result.error_code;
|
qCritical() << "Failed to start Nomos node. Error code:" << result.error;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = result.nomos_node;
|
node = result.value;
|
||||||
qInfo() << "Nomos node started successfully";
|
qInfo() << "Nomos node started successfully";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,12 +52,12 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NomosNodeErrorCode error_code = stop_node(node);
|
OperationStatus status = stop_node(node);
|
||||||
|
|
||||||
if (error_code != None) {
|
if (is_ok(&status)) {
|
||||||
qCritical() << "Failed to stop Nomos node. Error code:" << error_code;
|
|
||||||
} else {
|
|
||||||
qInfo() << "Nomos node stopped successfully";
|
qInfo() << "Nomos node stopped successfully";
|
||||||
|
} else {
|
||||||
|
qCritical() << "Failed to stop Nomos node. Error code:" << status;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = nullptr;
|
node = nullptr;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user