mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-22 23:16:46 +00:00
remove hash arg and move nonce to front of digest
This commit is contained in:
@@ -118,7 +118,6 @@ pub struct RegisterArgs {
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
|
||||
pub struct MineArgs {
|
||||
pub hash: Hash,
|
||||
pub nonce: [u8; 8],
|
||||
}
|
||||
|
||||
@@ -208,7 +207,7 @@ pub fn register(signer: Pubkey) -> Instruction {
|
||||
}
|
||||
|
||||
/// Builds a mine instruction.
|
||||
pub fn mine(signer: Pubkey, bus: Pubkey, hash: Hash, nonce: u64) -> Instruction {
|
||||
pub fn mine(signer: Pubkey, bus: Pubkey, nonce: u64) -> Instruction {
|
||||
let proof = Pubkey::find_program_address(&[PROOF, signer.as_ref()], &crate::id()).0;
|
||||
Instruction {
|
||||
program_id: crate::id(),
|
||||
@@ -222,7 +221,6 @@ pub fn mine(signer: Pubkey, bus: Pubkey, hash: Hash, nonce: u64) -> Instruction
|
||||
data: [
|
||||
OreInstruction::Mine.to_vec(),
|
||||
MineArgs {
|
||||
hash,
|
||||
nonce: nonce.to_le_bytes(),
|
||||
}
|
||||
.to_bytes()
|
||||
|
||||
Reference in New Issue
Block a user