terminology update, nonce to bump seed (#12840)

This commit is contained in:
Jack May
2020-10-13 10:11:08 -07:00
committed by GitHub
parent 14d793b22c
commit 56211378d3
6 changed files with 50 additions and 41 deletions

View File

@@ -480,11 +480,11 @@ fn test_program_bpf_invoke() {
let account = Account::new(84, 0, &solana_sdk::system_program::id());
bank.store_account(&from_keypair.pubkey(), &account);
let (derived_key1, nonce1) =
let (derived_key1, bump_seed1) =
Pubkey::find_program_address(&[b"You pass butter"], &invoke_program_id);
let (derived_key2, nonce2) =
let (derived_key2, bump_seed2) =
Pubkey::find_program_address(&[b"Lil'", b"Bits"], &invoked_program_id);
let (derived_key3, nonce3) =
let (derived_key3, bump_seed3) =
Pubkey::find_program_address(&[derived_key2.as_ref()], &invoked_program_id);
let mint_pubkey = mint_keypair.pubkey();
@@ -506,7 +506,7 @@ fn test_program_bpf_invoke() {
let instruction = Instruction::new(
invoke_program_id,
&[TEST_SUCCESS, nonce1, nonce2, nonce3],
&[TEST_SUCCESS, bump_seed1, bump_seed2, bump_seed3],
account_metas.clone(),
);
let message = Message::new(&[instruction], Some(&mint_pubkey));
@@ -548,7 +548,7 @@ fn test_program_bpf_invoke() {
let instruction = Instruction::new(
invoke_program_id,
&[TEST_PRIVILEGE_ESCALATION_SIGNER, nonce1, nonce2, nonce3],
&[TEST_PRIVILEGE_ESCALATION_SIGNER, bump_seed1, bump_seed2, bump_seed3],
account_metas.clone(),
);
let message = Message::new(&[instruction], Some(&mint_pubkey));
@@ -576,7 +576,7 @@ fn test_program_bpf_invoke() {
let instruction = Instruction::new(
invoke_program_id,
&[TEST_PRIVILEGE_ESCALATION_WRITABLE, nonce1, nonce2, nonce3],
&[TEST_PRIVILEGE_ESCALATION_WRITABLE, bump_seed1, bump_seed2, bump_seed3],
account_metas.clone(),
);
let message = Message::new(&[instruction], Some(&mint_pubkey));
@@ -603,7 +603,7 @@ fn test_program_bpf_invoke() {
let instruction = Instruction::new(
invoke_program_id,
&[TEST_PPROGRAM_NOT_EXECUTABLE, nonce1, nonce2, nonce3],
&[TEST_PPROGRAM_NOT_EXECUTABLE, bump_seed1, bump_seed2, bump_seed3],
account_metas.clone(),
);
let message = Message::new(&[instruction], Some(&mint_pubkey));