Remove Instruction wrapper structs and name functions after enum fields

This commit is contained in:
Greg Fitzgerald
2019-04-03 09:45:57 -06:00
committed by Grimes
parent 867f6f107b
commit 35298e01a8
53 changed files with 835 additions and 922 deletions

View File

@@ -200,7 +200,7 @@ mod tests {
use super::*;
use crate::instruction::AccountMeta;
use crate::signature::Keypair;
use crate::system_instruction::SystemInstruction;
use crate::system_instruction;
use bincode::{deserialize, serialize, serialized_size};
use std::mem::size_of;
@@ -321,7 +321,7 @@ mod tests {
let alice_keypair = Keypair::new();
let alice_pubkey = alice_keypair.pubkey();
let bob_pubkey = Pubkey::new_rand();
let ix = SystemInstruction::new_transfer(&alice_pubkey, &bob_pubkey, 42);
let ix = system_instruction::transfer(&alice_pubkey, &bob_pubkey, 42);
let expected_data_size = size_of::<u32>() + size_of::<u64>();
assert_eq!(expected_data_size, 12);