Skip to content

Commit 3cd8a4e

Browse files
committed
fixup! pyth: introduce pyth accumulator library
1 parent 831aa26 commit 3cd8a4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

runtime/src/bank.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2656,6 +2656,11 @@ impl Bank {
26562656
Pubkey::new_from_array(pythnet::ACCUMULATOR_SEQUENCE_ADDR),
26572657
)?;
26582658

2659+
let accumulator_emitter_addr = self.env_pubkey_or(
2660+
"ACCUMULATOR_EMITTER_ADDR",
2661+
Pubkey::new_from_array(ACCUMULATOR_EMITTER_ADDRESS),
2662+
)?;
2663+
26592664
// Wormhole uses a Sequence account that is incremented each time a message is posted. As
26602665
// we aren't calling Wormhole we need to bump this ourselves. If it doesn't exist, we just
26612666
// create it instead.
@@ -2681,7 +2686,7 @@ impl Bank {
26812686
nonce: 0,
26822687
sequence: sequence.sequence,
26832688
emitter_chain: 26,
2684-
emitter_address: ACCUMULATOR_EMITTER_ADDRESS,
2689+
emitter_address: accumulator_emitter_addr.to_bytes(),
26852690
payload: acc.serialize(self.slot(), ACCUMULATOR_RING_SIZE),
26862691
},
26872692
};

0 commit comments

Comments
 (0)