Skip to content

Commit dc44d29

Browse files
committed
fixup! pyth: introduce pyth accumulator library
1 parent 4a637ba commit dc44d29

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

runtime/src/bank.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,10 +2510,11 @@ impl Bank {
25102510
.feature_set
25112511
.is_active(&feature_set::enable_accumulator_sysvar::id())
25122512
{
2513+
info!("Accumulator: Skipping because the feature is disabled. Slot: {}", self.slot());
25132514
return;
25142515
}
25152516

2516-
info!("Updating accumulator. Parent_epoch: {}", self.slot());
2517+
info!("Accumulator: Updating accumulator. Slot: {}", self.slot());
25172518
if let Err(e) = self.update_accumulator_impl() {
25182519
error!("Error updating accumulator: {:?}", e);
25192520
}
@@ -2624,6 +2625,7 @@ impl Bank {
26242625

26252626
// Write the Account Set into `accumulator_state` so that the hermes application can
26262627
// request historical data to prove.
2628+
info!("Accumulator: Writing accumulator state to {:?}", accumulator_account);
26272629
self.store_account_and_update_capitalization(&accumulator_account, &accumulator_data);
26282630

26292631
Ok(())
@@ -2663,7 +2665,7 @@ impl Bank {
26632665
.unwrap_or(AccumulatorSequenceTracker { sequence: 0 })
26642666
};
26652667

2666-
info!("accumulator sequence: {:?}", sequence.sequence);
2668+
debug!("Accumulator: accumulator sequence: {:?}", sequence.sequence);
26672669

26682670
// Generate the Message to emit via Wormhole.
26692671
let message = PostedMessageUnreliableData {
@@ -2681,7 +2683,7 @@ impl Bank {
26812683
},
26822684
};
26832685

2684-
info!("msg_data.message: {:?}", message.message);
2686+
debug!("Accumulator: Wormhole message data: {:?}", message.message);
26852687
let wormhole_pid = self.env_pubkey_or(
26862688
"WORMHOLE_PID",
26872689
Pubkey::new_from_array(pythnet::WORMHOLE_PID),
@@ -2720,6 +2722,8 @@ impl Bank {
27202722
);
27212723

27222724
self.store_account_and_update_capitalization(&accumulator_sequence_addr, &sequence_account);
2725+
2726+
info!("Accumulator: Writing wormhole message to {:?}", message_pda);
27232727
self.store_account_and_update_capitalization(&message_pda, &message_account);
27242728

27252729
Ok(())

0 commit comments

Comments
 (0)