Skip to content

Commit

Permalink
Fix/block classes (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
antiyro authored Jun 17, 2024
1 parent f9a7331 commit ae5c39b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Next release

- fix(rpc): fixed block not found error on get_class method
- fix (rpc): get_transaction_status
- fix(cleanup): clean up around the Cargo.toml files, error handling and cli arguments
- fix(db): fault tolerance (database is not corrupted when the node is unexpectedly shut down / killed)
Expand Down
4 changes: 2 additions & 2 deletions crates/client/rpc/src/methods/read/get_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use crate::Starknet;
pub fn get_class(starknet: &Starknet, block_id: BlockId, class_hash: FieldElement) -> RpcResult<ContractClass> {
let class_hash = ClassHash::from_field_element(class_hash);

// TODO: get class for the given block when block_number will be stored in
// `StorageContractClassData`
// check if the given block exists
starknet.get_block(block_id)?;

let class = starknet
.backend
Expand Down

0 comments on commit ae5c39b

Please sign in to comment.