10 lines
321 B
Kotlin
10 lines
321 B
Kotlin
package cash.z.ecc.android.sdk.internal
|
|
|
|
import cash.z.ecc.android.sdk.model.BlockHeight
|
|
|
|
internal fun ClosedRange<BlockHeight>?.isNullOrEmpty() = this?.isEmpty() ?: true
|
|
|
|
// Add 1 because the range is inclusive
|
|
internal fun ClosedRange<BlockHeight>.length() =
|
|
this.endInclusive.value.plus(1).minus(this.start.value)
|