Skip to content

Commit

Permalink
Do not reload the config in eclair-node, remove unnecessary line in a…
Browse files Browse the repository at this point in the history
…pi test
  • Loading branch information
araspitzu committed Aug 22, 2019
1 parent 07bd79c commit 3469eb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion eclair-node/src/main/scala/fr/acinq/eclair/Boot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Boot extends App with Logging {
setup.bootstrap onComplete {
case Success(kit) =>
plugins.foreach(_.onKit(kit))
val config = NodeParams.loadConfiguration(datadir, ConfigFactory.empty())
val config = setup.config
if(config.getBoolean("api.enabled")){
logger.info(s"json API enabled on port=${config.getInt("api.port")}")
implicit val materializer = ActorMaterializer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,11 @@ class ApiServiceSpec extends FunSuite with ScalatestRouteTest with IdiomaticMock

test("'usablebalances' asks router for current usable balances") {

val remoteNodeId = PublicKey(hex"03af0ed6052cf28d670665549bc86f4b721c9fdb309d40c58f5811f63966e005d0")
val eclair = mock[Eclair]
val mockService = new MockService(eclair)
eclair.usableBalances()(any[Timeout]) returns Future.successful(List(
UsableBalances(canSend = MilliSatoshi(100000000), canReceive = MilliSatoshi(20000000), shortChannelId = ShortChannelId(1), remoteNodeId = remoteNodeId, isPublic = true),
UsableBalances(canSend = MilliSatoshi(400000000), canReceive = MilliSatoshi(30000000), shortChannelId = ShortChannelId(2), remoteNodeId = remoteNodeId, isPublic = false)
UsableBalances(canSend = MilliSatoshi(100000000), canReceive = MilliSatoshi(20000000), shortChannelId = ShortChannelId(1), remoteNodeId = aliceNodeId, isPublic = true),
UsableBalances(canSend = MilliSatoshi(400000000), canReceive = MilliSatoshi(30000000), shortChannelId = ShortChannelId(2), remoteNodeId = aliceNodeId, isPublic = false)
))

Post("/usablebalances") ~>
Expand Down

0 comments on commit 3469eb5

Please sign in to comment.