Skip to content

Commit 657e71c

Browse files
committed
chore: bump package to v2.1.0
1 parent 72a5c41 commit 657e71c

File tree

9 files changed

+23
-31
lines changed

9 files changed

+23
-31
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "witnet"
3-
version = "2.0.4"
3+
version = "2.1.0"
44
authors = ["Witnet Foundation <[email protected]>"]
55
publish = false
66
repository = "witnet/witnet-rust"

bridges/centralized-ethereum/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "witnet-centralized-ethereum-bridge"
3-
version = "2.0.4"
3+
version = "2.1.0"
44
authors = ["Witnet Foundation <[email protected]>"]
55
edition = "2018"
66

data_structures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ authors = ["Witnet Foundation <[email protected]>"]
33
description = "data structures component"
44
edition = "2021"
55
name = "witnet_data_structures"
6-
version = "2.0.4"
6+
version = "2.1.0"
77
workspace = ".."
88

99
[features]

node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "witnet_node"
3-
version = "2.0.4"
3+
version = "2.1.0"
44
authors = ["Witnet Foundation <[email protected]>"]
55
workspace = ".."
66
description = "node component"

node/src/actors/chain_manager/handlers.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,21 +1842,22 @@ impl Handler<GetBalance2> for ChainManager {
18421842
NodeBalance2::Many(balances)
18431843
}
18441844
GetBalance2::Address(pkh) => {
1845+
let pkh = try_do_magic_into_pkh(pkh.clone()).map_err(|e| {
1846+
log::warn!(
1847+
"Failed to convert {:?} into a valid public key hash: {e}",
1848+
pkh
1849+
);
1850+
e
1851+
})?;
18451852
let mut balance = transaction_factory::get_utxos_balance(
18461853
&self.chain_state.unspent_outputs_pool,
1847-
try_do_magic_into_pkh(pkh.clone()).map_err(|e| {
1848-
log::warn!(
1849-
"Failed to convert {:?} into a valid public key hash: {e}",
1850-
pkh
1851-
);
1852-
e
1853-
})?,
1854+
pkh,
18541855
now,
18551856
);
18561857
let stakes = self
18571858
.chain_state
18581859
.stakes
1859-
.query_stakes(QueryStakesFilter::Withdrawer(pkh));
1860+
.query_stakes(QueryStakesKey::Withdrawer(pkh));
18601861
if let Ok(stakes) = stakes {
18611862
balance.add_staked(stakes.iter().fold(0u64, |staked: u64, entry| {
18621863
staked.saturating_add(entry.value.coins.nanowits())

node/src/actors/json_rpc/api.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,7 @@ use crate::{
4040
inventory_manager::{InventoryManager, InventoryManagerError},
4141
json_rpc::Subscriptions,
4242
messages::{
43-
AddCandidates, AddPeers, AddTransaction, AuthorizeStake, BuildDrt, BuildStake,
44-
BuildStakeParams, BuildStakeResponse, BuildUnstake, BuildUnstakeParams, BuildVtt,
45-
ClearPeers, DropAllPeers, EstimatePriority, GetBalance, GetBalance2, GetBalance2Limits,
46-
GetBalanceTarget, GetBlocksEpochRange, GetConsolidatedPeers, GetDataRequestInfo,
47-
GetEpoch, GetHighestCheckpointBeacon, GetItemBlock, GetItemSuperblock,
48-
GetItemTransaction, GetKnownPeers, GetMemoryTransaction, GetMempool, GetNodeStats,
49-
GetProtocolInfo, GetReputation, GetSignalingInfo, GetState, GetSupplyInfo,
50-
GetSupplyInfo2, GetUtxoInfo, InitializePeers, IsConfirmedBlock, MagicEither,
51-
QueryStakes, QueryStakingPowers, Rewind, SnapshotExport, SnapshotImport,
52-
StakeAuthorization,
43+
AddCandidates, AddPeers, AddTransaction, AuthorizeStake, BuildDrt, BuildStake, BuildStakeParams, BuildStakeResponse, BuildUnstake, BuildUnstakeParams, BuildVtt, ClearPeers, DropAllPeers, EstimatePriority, GetBalance, GetBalance2, GetBalance2Limits, GetBalanceTarget, GetBlocksEpochRange, GetConsolidatedPeers, GetDataRequestInfo, GetEpoch, GetHighestCheckpointBeacon, GetItemBlock, GetItemSuperblock, GetItemTransaction, GetKnownPeers, GetMemoryTransaction, GetMempool, GetNodeStats, GetProtocolInfo, GetReputation, GetSignalingInfo, GetState, GetSupplyInfo, GetSupplyInfo2, GetUtxoInfo, InitializePeers, IsConfirmedBlock, MagicEither, QueryStakes, QueryStakingPowers, Rewind, SnapshotExport, SnapshotImport, StakeAuthorization
5344
},
5445
peers_manager::PeersManager,
5546
sessions_manager::SessionsManager,
@@ -1459,7 +1450,7 @@ pub async fn get_balance(params: Params, sensitive_methods_enabled: bool) -> Jso
14591450
// Handle parameters as an array with a first obligatory PublicKeyHash field plus an optional bool field
14601451
if let Params::Array(params) = params {
14611452
if let Some(Value::String(target_param)) = params.first() {
1462-
target = GetBalanceTarget::from_str(target_param).map_err(internal_error)?;
1453+
target = GetBalanceTarget::from_str(&target_param).map_err(internal_error)?;
14631454
} else {
14641455
return Err(Error::invalid_params(
14651456
"First argument of `get_balance` must have type `PublicKeyHash`",

toolkit/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "witnet_toolkit"
3-
version = "2.0.4"
3+
version = "2.1.0"
44
authors = ["Adán SDPC <[email protected]>"]
55
edition = "2021"
66

wallet/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["Witnet Foundation <[email protected]>"]
33
edition = "2021"
44
name = "witnet_wallet"
5-
version = "2.0.4"
5+
version = "2.1.0"
66
workspace = ".."
77

88
[dependencies]

0 commit comments

Comments
 (0)