Move nonce into system program (#7645)

automerge
This commit is contained in:
Trent Nelson
2020-01-03 19:34:58 -05:00
committed by Grimes
parent 7002ccb866
commit 7e94cc2cc3
16 changed files with 1138 additions and 858 deletions

View File

@@ -3,10 +3,10 @@
use crate::hash::Hash;
use crate::instruction::{CompiledInstruction, Instruction, InstructionError};
use crate::message::Message;
use crate::nonce_instruction;
use crate::pubkey::Pubkey;
use crate::short_vec;
use crate::signature::{KeypairUtil, Signature};
use crate::system_instruction;
use bincode::serialize;
use std::result;
@@ -103,7 +103,8 @@ impl Transaction {
nonce_authority_pubkey: &Pubkey,
nonce_hash: Hash,
) -> Self {
let nonce_ix = nonce_instruction::nonce(&nonce_account_pubkey, &nonce_authority_pubkey);
let nonce_ix =
system_instruction::nonce_advance(&nonce_account_pubkey, &nonce_authority_pubkey);
instructions.insert(0, nonce_ix);
Self::new_signed_with_payer(instructions, payer, signing_keypairs, nonce_hash)
}