Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfind committed Jan 6, 2025
1 parent a533964 commit 9782aaa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/sui-indexer-alt/src/handlers/coin_balance_buckets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ use sui_types::{
TypeTag,
};

/// This handler is used to track the balance buckets of address-owned coins.
/// The balance bucket is calculated using log10 of the coin balance.
/// Whenever a coin object's presence, owner or balance bucket changes,
/// we will insert a new row into the `coin_balance_buckets` table.
/// A Delete record will be inserted when a coin object is no longer present or no longer owned by an address.
pub(crate) struct CoinBalanceBuckets;

#[derive(Debug, PartialEq, Eq)]
Expand All @@ -43,7 +48,6 @@ impl Processor for CoinBalanceBuckets {
const NAME: &'static str = "coin_balance_buckets";
type Value = ProcessedCoinBalanceBucket;

// TODO: We need to add tests for this function.
fn process(&self, checkpoint: &Arc<CheckpointData>) -> Result<Vec<Self::Value>> {
let cp_sequence_number = checkpoint.checkpoint_summary.sequence_number;
let checkpoint_input_objects = checkpoint.checkpoint_input_objects();
Expand Down

0 comments on commit 9782aaa

Please sign in to comment.