Skip to content

Commit

Permalink
feat(snos_job): hotfix - get block nbr returns Result
Browse files Browse the repository at this point in the history
  • Loading branch information
akhercha committed Jul 22, 2024
1 parent 82b04d4 commit 2f1dab2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/orchestrator/src/jobs/snos_job/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Job for SnosJob {

async fn process_job(&self, _config: &Config, job: &mut JobItem) -> Result<String> {
// 0. Get block number from metadata
let block_number = self.get_block_number_from_metadata(job);
let block_number = self.get_block_number_from_metadata(job)?;

// 1. Fetch SNOS input data from Madara
let snos_input: StarknetOsInput = self.get_snos_input_from_madara(&block_number)?;
Expand Down Expand Up @@ -151,8 +151,8 @@ impl Job for SnosJob {

impl SnosJob {
// TODO: actually parse the metadata
fn get_block_number_from_metadata(&self, _job: &JobItem) -> BlockNumber {
BlockNumber(42_u64)
fn get_block_number_from_metadata(&self, _job: &JobItem) -> Result<BlockNumber> {
Ok(BlockNumber(42_u64))
}

fn get_snos_input_from_madara(&self, _block_number: &BlockNumber) -> Result<StarknetOsInput> {
Expand Down

0 comments on commit 2f1dab2

Please sign in to comment.