Transaction format changes toward Credit-Only accounts (#4386)
* Add num_readonly_accounts slice * Impl programs in account_keys * Emulate current account-loading functionality using program-account_keys (breaks exchange_program_api tests) * Fix test * Add temporary exchange faucet id * Update chacha golden * Split num_credit_only_accounts into separate fields * Improve readability * Move message field constants into Message * Add MessageHeader struct and fixup comments
This commit is contained in:
@ -209,8 +209,9 @@ mod tests {
|
||||
let mut message = Message::new(vec![instruction]);
|
||||
|
||||
// Attack! Part 2: Point the instruction to the expected, but unsigned, key.
|
||||
message.account_keys.push(alice_pubkey);
|
||||
message.account_keys.insert(3, alice_pubkey);
|
||||
message.instructions[0].accounts[0] = 3;
|
||||
message.instructions[0].program_ids_index = 4;
|
||||
|
||||
// Ensure the transaction fails because of the unsigned key.
|
||||
assert_eq!(
|
||||
@ -257,8 +258,9 @@ mod tests {
|
||||
let mut message = Message::new(vec![instruction]);
|
||||
|
||||
// Attack! Part 2: Point the instruction to the expected, but unsigned, key.
|
||||
message.account_keys.push(alice_pubkey);
|
||||
message.account_keys.insert(3, alice_pubkey);
|
||||
message.instructions[0].accounts[0] = 3;
|
||||
message.instructions[0].program_ids_index = 4;
|
||||
|
||||
// Ensure the transaction fails because of the unsigned key.
|
||||
assert_eq!(
|
||||
|
Reference in New Issue
Block a user