File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
ton-kotlin-liteclient/src/commonMain/kotlin/org/ton/lite/client Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,20 @@ public class LiteClient(
3636 coroutineContext : CoroutineContext ,
3737 private val liteClientConfigGlobal : LiteClientConfigGlobal
3838) : Closeable, CoroutineScope {
39+ public constructor (
40+ coroutineContext: CoroutineContext ,
41+ liteServers: List <LiteServerDesc >
42+ ) : this (coroutineContext, LiteClientConfigGlobal (liteServers = liteServers))
43+
44+ public constructor (
45+ coroutineContext: CoroutineContext ,
46+ vararg liteServer: LiteServerDesc
47+ ) : this (coroutineContext, liteServer.toList())
48+
49+ init {
50+ require(liteClientConfigGlobal.liteServers.isNotEmpty()) { " No lite servers provided" }
51+ }
52+
3953 private val logger: Logger = PrintLnLogger (" LiteClient" )
4054 override val coroutineContext: CoroutineContext = coroutineContext + CoroutineName (" LiteClient" )
4155 private val knownBlockIds: ArrayDeque <TonNodeBlockIdExt > = ArrayDeque (100 )
You can’t perform that action at this time.
0 commit comments