Skip to content

Commit

Permalink
Merge pull request #931 from input-output-hk/jpraynaud/919-fix-comput…
Browse files Browse the repository at this point in the history
…ation-for-zero-stake-pools

Fix stake distribution computation for zero stake pools
  • Loading branch information
jpraynaud authored May 17, 2023
2 parents e064336 + b5dfb1d commit fc57c6d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion mithril-aggregator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-aggregator"
version = "0.3.20"
version = "0.3.21"
description = "A Mithril Aggregator server"
authors = { workspace = true }
edition = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion mithril-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-common"
version = "0.2.54"
version = "0.2.55"
authors = { workspace = true }
edition = { workspace = true }
documentation = { workspace = true }
Expand Down
9 changes: 8 additions & 1 deletion mithril-common/src/chain_observer/cli_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ impl CardanoCliChainObserver {
.ok_or(ChainObserverError::InvalidContent(
format!("Stake could not be converted to integer for {pool_id_bech32}").into(),
))?;
stake_distribution.insert(pool_id_bech32, stakes);
if stakes > 0 {
stake_distribution.insert(pool_id_bech32, stakes);
}
}

Ok(Some(stake_distribution))
Expand Down Expand Up @@ -605,6 +607,11 @@ pool1qz2vzszautc2c8mljnqre2857dpmheq7kgt6vav0s38tvvhxm6w 1.051e-6
"stakeGo": 1200000000000,
"stakeMark": 1200000000001,
"stakeSet": 1200000000002
},
"00000ffff93effbf3ce788aebd3e7506b80322bd3995ad432e61fad5": {
"stakeGo": 0,
"stakeMark": 0,
"stakeSet": 1300000000002
}
},
"total": {
Expand Down
2 changes: 1 addition & 1 deletion mithril-signer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-signer"
version = "0.2.43"
version = "0.2.44"
description = "A Mithril Signer"
authors = { workspace = true }
edition = { workspace = true }
Expand Down

0 comments on commit fc57c6d

Please sign in to comment.