summaryrefslogtreecommitdiffstats
path: root/src/remake/records.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 04:13:11 +0100
committertv <tv@krebsco.de>2026-10-26 04:13:11 +0100
commitd668ce2ff8f308e54c1c7a2c145cb3479cab899d (patch)
tree851ceb314782a9428cac36d48fb5abc5805ead5f /src/remake/records.rs
parentc13cee08dedeb8e73560f9bf9f7154c9fa089e2d (diff)
move protocol paths to dedicated module
Diffstat (limited to 'src/remake/records.rs')
-rw-r--r--src/remake/records.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/remake/records.rs b/src/remake/records.rs
index 82c61a1..119ff0c 100644
--- a/src/remake/records.rs
+++ b/src/remake/records.rs
@@ -34,7 +34,8 @@ use serde_json::Value as JsonValue;
use tracing::warn;
use super::kind::DEFAULT_KIND;
-use super::snapshot::{META_ROOT, REMAKES, SnapshotRequest, VOTES};
+use super::snapshot::SnapshotRequest;
+use crate::document::meta::{self, REMAKES, VOTES};
use crate::document::replica::Epoch;
use crate::document::store::{self, StoreError};
@@ -334,7 +335,7 @@ impl Record {
// --- document access ---------------------------------------------------------
fn records_dir() -> Vec<String> {
- vec![META_ROOT.to_owned(), REMAKES.to_owned()]
+ meta::path(&[REMAKES])
}
pub(crate) fn record_path(id: &str, part: &str) -> Vec<String> {
@@ -424,12 +425,12 @@ fn contested_decision(doc: &AutoCommit, id: &str) -> Option<Decision> {
}
fn register_path(voter: &str) -> Vec<String> {
- vec![META_ROOT.to_owned(), VOTES.to_owned(), voter.to_owned()]
+ meta::path(&[VOTES, voter])
}
/// The votes register; unreadable entries are skipped with a warning.
pub(crate) fn load_register(doc: &AutoCommit) -> Register {
- store::keys_at(doc, &[META_ROOT.to_owned(), VOTES.to_owned()])
+ store::keys_at(doc, &meta::path(&[VOTES]))
.unwrap_or_default()
.into_iter()
.filter_map(|voter| {