Add a warn log if tor is not enabled and we are booting up DLCServer (#4126)

This commit is contained in:
Chris Stewart 2022-02-23 12:29:23 -06:00 committed by GitHub
parent f3c443804b
commit 5aa46be423
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -24,7 +24,6 @@ case class DLCNode(wallet: DLCWalletApi)(implicit
private[node] lazy val serverBindF: Future[(InetSocketAddress, ActorRef)] = {
logger.info(
s"Binding server to ${config.listenAddress}, with tor hidden service: ${config.torParams.isDefined}")
DLCServer
.bind(
wallet,

View file

@ -3,6 +3,7 @@ package org.bitcoins.dlc.node
import akka.actor._
import akka.event.LoggingReceive
import akka.io.{IO, Tcp}
import grizzled.slf4j.Logging
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi
import org.bitcoins.tor._
@ -63,7 +64,7 @@ class DLCServer(
}
object DLCServer {
object DLCServer extends Logging {
case object Disconnect
@ -96,7 +97,10 @@ object DLCServer {
bindAddress.getPort
)
.map(Some(_))
case None => Future.successful(None)
case None =>
logger.warn(
s"Tor must be enabled to negotiate a dlc, you can set this with bitcoin-s.tor.enabled=true and bitcoin-s.control.enabled=true in your bitcoin-s.conf")
Future.successful(None)
}
actorRef = system.actorOf(
props(dlcWalletApi, bindAddress, Some(promise), dataHandlerFactory))