Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/consensus/grandpa/impl/grandpa_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace kagome::consensus::grandpa {
constexpr std::chrono::milliseconds kGossipDuration{1000};

inline auto historicalVotesKey(AuthoritySetId set, RoundNumber round) {
auto key = storage::kGrandpaHistoricalVotesPrefix;
common::Buffer key;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused anymore key storage::kGrandpaHistoricalVotesPrefix

key.putUint64(set);
key.putUint64(round);
return key;
Expand Down Expand Up @@ -102,7 +102,7 @@ namespace kagome::consensus::grandpa {
reputation_repository_(std::move(reputation_repository)),
timeline_{timeline},
chain_sub_{std::move(chain_sub_engine)},
db_{db.getSpace(storage::Space::kDefault)},
db_{db.getSpace(storage::Space::kGrandpaHistoricalVotes)},
main_pool_handler_{main_thread_pool.handler(*app_state_manager)},
grandpa_pool_handler_{poolHandlerReadyMake(
this, app_state_manager, grandpa_thread_pool, logger_)},
Expand Down
3 changes: 2 additions & 1 deletion core/injector/application_injector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ namespace {
options.max_open_files = soft_limit.value() / 2;

const std::unordered_map<std::string, int32_t> column_ttl = {
{"avaliability_storage", 25 * 60 * 60}}; // 25 hours
{"avaliability_storage", 25 * 60 * 60}, // 25 hours
{"grandpa_historical_votes", 2 * 60}}; // 2 minutes
auto db_res =
storage::RocksDb::create(app_config.databasePath(chain_spec->id()),
options,
Expand Down
3 changes: 2 additions & 1 deletion core/storage/rocksdb/rocksdb_spaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ namespace kagome::storage {
"dispute_data",
"beefy_justification",
"avaliability_storage",
"audi_peers"};
"audi_peers",
"grandpa_historical_votes"};
static_assert(kNames.size() == Space::kTotal - 1);

std::string spaceName(Space space) {
Expand Down
1 change: 1 addition & 0 deletions core/storage/spaces.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace kagome::storage {
kBeefyJustification,
kAvaliabilityStorage,
kAudiPeers,
kGrandpaHistoricalVotes,

kTotal
};
Expand Down
Loading