mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-22 07:26:52 +00:00
block based sha256 mining
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
mod bus;
|
||||
mod config;
|
||||
mod proof;
|
||||
mod treasury;
|
||||
|
||||
pub use bus::*;
|
||||
pub use config::*;
|
||||
pub use proof::*;
|
||||
pub use treasury::*;
|
||||
@@ -15,17 +13,11 @@ use crate::consts::*;
|
||||
#[repr(u8)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
|
||||
pub enum OreAccount {
|
||||
Bus = 100,
|
||||
Config = 101,
|
||||
Proof = 102,
|
||||
Treasury = 103,
|
||||
}
|
||||
|
||||
/// Fetch the PDA of a bus account.
|
||||
pub fn bus_pda(id: u8) -> (Pubkey, u8) {
|
||||
Pubkey::find_program_address(&[BUS, &[id]], &crate::id())
|
||||
}
|
||||
|
||||
/// Derive the PDA of the config account.
|
||||
pub fn config_pda() -> (Pubkey, u8) {
|
||||
Pubkey::find_program_address(&[CONFIG], &crate::id())
|
||||
|
||||
Reference in New Issue
Block a user