sync

fun sync(maxWait: Long = 10L*86400L*365L, epochTimeinMsOrBlockHeight: Long = -1L): Boolean

Return whether this wallet is synced with its underlying blockchain. If it is not synced, properties like balance and balanceUnconfirmed express some previous state. In the unsynced case, this API will wait for it to do so, but no more than the provided time in milliseconds. If a height is provided, this API returns true if the wallet is synced up to or beyond this height If a height is not provided (or is -1), this API assumes you mean up to "now". This is special cased with an extra check that the blockchain's tip timestamp is within an hour of now. Of course, since blocks can be discovered at any time, and connected nodes can be slow at processing blocks one cannot ever absolutely know whether the wallet is really synced up to "now", so this function is more accurately described as "nearly synced" for any "now" call.