Save RNG for generating random storage sampling offsets (#4450)

* Save RNG for generating random storage sampling offsets

* fix clippy

* fix stable-perf

* fix chacha
This commit is contained in:
Pankaj Garg
2019-05-28 14:14:46 -07:00
committed by GitHub
parent 9fcd162412
commit c8a03c7b3d
4 changed files with 31 additions and 12 deletions

View File

@@ -22,6 +22,7 @@ pub enum StorageInstruction {
sha_state: Hash,
slot: u64,
signature: Signature,
proof_index: u64,
},
AdvertiseStorageRecentBlockhash {
hash: Hash,
@@ -109,11 +110,13 @@ pub fn mining_proof(
sha_state: Hash,
slot: u64,
signature: Signature,
proof_index: u64,
) -> Instruction {
let storage_instruction = StorageInstruction::SubmitMiningProof {
sha_state,
slot,
signature,
proof_index,
};
let account_metas = vec![AccountMeta::new(*storage_pubkey, true)];
Instruction::new(id(), &storage_instruction, account_metas)