Skip to content

Commit fc57c6d

Browse files
authored
Merge pull request #931 from input-output-hk/jpraynaud/919-fix-computation-for-zero-stake-pools
Fix stake distribution computation for zero stake pools
2 parents e064336 + b5dfb1d commit fc57c6d

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

Cargo.lock

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

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.3.20"
3+
version = "0.3.21"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-common"
3-
version = "0.2.54"
3+
version = "0.2.55"
44
authors = { workspace = true }
55
edition = { workspace = true }
66
documentation = { workspace = true }

mithril-common/src/chain_observer/cli_observer.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ impl CardanoCliChainObserver {
382382
.ok_or(ChainObserverError::InvalidContent(
383383
format!("Stake could not be converted to integer for {pool_id_bech32}").into(),
384384
))?;
385-
stake_distribution.insert(pool_id_bech32, stakes);
385+
if stakes > 0 {
386+
stake_distribution.insert(pool_id_bech32, stakes);
387+
}
386388
}
387389

388390
Ok(Some(stake_distribution))
@@ -605,6 +607,11 @@ pool1qz2vzszautc2c8mljnqre2857dpmheq7kgt6vav0s38tvvhxm6w 1.051e-6
605607
"stakeGo": 1200000000000,
606608
"stakeMark": 1200000000001,
607609
"stakeSet": 1200000000002
610+
},
611+
"00000ffff93effbf3ce788aebd3e7506b80322bd3995ad432e61fad5": {
612+
"stakeGo": 0,
613+
"stakeMark": 0,
614+
"stakeSet": 1300000000002
608615
}
609616
},
610617
"total": {

mithril-signer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-signer"
3-
version = "0.2.43"
3+
version = "0.2.44"
44
description = "A Mithril Signer"
55
authors = { workspace = true }
66
edition = { workspace = true }

0 commit comments

Comments
 (0)