Verb-noun-ify Nonce API (#7925)

* Verb-noun-ify Nonce API

* Unify instruction naming with API naming

The more verbose nonce_account/NonceAccount was chosen for clarity
that these instructions work on a unique species of system account
This commit is contained in:
Trent Nelson
2020-01-22 16:31:39 -07:00
committed by GitHub
parent 934c32cbc6
commit 964ff522be
7 changed files with 103 additions and 91 deletions

View File

@@ -110,8 +110,10 @@ impl Transaction {
nonce_authority_pubkey: &Pubkey,
nonce_hash: Hash,
) -> Self {
let nonce_ix =
system_instruction::nonce_advance(&nonce_account_pubkey, &nonce_authority_pubkey);
let nonce_ix = system_instruction::advance_nonce_account(
&nonce_account_pubkey,
&nonce_authority_pubkey,
);
instructions.insert(0, nonce_ix);
Self::new_signed_with_payer(instructions, payer, signing_keypairs, nonce_hash)
}