Skip to content

Commit 319df28

Browse files
fix: delegate oracle to system program (broadcast) (#23)
* fix: delegate oracle to system program (broadcast) * chore: fmt
1 parent a8b8d4e commit 319df28

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

program/src/delegate_oracle_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn process_delegate_oracle_queue(accounts: &[AccountInfo<'_>], data: &[u8])
6262
};
6363
let delegate_config = DelegateConfig {
6464
commit_frequency_ms: 0,
65-
validator: None,
65+
validator: Some(system_program::id()),
6666
};
6767
delegate_account(delegate_accounts, pda_seeds, delegate_config)?;
6868

vrf-cli/src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ async fn main() -> Result<()> {
196196
let acc = rpc_client.get_account(&queue);
197197
if acc.is_ok() {
198198
let account = acc?;
199-
let queue_struct = Queue::try_from_bytes(account.data.as_slice())?;
199+
let queue_struct = match Queue::try_from_bytes(account.data.as_slice()) {
200+
Ok(q) => q,
201+
Err(_) => {
202+
println!("Failed to parse queue account aaa: {}", queue);
203+
continue;
204+
}
205+
};
200206
println!(
201207
"Queue address: {}, items: {}, index: {}, delegated: {}",
202208
queue,

0 commit comments

Comments
 (0)