mirror of
https://github.com/logos-blockchain/logos-blockchain-module.git
synced 2026-07-13 10:39:32 +00:00
Add template line rule, fix custom logos_events access label indent.
This commit is contained in:
parent
aa9d50f6e7
commit
91bbbf7db0
@ -23,4 +23,6 @@ AllowShortLoopsOnASingleLine: false
|
||||
BreakAfterReturnType: None
|
||||
PenaltyReturnTypeOnItsOwnLine: 1000
|
||||
|
||||
BreakTemplateDeclarations: Yes
|
||||
|
||||
NamespaceIndentation: All
|
||||
|
||||
@ -690,7 +690,7 @@ StdLogosResult LogosBlockchainModule::wallet_get_notes(
|
||||
obj["tip"] = bytes_to_hex(value.tip, TX_HASH_BYTES);
|
||||
json notes = json::array();
|
||||
for (size_t i = 0; i < value.len; ++i) {
|
||||
const auto&[note_id, note_value] = value.notes[i];
|
||||
const auto& [note_id, note_value] = value.notes[i];
|
||||
json n;
|
||||
n["id"] = bytes_to_hex(note_id, TX_HASH_BYTES);
|
||||
// Value is u64; serialized as a string to avoid JSON number precision loss.
|
||||
@ -894,7 +894,7 @@ StdLogosResult LogosBlockchainModule::wallet_get_claimable_vouchers() const {
|
||||
obj["vouchers"] = json::array();
|
||||
|
||||
for (size_t i = 0; i < value.len; ++i) {
|
||||
const auto&[commitment, nullifier] = value.vouchers[i];
|
||||
const auto& [commitment, nullifier] = value.vouchers[i];
|
||||
obj["vouchers"].push_back({
|
||||
{"commitment", bytes_to_hex(reinterpret_cast<const uint8_t*>(&commitment), ADDRESS_BYTES)},
|
||||
{"nullifier", bytes_to_hex(reinterpret_cast<const uint8_t*>(&nullifier), ADDRESS_BYTES)},
|
||||
|
||||
@ -136,11 +136,15 @@ public:
|
||||
// Cryptarchia
|
||||
[[nodiscard]] StdLogosResult get_cryptarchia_info() const;
|
||||
|
||||
logos_events :
|
||||
// clang-format off
|
||||
// Clang-format only handles public/private/protected, so it miss-indents this section.
|
||||
// Guard kept until https://github.com/llvm/llvm-project/issues/64763 lands.
|
||||
logos_events:
|
||||
// Fired by on_new_block_callback when the Rust node delivers a new block.
|
||||
// blockJson is the full block serialized as JSON.
|
||||
// ReSharper disable once CppFunctionIsNotImplemented
|
||||
void newBlock(const std::string& blockJson);
|
||||
// clang-format on
|
||||
|
||||
private:
|
||||
LogosBlockchainNode* node = nullptr;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user