mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
cleanup
This commit is contained in:
@@ -375,13 +375,6 @@ async fn get_miner(rpc: &RpcClient, authority: Pubkey) -> Result<Miner, anyhow::
|
||||
Ok(*miner)
|
||||
}
|
||||
|
||||
async fn get_miner_old(rpc: &RpcClient, authority: Pubkey) -> Result<MinerOLD, anyhow::Error> {
|
||||
let miner_pda = ore_api::state::miner_pda(authority);
|
||||
let account = rpc.get_account(&miner_pda.0).await?;
|
||||
let miner = MinerOLD::try_from_bytes(&account.data)?;
|
||||
Ok(*miner)
|
||||
}
|
||||
|
||||
async fn get_clock(rpc: &RpcClient) -> Result<Clock, anyhow::Error> {
|
||||
let data = rpc.get_account_data(&solana_sdk::sysvar::clock::ID).await?;
|
||||
let clock = bincode::deserialize::<Clock>(&data)?;
|
||||
@@ -393,11 +386,6 @@ async fn get_miners(rpc: &RpcClient) -> Result<Vec<(Pubkey, Miner)>, anyhow::Err
|
||||
Ok(miners)
|
||||
}
|
||||
|
||||
async fn get_miners_old(rpc: &RpcClient) -> Result<Vec<(Pubkey, MinerOLD)>, anyhow::Error> {
|
||||
let miners = get_program_accounts::<MinerOLD>(rpc, ore_api::ID, vec![]).await?;
|
||||
Ok(miners)
|
||||
}
|
||||
|
||||
fn get_winning_square(slot_hash: &[u8]) -> u64 {
|
||||
// Use slot hash to generate a random u64
|
||||
let r1 = u64::from_le_bytes(slot_hash[0..8].try_into().unwrap());
|
||||
|
||||
Reference in New Issue
Block a user