Skip to content

Commit 4977752

Browse files
committed
fix: other tests
1 parent 9e3a803 commit 4977752

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

runtime/src/bank/pyth_accumulator.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ pub fn update_v2(bank: &Bank) -> std::result::Result<(), AccumulatorUpdateErrorV
419419
measure.as_us()
420420
);
421421

422-
423422
let mut any_v1_aggregations = false;
424423
let mut v2_messages = Vec::new();
425424

@@ -488,7 +487,9 @@ pub fn compute_publisher_stake_caps(
488487
measure.stop();
489488
info!(
490489
"PublisherStakeCaps: Computed publisher stake caps with m : {} and z : {} in {} us",
491-
parameters.m, parameters.z, measure.as_us()
490+
parameters.m,
491+
parameters.z,
492+
measure.as_us()
492493
);
493494

494495
if bank

runtime/src/bank/pyth_accumulator_tests.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use {
1616
byteorder::{ByteOrder, LittleEndian, ReadBytesExt},
1717
itertools::Itertools,
1818
pyth_oracle::{
19-
solana_program::{account_info::AccountInfo},
20-
PriceAccount, PriceAccountFlags, PythAccount, PythOracleSerialize,
19+
solana_program::account_info::AccountInfo, PriceAccount, PriceAccountFlags, PythAccount,
20+
PythOracleSerialize,
2121
},
2222
pythnet_sdk::{
2323
accumulators::{merkle::MerkleAccumulator, Accumulator},
@@ -134,6 +134,10 @@ fn test_update_accumulator_sysvar() {
134134
.accounts
135135
.remove(&feature_set::move_accumulator_to_end_of_block::id())
136136
.unwrap();
137+
genesis_config
138+
.accounts
139+
.remove(&feature_set::add_publisher_stake_caps_to_the_accumulator::id())
140+
.unwrap();
137141

138142
// Set epoch length to 32 so we can advance epochs quickly. We also skip past slot 0 here
139143
// due to slot 0 having special handling.
@@ -413,6 +417,10 @@ fn test_update_accumulator_end_of_block() {
413417
.accounts
414418
.remove(&feature_set::move_accumulator_to_end_of_block::id())
415419
.unwrap();
420+
genesis_config
421+
.accounts
422+
.remove(&feature_set::add_publisher_stake_caps_to_the_accumulator::id())
423+
.unwrap();
416424

417425
// Set epoch length to 32 so we can advance epochs quickly. We also skip past slot 0 here
418426
// due to slot 0 having special handling.
@@ -1111,6 +1119,7 @@ fn test_get_accumulator_keys() {
11111119
Pubkey::new_from_array(pythnet::ACCUMULATOR_SEQUENCE_ADDR),
11121120
Pubkey::new_from_array(pythnet::WORMHOLE_PID),
11131121
*ORACLE_PID,
1122+
*STAKE_CAPS_PARAMETERS_ADDR,
11141123
];
11151124
assert_eq!(accumulator_keys, expected_pyth_keys);
11161125
}

0 commit comments

Comments
 (0)