mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-21 07:26:48 +00:00
cleanup
This commit is contained in:
@@ -4,12 +4,6 @@ use crate::state::block_pda;
|
||||
|
||||
use super::OreAccount;
|
||||
|
||||
// What could be variable?
|
||||
// - Payout style (winner take all / difficulty / both)
|
||||
// - Payout skew (larger / neutral / smaller)
|
||||
// - Jackpot possiblity (yes / no)
|
||||
// - Known / unknown
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct Block {
|
||||
@@ -20,42 +14,19 @@ pub struct Block {
|
||||
pub opener: Pubkey,
|
||||
|
||||
/// The reward configuration.
|
||||
pub reward: RewardConfig,
|
||||
pub reward: u64,
|
||||
|
||||
/// The hash of the starting slot.
|
||||
pub slot_hash: [u8; 32],
|
||||
|
||||
/// The starting slot of the block.
|
||||
pub start_slot: u64,
|
||||
|
||||
/// The total number of hashes submitted to the block.
|
||||
pub total_committed: u64,
|
||||
|
||||
/// The total number of hashes deployed to the block.
|
||||
pub total_deployed: u64,
|
||||
|
||||
/// The total amount of rewards paid out to miners.
|
||||
pub total_rewards: u64,
|
||||
}
|
||||
|
||||
/// Configuration specifying how rewards are paid out.
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)]
|
||||
pub struct RewardConfig {
|
||||
/// The reward paid to the submitter of the best hash.
|
||||
pub lode_reward: u64,
|
||||
/// The best hash submitted to the block.
|
||||
pub best_hash: [u8; 32],
|
||||
|
||||
/// The authority of the miner who submitted the best hash.
|
||||
pub lode_authority: Pubkey,
|
||||
pub best_hash_miner: Pubkey,
|
||||
|
||||
/// The best hash.
|
||||
pub lode_hash: [u8; 32],
|
||||
/// The hash of the starting slot, used for random number generation.
|
||||
pub slot_hash: [u8; 32],
|
||||
|
||||
/// The reward rate paid to hashes satisfying the difficulty threshold.
|
||||
pub nugget_reward: u64,
|
||||
|
||||
/// The minimum difficulty required for payout.
|
||||
pub nugget_threshold: u64,
|
||||
/// The total amount of hashpower bought in the block.
|
||||
pub total_hashpower: u64,
|
||||
}
|
||||
|
||||
impl Block {
|
||||
|
||||
Reference in New Issue
Block a user