From 7aabf44677da02f43094e70aa1148e9d25812117 Mon Sep 17 00:00:00 2001 From: Colin LeMahieu Date: Mon, 25 Sep 2023 23:11:23 +0100 Subject: [PATCH] Formatting --- nano/secure/ledger.cpp | 2 +- nano/store/lmdb/lmdb.cpp | 2 +- nano/store/lmdb/successor.cpp | 3 +-- nano/store/rocksdb/successor.cpp | 3 +-- nano/store/rocksdb/successor.hpp | 1 - nano/store/successor.hpp | 1 - 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/nano/secure/ledger.cpp b/nano/secure/ledger.cpp index 439d8a4868..1601de7396 100644 --- a/nano/secure/ledger.cpp +++ b/nano/secure/ledger.cpp @@ -346,7 +346,7 @@ void ledger_processor::state_block_impl (nano::state_block & block_a) ledger.stats.inc (nano::stat::type::ledger, nano::stat::detail::state_block); block_a.sideband_set (nano::block_sideband (block_a.hashables.account /* unused */, 0 /* unused */, info.block_count + 1, nano::seconds_since_epoch (), block_details, source_epoch)); ledger.store.block.put (transaction, hash, block_a); - if (!block_a.hashables.previous.is_zero()) + if (!block_a.hashables.previous.is_zero ()) { ledger.store.successor.put (transaction, block_a.hashables.previous, hash); } diff --git a/nano/store/lmdb/lmdb.cpp b/nano/store/lmdb/lmdb.cpp index 55c5936e9e..72822bff0f 100644 --- a/nano/store/lmdb/lmdb.cpp +++ b/nano/store/lmdb/lmdb.cpp @@ -39,7 +39,7 @@ nano::store::lmdb::component::component (nano::logger_mt & logger_a, boost::file confirmation_height_store{ *this }, final_vote_store{ *this }, version_store{ *this }, - successor_store{ * this }, + successor_store{ *this }, logger (logger_a), env (error, path_a, nano::store::lmdb::env::options::make ().set_config (lmdb_config_a).set_use_no_mem_init (true)), mdb_txn_tracker (logger_a, txn_tracking_config_a, block_processor_batch_max_time_a), diff --git a/nano/store/lmdb/successor.cpp b/nano/store/lmdb/successor.cpp index 36a221ceb1..12947c8d60 100644 --- a/nano/store/lmdb/successor.cpp +++ b/nano/store/lmdb/successor.cpp @@ -1,6 +1,5 @@ -#include - #include +#include nano::store::lmdb::successor::successor (nano::store::lmdb::component & store) : store{ store } diff --git a/nano/store/rocksdb/successor.cpp b/nano/store/rocksdb/successor.cpp index 975efd2005..0d1544a35b 100644 --- a/nano/store/rocksdb/successor.cpp +++ b/nano/store/rocksdb/successor.cpp @@ -1,6 +1,5 @@ -#include - #include +#include nano::store::rocksdb::successor::successor (nano::store::rocksdb::component & store) : store{ store } diff --git a/nano/store/rocksdb/successor.hpp b/nano/store/rocksdb/successor.hpp index 421153c84a..b9337ac8b0 100644 --- a/nano/store/rocksdb/successor.hpp +++ b/nano/store/rocksdb/successor.hpp @@ -19,4 +19,3 @@ class successor : public nano::store::successor void del (store::write_transaction const &, nano::block_hash const &) override; }; } // namespace nano::store::rocksdb - diff --git a/nano/store/successor.hpp b/nano/store/successor.hpp index 7e690661b9..46c3e57680 100644 --- a/nano/store/successor.hpp +++ b/nano/store/successor.hpp @@ -20,4 +20,3 @@ class successor virtual void del (store::write_transaction const &, nano::block_hash const &) = 0; }; } // namespace nano::store -