Integrate Message into Transaction

This commit is contained in:
Greg Fitzgerald
2019-03-29 10:05:06 -06:00
committed by Grimes
parent 98d60e6124
commit 31f8b6d352
14 changed files with 197 additions and 177 deletions

View File

@ -352,13 +352,14 @@ mod tests {
let mut drone = Drone::new(mint, None, None);
let tx = drone.build_airdrop_transaction(request).unwrap();
let message = tx.message();
assert_eq!(tx.signatures.len(), 1);
assert_eq!(tx.account_keys, vec![mint_pubkey, to]);
assert_eq!(tx.recent_blockhash, blockhash);
assert_eq!(message.account_keys, vec![mint_pubkey, to]);
assert_eq!(message.recent_blockhash, blockhash);
assert_eq!(tx.instructions.len(), 1);
let instruction: SystemInstruction = deserialize(&tx.instructions[0].data).unwrap();
assert_eq!(message.instructions.len(), 1);
let instruction: SystemInstruction = deserialize(&message.instructions[0].data).unwrap();
assert_eq!(
instruction,
SystemInstruction::CreateAccount {