Skip to content

Commit dd76ea9

Browse files
authored
Merge pull request #1258 from galacticcouncil/liquidation_worker_fix
fix(PEPL): left bit shift can result in negative value
2 parents 0a5102a + c6ea149 commit dd76ea9

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Cargo.lock

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

liquidation-worker-support/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "liquidation-worker-support"
3-
version = "1.1.1"
3+
version = "1.1.2"
44
description = "Methods for the liquidation worker"
55
authors = ["GalacticCouncil"]
66
edition = "2021"

liquidation-worker-support/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ impl UserConfiguration {
237237
/// Returns `true` if the user uses the asset as collateral.
238238
/// The asset index is the position of the asset in the `fetch_reserves_list()` array.
239239
pub fn is_collateral(&self, asset_index: usize) -> bool {
240-
let bit_mask = U256::from(2 << (2 * asset_index));
240+
let bit_mask = U256::from(2) << (2 * asset_index);
241241
!(self.0 & bit_mask).is_zero()
242242
}
243243

244244
/// Returns `true` if the user uses the asset as debt.
245245
/// The asset index is the position of the asset in the `fetch_reserves_list()` array.
246246
pub fn is_debt(&self, asset_index: usize) -> bool {
247-
let bit_mask = U256::from(1 << (2 * asset_index));
247+
let bit_mask = U256::from(1) << (2 * asset_index);
248248
!(self.0 & bit_mask).is_zero()
249249
}
250250
}

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 = "hydradx"
3-
version = "14.6.0"
3+
version = "14.6.1"
44
description = "Hydration node"
55
authors = ["GalacticCouncil"]
66
edition = "2021"

0 commit comments

Comments
 (0)