AggregateRewardInformation
public struct AggregateRewardInformation : Codable, Hashable, Equatable
Object ot abstract away a significatn amount of logic involved in computing estimated reward payments from a baker
-
Declaration
Swift
public let previousReward: RewardDetails? -
Declaration
Swift
public let estimatedPreviousReward: RewardDetails? -
Declaration
Swift
public let estimatedNextReward: RewardDetails? -
Declaration
Swift
public init(previousReward: RewardDetails?, estimatedPreviousReward: RewardDetails?, estimatedNextReward: RewardDetails?) -
Creating this object involves many expensive requests, but produces a result that is valid for up to ~3 days. This function can be used to determine if its ok to read a previous object from a cache, or if it needs to be refreshed
Declaration
Swift
public func isOutOfDate() -> Bool -
When
previousRewardis present, it is possible that due to a delay in payment being received, that we may cache an object before the last payment was received In this case, if we only relied onisOutOfDate()we would not update again for ~3 days. Both checks will be neededDeclaration
Swift
public func moreThan1CycleBetweenPreiousAndNext() -> Bool -
Declaration
Swift
public func hash(into hasher: inout Hasher) -
Declaration
Swift
public static func == (lhs: AggregateRewardInformation, rhs: AggregateRewardInformation) -> Bool
Install in Dash