Skip to content

Commit

Permalink
Refactor event filter parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
fishseabowl committed Apr 7, 2024
1 parent 01d857a commit a916fac
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions crates/katana/storage/provider/src/providers/fork/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ fn handle_contract_or_class_not_found_err<T>(

#[cfg(test)]
mod tests {
use katana_primitives::block::BlockNumber;
use katana_primitives::block::{BlockNumber, BlockTag};
use katana_primitives::contract::GenericContractInfo;
use starknet::macros::felt;
use url::Url;
Expand Down Expand Up @@ -887,15 +887,16 @@ mod tests {
backend
.do_get_events(
EventFilter {
from_block: Some(BlockId::Number(0)),
to_block: Some(BlockId::Number(0)),
from_block: Some(starknet::core::types::BlockId::Tag(BlockTag::Latest)),
to_block: Some(starknet::core::types::BlockId::Tag(BlockTag::Latest)),
address: None,
keys: None,
},
None,
0,
10,
)
.is_ok());
.is_ok()
);

assert!(
backend.do_get_block_with_tx_hashes(starknet::core::types::BlockId::Number(0)).is_ok()
Expand All @@ -909,7 +910,8 @@ mod tests {
starknet::core::types::BlockId::Number(0),
1
)
.is_ok());
.is_ok()
);

assert!(
backend
Expand All @@ -930,6 +932,7 @@ mod tests {
)
.unwrap()
)
.is_err());
.is_err()
);
}
}

0 comments on commit a916fac

Please sign in to comment.