Remove Transaction::new_signed
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use solana_drone::drone::{request_airdrop_transaction, run_local_drone};
|
||||
use solana_sdk::hash::Hash;
|
||||
use solana_sdk::message::Message;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_instruction::SystemInstruction;
|
||||
use solana_sdk::system_program;
|
||||
use solana_sdk::transaction::Transaction;
|
||||
use std::sync::mpsc::channel;
|
||||
|
||||
@@ -12,20 +12,9 @@ fn test_local_drone() {
|
||||
let to = Keypair::new().pubkey();
|
||||
let lamports = 50;
|
||||
let blockhash = Hash::new(&to.as_ref());
|
||||
let expected_instruction = SystemInstruction::CreateAccount {
|
||||
lamports,
|
||||
space: 0,
|
||||
program_id: system_program::id(),
|
||||
};
|
||||
let mut expected_tx = Transaction::new_signed(
|
||||
&keypair,
|
||||
&[to],
|
||||
&system_program::id(),
|
||||
&expected_instruction,
|
||||
blockhash,
|
||||
0,
|
||||
);
|
||||
expected_tx.sign(&[&keypair], blockhash);
|
||||
let create_instruction = SystemInstruction::new_account(&keypair.pubkey(), &to, lamports);
|
||||
let message = Message::new(vec![create_instruction]);
|
||||
let expected_tx = Transaction::new(&[&keypair], message, blockhash);
|
||||
|
||||
let (sender, receiver) = channel();
|
||||
run_local_drone(keypair, sender);
|
||||
|
Reference in New Issue
Block a user