diff --git a/src/lib.rs b/src/lib.rs index 8a26acc..d6c17cf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,6 +16,7 @@ use solana_program::{ // TODO Admin fn for min difficulty? // TODO Admin fn for spam/liveness tolerances? +// TODO Alternative to bincode? // TODO Is downgrade necessary? declare_id!("mineRHF5r6S7HyD9SppBfVMXMavDkJsxwGesEvxZr2A"); diff --git a/src/processor/mine.rs b/src/processor/mine.rs index 0ce5c83..525b0ea 100644 --- a/src/processor/mine.rs +++ b/src/processor/mine.rs @@ -94,7 +94,7 @@ pub fn process_mine<'a, 'info>( .saturating_mul(2u64.saturating_pow(difficulty)); sol_log(&format!("Base {}", reward)); - // Apply staking multiplier, only if last deposit was at least 1 block ago to prevent flash loan attacks + // Apply staking multiplier, only if last deposit was at least 1 block ago to prevent flash loan attacks. if clock.slot.gt(&proof.last_deposit_slot) { // TODO Move staking requirement into config? Admin adjustable? let max_stake = reward.saturating_mul(TWO_YEARS); diff --git a/src/state/bus.rs b/src/state/bus.rs index b26b726..a143fe1 100644 --- a/src/state/bus.rs +++ b/src/state/bus.rs @@ -15,12 +15,10 @@ pub struct Bus { /// The ID of the bus account. pub id: u64, - // TODO Update logic to count up rather than down - /// The quantity of rewards this bus can issue in the current epoch epoch. + /// The quantity of rewards this bus has left to issue in the current epoch epoch. pub rewards: u64, - // TODO Come up with better name - /// The rewards that would have been paid out this epoch if the bus had no limit. + /// The rewards that would have been paid out by this bus in the current epoch if the bus had no limit. pub theoretical_rewards: u64, }