Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseAbram committed Dec 19, 2024
1 parent d6dc82d commit 1dce5d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/oracle-example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub struct UserConfig {}
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
pub struct AuxData {}

// Oracle data is heading block_number_entropy as I expect that to be passed below to the evaluate function.
pub const ORACLE_DATA: [&str; 1] = ["block_number_entropy"];

// TODO confirm this isn't an issue for audit
Expand Down
4 changes: 2 additions & 2 deletions templates/basic-template/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ async fn main() -> anyhow::Result<()> {
);

// length is 1 if empty and can ignore, scale codec length
let pre = fs::read(oracle_data.clone()).unwrap();
let oracle_option = if pre.len() == 1 {
let decoded_oracle_data = fs::read(oracle_data.clone()).unwrap();
let oracle_option = if decoded_oracle_data.len() == 1 {
None
} else {
Some(oracle_data.into())
Expand Down

0 comments on commit 1dce5d7

Please sign in to comment.