Skip to content

Commit

Permalink
Bump casper-node deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jacek-casper committed May 7, 2024
1 parent 1c79b99 commit 10acda4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions rpc_sidecar/src/node_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ use casper_binary_port::{
BalanceResponse, BinaryMessage, BinaryMessageCodec, BinaryRequest, BinaryRequestHeader,
BinaryResponse, BinaryResponseAndRequest, ConsensusValidatorChanges, DictionaryItemIdentifier,
DictionaryQueryResult, ErrorCode, GetRequest, GetTrieFullResult, GlobalStateQueryResult,
GlobalStateRequest, InformationRequest, NodeStatus, PayloadEntity, PurseIdentifier, RecordId,
SpeculativeExecutionResult, TransactionWithExecutionInfo,
GlobalStateRequest, InformationRequest, KeyPrefix, NodeStatus, PayloadEntity, PurseIdentifier,
RecordId, SpeculativeExecutionResult, TransactionWithExecutionInfo,
};
use casper_types::{
bytesrepr::{self, FromBytes, ToBytes},
AvailableBlockRange, BlockHash, BlockHeader, BlockIdentifier, ChainspecRawBytes, Digest,
GlobalStateIdentifier, Key, KeyPrefix, KeyTag, Peers, ProtocolVersion, SignedBlock,
StoredValue, Transaction, TransactionHash, Transfer,
GlobalStateIdentifier, Key, KeyTag, Peers, ProtocolVersion, SignedBlock, StoredValue,
Transaction, TransactionHash, Transfer,
};
use std::{
fmt::{self, Display, Formatter},
Expand Down Expand Up @@ -102,12 +102,12 @@ pub trait NodeClient: Send + Sync {
parse_response::<Vec<StoredValue>>(&resp.into())?.ok_or(Error::EmptyEnvelope)
}

async fn get_balance_by_state_root(
async fn get_balance(
&self,
state_identifier: Option<GlobalStateIdentifier>,
purse_identifier: PurseIdentifier,
) -> Result<BalanceResponse, Error> {
let get = GlobalStateRequest::BalanceByStateRoot {
let get = GlobalStateRequest::Balance {
state_identifier,
purse_identifier,
};
Expand Down
4 changes: 2 additions & 2 deletions rpc_sidecar/src/rpcs/common.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::collections::BTreeMap;

use casper_binary_port::GlobalStateQueryResult;
use casper_binary_port::{GlobalStateQueryResult, KeyPrefix};
use once_cell::sync::Lazy;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand All @@ -9,7 +9,7 @@ use crate::rpcs::error::Error;
use casper_types::{
account::AccountHash, addressable_entity::NamedKeys, bytesrepr::ToBytes,
global_state::TrieMerkleProof, Account, AddressableEntity, AvailableBlockRange, BlockHeader,
BlockIdentifier, EntityAddr, GlobalStateIdentifier, Key, KeyPrefix, SignedBlock, StoredValue,
BlockIdentifier, EntityAddr, GlobalStateIdentifier, Key, SignedBlock, StoredValue,
};

use crate::NodeClient;
Expand Down
6 changes: 3 additions & 3 deletions rpc_sidecar/src/rpcs/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl RpcWithParams for GetBalance {
let state_id = GlobalStateIdentifier::StateRootHash(params.state_root_hash);
let purse_id = PortPurseIdentifier::Purse(purse_uref);
let balance = node_client
.get_balance_by_state_root(Some(state_id), purse_id)
.get_balance(Some(state_id), purse_id)
.await
.map_err(|err| Error::NodeRequest("balance", err))?;

Expand Down Expand Up @@ -947,7 +947,7 @@ impl RpcWithParams for QueryBalance {
) -> Result<Self::ResponseResult, RpcError> {
let purse_id = params.purse_identifier.into_port_purse_identifier();
let balance = node_client
.get_balance_by_state_root(params.state_identifier, purse_id)
.get_balance(params.state_identifier, purse_id)
.await
.map_err(|err| Error::NodeRequest("balance by state root", err))?;
Ok(Self::ResponseResult {
Expand Down Expand Up @@ -1020,7 +1020,7 @@ impl RpcWithParams for QueryBalanceDetails {
) -> Result<Self::ResponseResult, RpcError> {
let purse_id = params.purse_identifier.into_port_purse_identifier();
let balance = node_client
.get_balance_by_state_root(params.state_identifier, purse_id)
.get_balance(params.state_identifier, purse_id)
.await
.map_err(|err| Error::NodeRequest("balance by state root", err))?;

Expand Down

0 comments on commit 10acda4

Please sign in to comment.