@@ -551,7 +551,7 @@ impl PartialEq for Bank {
551
551
epoch_stakes,
552
552
is_delta,
553
553
// TODO: Confirm if all these fields are intentionally ignored!
554
- builtin_programs : _,
554
+ builtin_program_ids : _,
555
555
runtime_config : _,
556
556
rewards : _,
557
557
cluster_type : _,
@@ -779,7 +779,7 @@ pub struct Bank {
779
779
/// stream for the slot == self.slot
780
780
is_delta : AtomicBool ,
781
781
782
- builtin_programs : HashSet < Pubkey > ,
782
+ builtin_program_ids : HashSet < Pubkey > ,
783
783
784
784
/// Optional config parameters that can override runtime behavior
785
785
pub ( crate ) runtime_config : Arc < RuntimeConfig > ,
@@ -1001,7 +1001,7 @@ impl Bank {
1001
1001
stakes_cache : StakesCache :: default ( ) ,
1002
1002
epoch_stakes : HashMap :: < Epoch , EpochStakes > :: default ( ) ,
1003
1003
is_delta : AtomicBool :: default ( ) ,
1004
- builtin_programs : HashSet :: < Pubkey > :: default ( ) ,
1004
+ builtin_program_ids : HashSet :: < Pubkey > :: default ( ) ,
1005
1005
runtime_config : Arc :: < RuntimeConfig > :: default ( ) ,
1006
1006
rewards : RwLock :: < Vec < ( Pubkey , RewardInfo ) > > :: default ( ) ,
1007
1007
cluster_type : Option :: < ClusterType > :: default ( ) ,
@@ -1258,8 +1258,8 @@ impl Bank {
1258
1258
1259
1259
let ( epoch_stakes, epoch_stakes_time_us) = measure_us ! ( parent. epoch_stakes. clone( ) ) ;
1260
1260
1261
- let ( builtin_programs , builtin_programs_time_us ) =
1262
- measure_us ! ( parent. builtin_programs . clone( ) ) ;
1261
+ let ( builtin_program_ids , builtin_program_ids_time_us ) =
1262
+ measure_us ! ( parent. builtin_program_ids . clone( ) ) ;
1263
1263
1264
1264
let ( rewards_pool_pubkeys, rewards_pool_pubkeys_time_us) =
1265
1265
measure_us ! ( parent. rewards_pool_pubkeys. clone( ) ) ;
@@ -1315,7 +1315,7 @@ impl Bank {
1315
1315
ancestors : Ancestors :: default ( ) ,
1316
1316
hash : RwLock :: new ( Hash :: default ( ) ) ,
1317
1317
is_delta : AtomicBool :: new ( false ) ,
1318
- builtin_programs ,
1318
+ builtin_program_ids ,
1319
1319
tick_height : AtomicU64 :: new ( parent. tick_height . load ( Relaxed ) ) ,
1320
1320
signature_count : AtomicU64 :: new ( 0 ) ,
1321
1321
runtime_config : parent. runtime_config . clone ( ) ,
@@ -1477,7 +1477,7 @@ impl Bank {
1477
1477
blockhash_queue_time_us,
1478
1478
stakes_cache_time_us,
1479
1479
epoch_stakes_time_us,
1480
- builtin_programs_time_us ,
1480
+ builtin_program_ids_time_us ,
1481
1481
rewards_pool_pubkeys_time_us,
1482
1482
executor_cache_time_us : 0 ,
1483
1483
transaction_debug_keys_time_us,
@@ -1872,7 +1872,7 @@ impl Bank {
1872
1872
stakes_cache : StakesCache :: new ( stakes) ,
1873
1873
epoch_stakes : fields. epoch_stakes ,
1874
1874
is_delta : AtomicBool :: new ( fields. is_delta ) ,
1875
- builtin_programs : HashSet :: < Pubkey > :: default ( ) ,
1875
+ builtin_program_ids : HashSet :: < Pubkey > :: default ( ) ,
1876
1876
runtime_config,
1877
1877
rewards : RwLock :: new ( vec ! [ ] ) ,
1878
1878
cluster_type : Some ( genesis_config. cluster_type ) ,
@@ -4681,7 +4681,7 @@ impl Bank {
4681
4681
recording_config,
4682
4682
timings,
4683
4683
account_overrides,
4684
- self . builtin_programs . iter ( ) ,
4684
+ self . builtin_program_ids . iter ( ) ,
4685
4685
log_messages_bytes_limit,
4686
4686
limit_to_load_programs,
4687
4687
) ;
@@ -6162,6 +6162,10 @@ impl Bank {
6162
6162
}
6163
6163
}
6164
6164
6165
+ pub ( crate ) fn get_builtin_program_ids ( & self ) -> & HashSet < Pubkey > {
6166
+ & self . builtin_program_ids
6167
+ }
6168
+
6165
6169
// Hi! leaky abstraction here....
6166
6170
// try to use get_account_with_fixed_root() if it's called ONLY from on-chain runtime account
6167
6171
// processing. That alternative fn provides more safety.
@@ -7190,7 +7194,7 @@ impl Bank {
7190
7194
pub fn add_builtin ( & mut self , program_id : Pubkey , name : String , builtin : LoadedProgram ) {
7191
7195
debug ! ( "Adding program {} under {:?}" , name, program_id) ;
7192
7196
self . add_builtin_account ( name. as_str ( ) , & program_id, false ) ;
7193
- self . builtin_programs . insert ( program_id) ;
7197
+ self . builtin_program_ids . insert ( program_id) ;
7194
7198
self . program_cache
7195
7199
. write ( )
7196
7200
. unwrap ( )
0 commit comments