mirror of
https://github.com/logos-blockchain/logos-blockchain-module.git
synced 2026-02-20 04:53:10 +00:00
Add clang format options and format.
This commit is contained in:
parent
657cf83d19
commit
ee5805690c
24
.clang-format
Normal file
24
.clang-format
Normal 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
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user