Skip to content

Commit

Permalink
Rename reputation to cache_reputation
Browse files Browse the repository at this point in the history
  • Loading branch information
yanliu38 committed Sep 12, 2024
1 parent 0dfd0c4 commit 3836833
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions common/src/reputation.rs → common/src/cache_reputation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl ReputationChange {
/// Reductions of account reputations, applied to all accounts
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, PartialEq, Eq)]
pub struct ReputationAgeV1 {
reductions_ppm: u64,
age_reductions_ppm: u64,
}

#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, PartialEq, Eq)]
Expand All @@ -115,13 +115,13 @@ pub enum ReputationAge {
}

impl ReputationAge {
pub fn new(reductions_ppm: u64) -> Self {
Self::V1(ReputationAgeV1 { reductions_ppm })
pub fn new(age_reductions_ppm: u64) -> Self {
Self::V1(ReputationAgeV1 { age_reductions_ppm })
}

pub fn reductions_ppm(&self) -> u64 {
match self {
ReputationAge::V1(r) => r.reductions_ppm,
ReputationAge::V1(r) => r.age_reductions_ppm,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
pub mod account_transfers;
pub mod account_transfers_errors;
pub mod cache_balances;
pub mod cache_reputation;
pub mod cache_transactions;
pub mod dcc_identity;
pub mod ledger_cursor;
pub mod ledger_refresh;
pub mod offerings;
pub mod profiles;
pub mod registration;
pub mod reputation;
pub mod rewards;

pub use account_transfers::*;
pub use account_transfers_errors::TransferError;
pub use cache_balances::*;
pub use cache_reputation::*;
pub use cache_transactions::*;
use candid::Principal;
pub use dcc_identity::{slice_to_32_bytes_array, slice_to_64_bytes_array};
Expand All @@ -23,7 +24,6 @@ pub use ledger_refresh::*;
pub use offerings::*;
pub use profiles::*;
pub use registration::*;
pub use reputation::*;
pub use rewards::*;

#[cfg(not(target_arch = "wasm32"))]
Expand Down

0 comments on commit 3836833

Please sign in to comment.