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

@ -363,7 +363,7 @@ pub fn create_nonce_account(
]
}
pub fn nonce_advance(nonce_pubkey: &Pubkey, authorized_pubkey: &Pubkey) -> Instruction {
pub fn advance_nonce_account(nonce_pubkey: &Pubkey, authorized_pubkey: &Pubkey) -> Instruction {
let account_metas = vec![
AccountMeta::new(*nonce_pubkey, false),
AccountMeta::new_readonly(recent_blockhashes::id(), false),
@ -376,7 +376,7 @@ pub fn nonce_advance(nonce_pubkey: &Pubkey, authorized_pubkey: &Pubkey) -> Instr
)
}
pub fn nonce_withdraw(
pub fn withdraw_nonce_account(
nonce_pubkey: &Pubkey,
authorized_pubkey: &Pubkey,
to_pubkey: &Pubkey,
@ -396,7 +396,7 @@ pub fn nonce_withdraw(
)
}
pub fn nonce_authorize(
pub fn authorize_nonce_account(
nonce_pubkey: &Pubkey,
authorized_pubkey: &Pubkey,
new_authority: &Pubkey,