The constraints on compute power a program can consume is limited only to its instruction count (#11717)
This commit is contained in:
@@ -8,7 +8,10 @@ extern crate solana_exchange_program;
|
||||
extern crate solana_vest_program;
|
||||
|
||||
use log::*;
|
||||
use solana_runtime::bank::{Bank, EnteredEpochCallback};
|
||||
use solana_runtime::{
|
||||
bank::{Bank, EnteredEpochCallback},
|
||||
message_processor::{DEFAULT_COMPUTE_BUDGET, DEFAULT_MAX_INVOKE_DEPTH},
|
||||
};
|
||||
use solana_sdk::{
|
||||
clock::Epoch, entrypoint_native::ProcessInstructionWithContext, genesis_config::OperatingMode,
|
||||
inflation::Inflation, pubkey::Pubkey,
|
||||
@@ -145,6 +148,9 @@ pub fn get_entered_epoch_callback(operating_mode: OperatingMode) -> EnteredEpoch
|
||||
} else {
|
||||
bank.set_cross_program_support(true);
|
||||
}
|
||||
|
||||
bank.set_max_invoke_depth(DEFAULT_MAX_INVOKE_DEPTH);
|
||||
bank.set_compute_budget(DEFAULT_COMPUTE_BUDGET);
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user