Set syncing flag to true on startup (#4506)

This commit is contained in:
Chris Stewart 2022-07-13 13:09:06 -05:00 committed by GitHub
parent 6dfa7683e4
commit cdef8c01dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,10 @@ class BitcoinSServerMain(override val serverArgParser: ServerArgParser)(implicit
for {
startedConfig <- startedConfigF
chainApi = ChainHandler.fromDatabase()
//on server startup we assume we are out of sync with the bitcoin network
//so we set this flag to true.
_ <- chainApi.setSyncing(true)
start <- {
nodeConf.nodeType match {
case _: InternalImplementationNodeType =>
@ -273,7 +277,6 @@ class BitcoinSServerMain(override val serverArgParser: ServerArgParser)(implicit
client <- bitcoindRpcConf.clientF
_ <- client.start()
} yield client
val tuple = buildWsSource
val wsQueue: SourceQueueWithComplete[Message] = tuple._1
val wsSource: Source[Message, NotUsed] = tuple._2