Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #340 from consensus-shipyard/fix_error
Browse files Browse the repository at this point in the history
fix validator set error
  • Loading branch information
adlrocha authored Oct 18, 2023
2 parents cdf0e7b + 253cb62 commit 8c2272b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ipc/provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,9 @@ impl IpcProvider {
subnet: &SubnetID,
epoch: ChainEpoch,
) -> anyhow::Result<TopDownQueryPayload<Vec<StakingChangeRequest>>> {
let conn = match self.connection(subnet) {
None => return Err(anyhow!("target subnet not found")),
let parent = subnet.parent().ok_or_else(|| anyhow!("no parent found"))?;
let conn = match self.connection(&parent) {
None => return Err(anyhow!("target subnet parent not found")),
Some(conn) => conn,
};

Expand Down

0 comments on commit 8c2272b

Please sign in to comment.