@@ -7206,12 +7206,10 @@ fn test_bpf_loader_upgradeable_deploy_with_max_len() {
7206
7206
invocation_message. clone ( ) ,
7207
7207
bank. last_blockhash ( ) ,
7208
7208
) ;
7209
+ // See comments below at line 7230.
7209
7210
assert_eq ! (
7210
7211
bank. process_transaction( & transaction) ,
7211
- Err ( TransactionError :: InstructionError (
7212
- 0 ,
7213
- InstructionError :: InvalidAccountData
7214
- ) ) ,
7212
+ Err ( TransactionError :: InvalidProgramForExecution ) ,
7215
7213
) ;
7216
7214
{
7217
7215
let program_cache = bank. transaction_processor . program_cache . read ( ) . unwrap ( ) ;
@@ -7230,12 +7228,14 @@ fn test_bpf_loader_upgradeable_deploy_with_max_len() {
7230
7228
let instruction = Instruction :: new_with_bytes ( buffer_address, & [ ] , Vec :: new ( ) ) ;
7231
7229
let message = Message :: new ( & [ instruction] , Some ( & mint_keypair. pubkey ( ) ) ) ;
7232
7230
let transaction = Transaction :: new ( & [ & binding] , message, bank. last_blockhash ( ) ) ;
7231
+ // This is a slightly change of behavior for this PR. In the old code, we
7232
+ // short-circuit buffer account to fake it and mark it executable. So it
7233
+ // passed program execution check but failed with `Err(InstructionError(0, InvalidAccountData))`.
7234
+ // With this PR, we don't do that. The buffer account will NOT be executable. A different error is throw `Err(InvalidProgramForExecution)`.
7235
+ // This will break consensus unfortunately! Maybe a feature gate is required for this PR?
7233
7236
assert_eq ! (
7234
7237
bank. process_transaction( & transaction) ,
7235
- Err ( TransactionError :: InstructionError (
7236
- 0 ,
7237
- InstructionError :: InvalidAccountData ,
7238
- ) ) ,
7238
+ Err ( TransactionError :: InvalidProgramForExecution ) ,
7239
7239
) ;
7240
7240
{
7241
7241
let program_cache = bank. transaction_processor . program_cache . read ( ) . unwrap ( ) ;
0 commit comments