Skip to content

Commit

Permalink
Rename activeNextSession to isActiveNextSession in validator details …
Browse files Browse the repository at this point in the history
…and summary. Update the nomination struct.
  • Loading branch information
kukabi committed Aug 8, 2022
1 parent 2975340 commit ad11e8f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Sources/SubVTData/Model/App/ValidatorDetails.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public struct ValidatorDetails: Hashable {
public private(set) var rewardDestination: RewardDestination
public private(set) var nextSessionKeys: String
public private(set) var isActive: Bool
public private(set) var activeNextSession: Bool
public private(set) var isActiveNextSession: Bool
public private(set) var nominations: [Nomination]
public private(set) var oversubscribed: Bool
public private(set) var activeEraCount: UInt32
Expand Down Expand Up @@ -42,7 +42,7 @@ public struct ValidatorDetails: Hashable {
rewardDestination: RewardDestination,
nextSessionKeys: String,
isActive: Bool,
activeNextSession: Bool,
isActiveNextSession: Bool,
nominations: [Nomination],
oversubscribed: Bool,
activeEraCount: UInt32,
Expand Down Expand Up @@ -73,7 +73,7 @@ public struct ValidatorDetails: Hashable {
self.rewardDestination = rewardDestination
self.nextSessionKeys = nextSessionKeys
self.isActive = isActive
self.activeNextSession = activeNextSession
self.isActiveNextSession = isActiveNextSession
self.nominations = nominations
self.oversubscribed = oversubscribed
self.activeEraCount = activeEraCount
Expand Down Expand Up @@ -134,7 +134,7 @@ extension ValidatorDetails {
self.rewardDestination = diff.rewardDestination ?? self.rewardDestination
self.nextSessionKeys = diff.nextSessionKeys ?? self.nextSessionKeys
self.isActive = diff.isActive ?? self.isActive
self.activeNextSession = diff.activeNextSession ?? self.activeNextSession
self.isActiveNextSession = diff.isActiveNextSession ?? self.isActiveNextSession
self.nominations = diff.nominations ?? self.nominations
self.oversubscribed = diff.oversubscribed ?? self.oversubscribed
self.activeEraCount = diff.activeEraCount ?? self.activeEraCount
Expand Down Expand Up @@ -172,7 +172,7 @@ public struct ValidatorDetailsDiff: Hashable {
public let rewardDestination: RewardDestination?
public let nextSessionKeys: String?
public let isActive: Bool?
public let activeNextSession: Bool?
public let isActiveNextSession: Bool?
public let nominations: [Nomination]?
public let oversubscribed: Bool?
public let activeEraCount: UInt32?
Expand Down
10 changes: 5 additions & 5 deletions Sources/SubVTData/Model/App/ValidatorSummary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public struct ValidatorSummary: Codable, Hashable {
public private(set) var preferences: ValidatorPreferences
public private(set) var selfStake: StakeSummary
public private(set) var isActive: Bool
public private(set) var activeNextSession: Bool
public private(set) var isActiveNextSession: Bool
public private(set) var inactiveNominations: InactiveNominationsSummary
public private(set) var oversubscribed: Bool
public private(set) var slashCount: Int
Expand All @@ -38,7 +38,7 @@ public struct ValidatorSummary: Codable, Hashable {
preferences: ValidatorPreferences,
selfStake: StakeSummary,
isActive: Bool,
activeNextSession: Bool,
isActiveNextSession: Bool,
inactiveNominations: InactiveNominationsSummary,
oversubscribed: Bool,
slashCount: Int,
Expand All @@ -62,7 +62,7 @@ public struct ValidatorSummary: Codable, Hashable {
self.preferences = preferences
self.selfStake = selfStake
self.isActive = isActive
self.activeNextSession = activeNextSession
self.isActiveNextSession = isActiveNextSession
self.inactiveNominations = inactiveNominations
self.oversubscribed = oversubscribed
self.slashCount = slashCount
Expand All @@ -88,7 +88,7 @@ extension ValidatorSummary {
self.preferences = diff.preferences ?? self.preferences
self.selfStake = diff.selfStake ?? self.selfStake
self.isActive = diff.isActive ?? self.isActive
self.activeNextSession = diff.activeNextSession ?? self.activeNextSession
self.isActiveNextSession = diff.isActiveNextSession ?? self.isActiveNextSession
self.inactiveNominations = diff.inactiveNominations ?? self.inactiveNominations
self.oversubscribed = diff.oversubscribed ?? self.oversubscribed
self.slashCount = diff.slashCount ?? self.slashCount
Expand All @@ -114,7 +114,7 @@ public struct ValidatorSummaryDiff: Codable, Hashable {
public let preferences: ValidatorPreferences?
public let selfStake: StakeSummary?
public let isActive: Bool?
public let activeNextSession: Bool?
public let isActiveNextSession: Bool?
public let inactiveNominations: InactiveNominationsSummary?
public let oversubscribed: Bool?
public let slashCount: Int?
Expand Down
6 changes: 3 additions & 3 deletions Sources/SubVTData/Model/Substrate/Nomination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
public struct Nomination: Hashable {
public let stashAccount: Account
public let submissionEraIndex: Int
public let targetAccountIds: [String]
public let nomineeCount: Int
public let stake: Stake

public init(
stashAccount: Account,
submissionEraIndex: Int,
targetAccountIds: [String],
nomineeCount: Int,
stake: Stake
) {
self.stashAccount = stashAccount
self.submissionEraIndex = submissionEraIndex
self.targetAccountIds = targetAccountIds
self.nomineeCount = nomineeCount
self.stake = stake
}
}
Expand Down

0 comments on commit ad11e8f

Please sign in to comment.