Skip to content

Commit

Permalink
proof auth
Browse files Browse the repository at this point in the history
  • Loading branch information
HardhatChad committed Jul 29, 2024
1 parent f929e8f commit 04e194e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ore-cli"
version = "1.0.0-alpha.4"
version = "1.0.0-alpha.5"
description = "A command line interface for the ORE cryptocurrency mining."
license = "Apache-2.0"
edition = "2021"
Expand All @@ -24,8 +24,8 @@ colored = "2.0"
drillx = "2.0.0-beta.1"
futures = "0.3.30"
num_cpus = "1.16.0"
ore-api = "2.0.0-beta.4"
ore-utils = "2.0.0-beta.4"
ore-api = "2.0.0-beta.5"
ore-utils = "2.0.0-beta.5"
rand = "0.8.4"
solana-cli-config = "^1.18"
solana-client = "^1.18"
Expand Down
4 changes: 2 additions & 2 deletions src/close.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ use spl_token::amount_to_ui_amount;
use crate::{
args::ClaimArgs,
send_and_confirm::ComputeBudget,
utils::{ask_confirm, get_proof},
utils::{ask_confirm, get_proof_with_authority},
Miner,
};

impl Miner {
pub async fn close(&self) {
// Confirm proof exists
let signer = self.signer();
let proof = get_proof(&self.rpc_client, signer.pubkey()).await;
let proof = get_proof_with_authority(&self.rpc_client, signer.pubkey()).await;

// Confirm the user wants to close.
if !ask_confirm(
Expand Down
4 changes: 2 additions & 2 deletions src/mine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use solana_sdk::signer::Signer;
use crate::{
args::MineArgs,
send_and_confirm::ComputeBudget,
utils::{amount_u64_to_string, get_clock, get_config, get_proof_with_authority},
utils::{amount_u64_to_string, get_clock, get_config, get_proof_with_authority, proof_pubkey},
Miner,
};

Expand Down Expand Up @@ -54,7 +54,7 @@ impl Miner {

// Submit most difficult hash
let mut compute_budget = 500_000;
let mut ixs = vec![];
let mut ixs = vec![ore_api::instruction::auth(proof_pubkey(signer.pubkey()))];
if self.should_reset(config).await {
compute_budget += 100_000;
ixs.push(ore_api::instruction::reset(signer.pubkey()));
Expand Down

0 comments on commit 04e194e

Please sign in to comment.