Instruction name swap

* Instruction -> GenericInstruction
* Instruction<u8, u8> -> CompiledInstruction
* Instruction<Pubkey, (Pubkey, bool)> -> Instruction
This commit is contained in:
Greg Fitzgerald
2019-03-15 09:47:25 -06:00
parent 66fb1bbb2e
commit 968022a1b0
13 changed files with 97 additions and 94 deletions

View File

@@ -5,7 +5,7 @@ use crate::pubkey::Pubkey;
use crate::signature::Keypair;
use crate::system_instruction::SystemInstruction;
use crate::system_program;
use crate::transaction::{Instruction, Transaction};
use crate::transaction::{CompiledInstruction, Transaction};
pub struct SystemTransaction {}
@@ -103,7 +103,7 @@ impl SystemTransaction {
.enumerate()
.map(|(i, (_, amount))| {
let spend = SystemInstruction::Move { lamports: *amount };
Instruction::new(0, &spend, vec![0, i as u8 + 1])
CompiledInstruction::new(0, &spend, vec![0, i as u8 + 1])
})
.collect();
let to_keys: Vec<_> = moves.iter().map(|(to_key, _)| *to_key).collect();