From 963c9f7909b080109330f5aa79f41a41eb5ea408 Mon Sep 17 00:00:00 2001 From: Hardhat Chad Date: Tue, 30 Apr 2024 20:48:58 +0000 Subject: [PATCH] comments --- src/lib.rs | 1 - src/processor/mine.rs | 2 -- src/state/bus.rs | 5 +++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d1a0e83..dbf8573 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,7 +14,6 @@ use solana_program::{ program_error::ProgramError, pubkey::Pubkey, }; -// TODO Alternative to bincode? // TODO Is downgrade necessary? declare_id!("mineRHF5r6S7HyD9SppBfVMXMavDkJsxwGesEvxZr2A"); diff --git a/src/processor/mine.rs b/src/processor/mine.rs index abb4c75..16fda06 100644 --- a/src/processor/mine.rs +++ b/src/processor/mine.rs @@ -24,8 +24,6 @@ use crate::{ COMPUTE_BUDGET_PROGRAM_ID, MIN_DIFFICULTY, ONE_MINUTE, TWO_YEARS, }; -// TODO Look into tx introspection to require 1 hash per tx - /// Mine is the primary workhorse instruction of the Ore program. Its responsibilities include: /// 1. Calculate the hash from the provided nonce. /// 2. Payout rewards based on difficulty, staking multiplier, and liveness penalty. diff --git a/src/state/bus.rs b/src/state/bus.rs index a143fe1..e3fef7c 100644 --- a/src/state/bus.rs +++ b/src/state/bus.rs @@ -15,10 +15,11 @@ pub struct Bus { /// The ID of the bus account. pub id: u64, - /// The quantity of rewards this bus has left to issue in the current epoch epoch. + /// The remaining rewards this bus has left to payout in the current epoch epoch. pub rewards: u64, - /// The rewards that would have been paid out by this bus in the current epoch if the bus had no limit. + /// The rewards this bus would have paid out in the current epoch if there no limit. + /// Used to calculate the updated reward rate. pub theoretical_rewards: u64, }