mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 20:21:03 +00:00
committed by
GitHub
parent
14a4eed2aa
commit
b9854171c0
@@ -18,7 +18,7 @@
|
||||
|
||||
//! Schema for BEEFY state persisted in the aux-db.
|
||||
|
||||
use crate::worker::PersistedState;
|
||||
use crate::{worker::PersistedState, LOG_TARGET};
|
||||
use codec::{Decode, Encode};
|
||||
use log::{info, trace};
|
||||
use sc_client_api::{backend::AuxStore, Backend};
|
||||
@@ -31,7 +31,7 @@ const WORKER_STATE: &[u8] = b"beefy_voter_state";
|
||||
const CURRENT_VERSION: u32 = 1;
|
||||
|
||||
pub(crate) fn write_current_version<B: AuxStore>(backend: &B) -> ClientResult<()> {
|
||||
info!(target: "beefy", "🥩 write aux schema version {:?}", CURRENT_VERSION);
|
||||
info!(target: LOG_TARGET, "🥩 write aux schema version {:?}", CURRENT_VERSION);
|
||||
AuxStore::insert_aux(backend, &[(VERSION_KEY, CURRENT_VERSION.encode().as_slice())], &[])
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ pub(crate) fn write_voter_state<Block: BlockT, B: AuxStore>(
|
||||
backend: &B,
|
||||
state: &PersistedState<Block>,
|
||||
) -> ClientResult<()> {
|
||||
trace!(target: "beefy", "🥩 persisting {:?}", state);
|
||||
trace!(target: LOG_TARGET, "🥩 persisting {:?}", state);
|
||||
backend.insert_aux(&[(WORKER_STATE, state.encode().as_slice())], &[])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user