Add clang format options and format.

This commit is contained in:
Alejandro Cabeza Romero 2026-02-04 15:56:51 +01:00
parent 657cf83d19
commit ee5805690c
No known key found for this signature in database
GPG Key ID: DA3D14AE478030FD
4 changed files with 33 additions and 7 deletions

24
.clang-format Normal file
View File

@ -0,0 +1,24 @@
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 120
IndentAccessModifiers: false
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
BinPackParameters: false
BinPackArguments: false
AllowAllParametersOfDeclarationOnNextLine: false
PenaltyBreakBeforeFirstCallParameter: 1
PointerAlignment: Left
ReferenceAlignment: Left
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
BreakAfterReturnType: None
PenaltyReturnTypeOnItsOwnLine: 1000

View File

@ -22,7 +22,11 @@ public:
virtual int start(const QString& config_path, const QString& deployment) = 0;
virtual int stop() = 0;
virtual int subscribe() = 0;
virtual int wallet_get_balance(const uint8_t* wallet_address, const HeaderId* optional_tip, BalanceResult* output_balance) = 0;
virtual int wallet_get_balance(
const uint8_t* wallet_address,
const HeaderId* optional_tip,
BalanceResult* output_balance
) = 0;
virtual int wallet_transfer_funds(const TransferFundsArguments* transfer_funds_arguments, Hash* output_hash) = 0;
};

View File

@ -29,7 +29,7 @@ int LogosBlockchainModule::start(const QString& config_path, const QString& depl
return 1;
}
QString effective_config_path= config_path;
QString effective_config_path = config_path;
if (effective_config_path.isEmpty()) {
const char* env = std::getenv("LB_CONFIG_PATH");
@ -86,9 +86,7 @@ int LogosBlockchainModule::subscribe() {
return 1;
}
subscribe_to_new_blocks(node, [](const char* block) {
std::cout << "Received new block: " << block << std::endl;
});
subscribe_to_new_blocks(node, [](const char* block) { std::cout << "Received new block: " << block << std::endl; });
return 0;
}

View File

@ -23,8 +23,8 @@ public:
Q_INVOKABLE int wallet_get_balance(const uint8_t*, const HeaderId*, BalanceResult*) override;
Q_INVOKABLE int wallet_transfer_funds(const TransferFundsArguments*, Hash*) override;
signals:
void eventResponse(const QString& eventName, const QVariantList& data);
signals:
void eventResponse(const QString& eventName, const QVariantList& data);
private:
LogosBlockchainNode* node = nullptr;