17
17
package fr .acinq .eclair
18
18
19
19
import akka .Done
20
- import akka .actor .{ActorContext , ActorRef , ActorSystem , Props , SupervisorStrategy }
20
+ import akka .actor .typed
21
+ import akka .actor .typed .scaladsl .Behaviors
22
+ import akka .actor .typed .scaladsl .adapter .ClassicActorSystemOps
23
+ import akka .actor .{ActorRef , ActorSystem , Props , SupervisorStrategy }
21
24
import akka .pattern .after
22
25
import akka .util .Timeout
23
26
import com .softwaremill .sttp .okhttp .OkHttpFutureBackend
@@ -28,7 +31,7 @@ import fr.acinq.eclair.blockchain.bitcoind.rpc.{BasicBitcoinJsonRPCClient, Batch
28
31
import fr .acinq .eclair .blockchain .bitcoind .zmq .ZMQActor
29
32
import fr .acinq .eclair .blockchain .bitcoind .{BitcoinCoreWallet , ZmqWatcher }
30
33
import fr .acinq .eclair .blockchain .fee ._
31
- import fr .acinq .eclair .channel .{Channel , Register , TxPublisher }
34
+ import fr .acinq .eclair .channel .{Channel , Register }
32
35
import fr .acinq .eclair .crypto .keymanager .{LocalChannelKeyManager , LocalNodeKeyManager }
33
36
import fr .acinq .eclair .db .Databases .FileBackup
34
37
import fr .acinq .eclair .db .{Databases , DbEventHandler , FileBackupHandler }
@@ -234,7 +237,7 @@ class Setup(datadir: File,
234
237
watcher = {
235
238
system.actorOf(SimpleSupervisor .props(Props (new ZMQActor (config.getString(" bitcoind.zmqblock" ), Some (zmqBlockConnected))), " zmqblock" , SupervisorStrategy .Restart ))
236
239
system.actorOf(SimpleSupervisor .props(Props (new ZMQActor (config.getString(" bitcoind.zmqtx" ), Some (zmqTxConnected))), " zmqtx" , SupervisorStrategy .Restart ))
237
- system.actorOf( SimpleSupervisor .props (ZmqWatcher .props (nodeParams.chainHash, blockCount, extendedBitcoinClient), " watcher" , SupervisorStrategy . Resume ) )
240
+ system.spawn( Behaviors .supervise (ZmqWatcher (nodeParams.chainHash, blockCount, extendedBitcoinClient)).onFailure(typed. SupervisorStrategy .resume) , " watcher" )
238
241
}
239
242
240
243
router = system.actorOf(SimpleSupervisor .props(Router .props(nodeParams, watcher, Some (routerInitialized)), " router" , SupervisorStrategy .Resume ))
@@ -347,7 +350,7 @@ object Setup {
347
350
348
351
case class Kit (nodeParams : NodeParams ,
349
352
system : ActorSystem ,
350
- watcher : ActorRef ,
353
+ watcher : typed. ActorRef [ ZmqWatcher . Command ] ,
351
354
paymentHandler : ActorRef ,
352
355
register : ActorRef ,
353
356
relayer : ActorRef ,
0 commit comments