Add documentation to recent code changes.
This commit is contained in:
parent
c95b8307c4
commit
a1a28cac82
|
@ -171,6 +171,10 @@ class SdkSynchronizer internal constructor(
|
|||
*/
|
||||
override val processorInfo: Flow<CompactBlockProcessor.ProcessorInfo> = processor.processorInfo
|
||||
|
||||
/**
|
||||
* The latest height seen on the network while processing blocks. This may differ from the
|
||||
* latest height scanned and is useful for determining block confirmations and expiration.
|
||||
*/
|
||||
override val networkHeight: StateFlow<Int> = processor.networkHeight
|
||||
|
||||
//
|
||||
|
|
|
@ -92,6 +92,11 @@ interface Synchronizer {
|
|||
*/
|
||||
val processorInfo: Flow<CompactBlockProcessor.ProcessorInfo>
|
||||
|
||||
/**
|
||||
* The latest height observed on the network, which does not necessarily correspond to the
|
||||
* latest downloaded height or scanned height. Although this is present in [processorInfo], it
|
||||
* is such a frequently used value that it is convenient to have the real-time value by itself.
|
||||
*/
|
||||
val networkHeight: StateFlow<Int>
|
||||
|
||||
/**
|
||||
|
|
|
@ -163,6 +163,10 @@ class CompactBlockProcessor(
|
|||
*/
|
||||
val processorInfo = _processorInfo.asFlow()
|
||||
|
||||
/**
|
||||
* The flow of network height. This value is updated at the same time that [currentInfo] is
|
||||
* updated but this allows consumers to have the information pushed instead of polling.
|
||||
*/
|
||||
val networkHeight = _networkHeight.asStateFlow()
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue