Revert "Remove unused function `ofLatestCheckpoint` from BlockHeight"
addresses PR comment from @daira
This reverts commit d0e154ded7
, since it
modifies a public API and it was not the goal of this PR.
This commit is contained in:
parent
6bf8dc7e55
commit
d2016ccd24
|
@ -84,3 +84,13 @@ extension Checkpoint: Decodable {
|
|||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
public extension BlockHeight {
|
||||
/// Useful when creating a new wallet to reduce sync times.
|
||||
/// - Parameters:
|
||||
/// - zcashNetwork: Network to use for the block height.
|
||||
/// - Returns: The block height of the newest checkpoint known by the SDK.
|
||||
static func ofLatestCheckpoint(network: ZcashNetwork) -> BlockHeight {
|
||||
Checkpoint.birthday(with: BlockHeight.max, network: network).height
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue