Fix test_bank_storage

This commit is contained in:
Sagar Dhawan 2019-03-12 14:38:29 -07:00 committed by Grimes
parent 9f916f9d47
commit 7d7528eb18
1 changed files with 10 additions and 10 deletions

View File

@ -4,7 +4,7 @@ use solana_runtime::bank::Bank;
use solana_sdk::genesis_block::GenesisBlock;
use solana_sdk::hash::{hash, Hash};
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, KeypairUtil, Signature};
use solana_sdk::system_transaction::SystemTransaction;
use solana_storage_api::{StorageTransaction, ENTRIES_PER_SEGMENT};
@ -85,15 +85,15 @@ fn test_bank_storage() {
// TODO: This triggers a ProgramError(0, InvalidArgument). Why?
// Oddly, the assertions below it succeed without running this code.
//let entry_height = 0;
//let tx = StorageTransaction::new_mining_proof(
// &jack,
// Hash::default(),
// blockhash,
// entry_height,
// Signature::default(),
//);
//let _result = bank.process_transaction(&tx).unwrap();
let entry_height = 0;
let tx = StorageTransaction::new_mining_proof(
&bob,
Hash::default(),
blockhash,
entry_height,
Signature::default(),
);
let _result = bank.process_transaction(&tx).unwrap();
assert_eq!(
get_storage_entry_height(&bank, &bob.pubkey()),