mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-03 18:47:38 +01:00
Add a warn log if tor is not enabled and we are booting up DLCServer (#4126)
This commit is contained in:
parent
f3c443804b
commit
5aa46be423
2 changed files with 6 additions and 3 deletions
|
@ -24,7 +24,6 @@ case class DLCNode(wallet: DLCWalletApi)(implicit
|
||||||
private[node] lazy val serverBindF: Future[(InetSocketAddress, ActorRef)] = {
|
private[node] lazy val serverBindF: Future[(InetSocketAddress, ActorRef)] = {
|
||||||
logger.info(
|
logger.info(
|
||||||
s"Binding server to ${config.listenAddress}, with tor hidden service: ${config.torParams.isDefined}")
|
s"Binding server to ${config.listenAddress}, with tor hidden service: ${config.torParams.isDefined}")
|
||||||
|
|
||||||
DLCServer
|
DLCServer
|
||||||
.bind(
|
.bind(
|
||||||
wallet,
|
wallet,
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.bitcoins.dlc.node
|
||||||
import akka.actor._
|
import akka.actor._
|
||||||
import akka.event.LoggingReceive
|
import akka.event.LoggingReceive
|
||||||
import akka.io.{IO, Tcp}
|
import akka.io.{IO, Tcp}
|
||||||
|
import grizzled.slf4j.Logging
|
||||||
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi
|
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi
|
||||||
import org.bitcoins.tor._
|
import org.bitcoins.tor._
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ class DLCServer(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object DLCServer {
|
object DLCServer extends Logging {
|
||||||
|
|
||||||
case object Disconnect
|
case object Disconnect
|
||||||
|
|
||||||
|
@ -96,7 +97,10 @@ object DLCServer {
|
||||||
bindAddress.getPort
|
bindAddress.getPort
|
||||||
)
|
)
|
||||||
.map(Some(_))
|
.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(
|
actorRef = system.actorOf(
|
||||||
props(dlcWalletApi, bindAddress, Some(promise), dataHandlerFactory))
|
props(dlcWalletApi, bindAddress, Some(promise), dataHandlerFactory))
|
||||||
|
|
Loading…
Add table
Reference in a new issue