challenge

This commit is contained in:
Hardhat Chad
2024-04-28 21:21:37 +00:00
parent 3ecf215151
commit 6d89872752
3 changed files with 5 additions and 5 deletions

View File

@@ -79,7 +79,7 @@ pub fn process_mine<'a, 'info>(
// Calculate the hash from the provided nonce
let noise_data = noise_info.data.borrow();
let hx = drillx::hash(&proof.hash, &args.nonce, &noise_data);
let hx = drillx::hash(&proof.challenge, &args.nonce, &noise_data);
drop(noise_data);
// Validate hash satisfies the minimnum difficulty
@@ -139,7 +139,7 @@ pub fn process_mine<'a, 'info>(
proof.balance = proof.balance.saturating_add(reward);
// Hash recent slot hash into the next challenge to prevent pre-mining attacks
proof.hash = hashv(&[
proof.challenge = hashv(&[
hx.as_slice(),
&slot_hashes_info.data.borrow()[0..size_of::<SlotHash>()],
])