Skip to content

Commit

Permalink
Fix error on global_state_item_by_state_identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Oct 22, 2024
1 parent 9e0e588 commit d89adc6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions binary_port_access/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use casper_binary_port::{
BinaryRequest, BinaryResponseAndRequest, EraIdentifier, GetRequest, GlobalStateQueryResult,
GlobalStateRequest, InformationRequest, InformationRequestTag, RecordId, RewardResponse,
BinaryRequest, BinaryResponseAndRequest, EraIdentifier, GetRequest, GlobalStateEntityQualifier,
GlobalStateQueryResult, GlobalStateRequest, InformationRequest, InformationRequestTag,
RecordId, RewardResponse,
};
use casper_types::{bytesrepr::ToBytes, GlobalStateIdentifier, Key, PublicKey};

Expand Down Expand Up @@ -71,13 +72,12 @@ pub(crate) async fn global_state_item_by_state_identifier(
key: Key,
path: Vec<String>,
) -> Result<Option<GlobalStateQueryResult>, Error> {
let global_state_request = GlobalStateRequest::Item {
state_identifier: global_state_identifier,
let qualifier = GlobalStateEntityQualifier::Item {
base_key: key,
path,
};
let global_state_request = GlobalStateRequest::new(global_state_identifier, qualifier);
let request = BinaryRequest::Get(GetRequest::State(Box::new(global_state_request)));

let response = communication::send_request(node_address, request).await?;
check_error_code(&response)?;
parse_response::<GlobalStateQueryResult>(response.response())
Expand Down

0 comments on commit d89adc6

Please sign in to comment.