2023 02 21 pekko (#5413)

* Get dependencies resolving, get tor module compiling

* Get everything compiling with pekko

* Rework configs/logging to use pekko namespace

* Rename AkkaUtil -> PekkoUtil, BitcoinSAkkaAsyncTest -> BitcoinSPekkoAsyncTest
This commit is contained in:
Chris Stewart 2024-02-22 10:26:21 -06:00 committed by GitHub
parent 1b25994fc2
commit 1dff918848
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
147 changed files with 502 additions and 396 deletions

View file

@ -1,7 +1,7 @@
package org.bitcoins.oracle.server
import akka.http.scaladsl.model.ContentTypes._
import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.apache.pekko.http.scaladsl.model.ContentTypes._
import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
import org.bitcoins.core.api.dlcoracle._
import org.bitcoins.core.api.dlcoracle.db.EventDb
import org.bitcoins.core.config._

View file

@ -62,12 +62,12 @@
<!-- Get rid of messages like this:
Connection attempt failed. Backing off new connection
attempts for at least 800 milliseconds. -->
<logger name="akka.http.impl.engine.client.PoolGateway" level="OFF"/>
<logger name="org.apache.pekko.http.impl.engine.client.PoolGateway" level="OFF"/>
<!-- get rid of "Slf4jLogger started" messages -->
<logger name="akka.event.slf4j.Slf4jLogger" level="OFF"/>
<logger name="org.apache.pekko.event.slf4j.Slf4jLogger" level="OFF"/>
<!-- get rid of "Running CoordinatedShutdown Phase" messages -->
<logger name="akka.actor.slf4j.CoordinatedShutdown" level="OFF"/>
<logger name="org.apache.pekko.actor.slf4j.CoordinatedShutdown" level="OFF"/>
</configuration>

View file

@ -8,7 +8,7 @@ bitcoin-s {
}
}
akka {
pekko {
# Set these to the defaults instead of the
# appServer's modified ones

View file

@ -1,8 +1,11 @@
package org.bitcoins.oracle.server
import akka.actor.ActorSystem
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.server.Directives.{complete, reject}
import org.apache.pekko.http.scaladsl.server.{
StandardRoute,
ValidationRejection
}
import org.bitcoins.core.api.dlcoracle._
import org.bitcoins.core.config.MainNet
import org.bitcoins.core.number._

View file

@ -1,7 +1,7 @@
package org.bitcoins.oracle.server
import akka.actor.ActorSystem
import akka.stream.scaladsl.Source
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.scaladsl.Source
import org.bitcoins.commons.util.{DatadirParser, ServerArgParser}
import org.bitcoins.dlc.oracle.DLCOracle
import org.bitcoins.dlc.oracle.config.DLCOracleAppConfig

View file

@ -98,12 +98,12 @@
<!-- Get rid of messages like this:
Connection attempt failed. Backing off new connection
attempts for at least 800 milliseconds. -->
<logger name="akka.http.impl.engine.client.PoolGateway" level="OFF"/>
<logger name="org.apache.pekko.http.impl.engine.client.PoolGateway" level="OFF"/>
<!-- get rid of "Slf4jLogger started" messages -->
<logger name="akka.event.slf4j.Slf4jLogger" level="OFF"/>
<logger name="org.apache.pekko.event.slf4j.Slf4jLogger" level="OFF"/>
<!-- get rid of "Running CoordinatedShutdown Phase" messages -->
<logger name="akka.actor.slf4j.CoordinatedShutdown" level="OFF"/>
<logger name="org.apache.pekko.actor.slf4j.CoordinatedShutdown" level="OFF"/>
</configuration>

View file

@ -1 +1 @@
akka.http.host-connection-pool.max-connections=128
pekko.http.host-connection-pool.max-connections=128

View file

@ -1,8 +1,8 @@
package org.bitcoins.scripts
import akka.NotUsed
import akka.actor.ActorSystem
import akka.stream.scaladsl.{Keep, Sink, Source}
import org.apache.pekko.NotUsed
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.scaladsl.{Keep, Sink, Source}
import org.bitcoins.core.protocol.blockchain.Block
import org.bitcoins.core.protocol.script._
import org.bitcoins.core.protocol.transaction.{Transaction, WitnessTransaction}

View file

@ -1,6 +1,6 @@
package org.bitcoins.scripts
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.commons.util.{DatadirParser, ServerArgParser}
import org.bitcoins.db.DatadirUtil
import org.bitcoins.server.BitcoinSAppConfig

View file

@ -16,11 +16,17 @@
package de.heikoseeberger.akkahttpupickle
import akka.http.scaladsl.marshalling.{Marshaller, ToEntityMarshaller}
import akka.http.scaladsl.model.{ContentTypeRange, MediaType}
import akka.http.scaladsl.model.MediaTypes.`application/json`
import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller}
import akka.util.ByteString
import org.apache.pekko.http.scaladsl.marshalling.{
Marshaller,
ToEntityMarshaller
}
import org.apache.pekko.http.scaladsl.model.{ContentTypeRange, MediaType}
import org.apache.pekko.http.scaladsl.model.MediaTypes.`application/json`
import org.apache.pekko.http.scaladsl.unmarshalling.{
FromEntityUnmarshaller,
Unmarshaller
}
import org.apache.pekko.util.ByteString
import upickle.default.{read, write, Reader, Writer}
import scala.collection.immutable.Seq

View file

@ -1,6 +1,6 @@
package org.bitcoins.server.routes
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import grizzled.slf4j.Logging
import org.bitcoins.commons.util.ServerArgParser
import org.bitcoins.core.util.{EnvUtil, StartStopAsync}

View file

@ -1,11 +1,11 @@
package org.bitcoins.server.routes
import akka.http.scaladsl.model.{HttpResponse, StatusCodes}
import akka.http.scaladsl.model.headers._
import akka.http.scaladsl.model.HttpMethods._
import akka.http.scaladsl.server.Directive0
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.Route
import org.apache.pekko.http.scaladsl.model.{HttpResponse, StatusCodes}
import org.apache.pekko.http.scaladsl.model.headers._
import org.apache.pekko.http.scaladsl.model.HttpMethods._
import org.apache.pekko.http.scaladsl.server.Directive0
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server.Route
/** Add CORS handling for accessing backend over localhost from modern browsers
* @see dzone.com/articles/handling-cors-in-akka-http

View file

@ -1,7 +1,7 @@
package org.bitcoins.server.routes
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.Route
import org.apache.pekko.http.scaladsl.server.Directives.complete
import org.apache.pekko.http.scaladsl.server.Route
import org.bitcoins.core.util.EnvUtil
import org.bitcoins.db.DatadirUtil

View file

@ -1,25 +1,43 @@
package org.bitcoins.server.routes
import akka.actor.ActorSystem
import akka.event.Logging
import akka.http.scaladsl._
import akka.http.scaladsl.model._
import akka.http.scaladsl.model.ws.{Message, TextMessage}
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import akka.http.scaladsl.server.directives.Credentials.Missing
import akka.http.scaladsl.server.directives.{
import de.heikoseeberger.akkahttpupickle.UpickleSupport._
import grizzled.slf4j.Logging
import org.apache.pekko.{Done, NotUsed}
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.event.Logging
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.model.ws.{Message, TextMessage}
import org.apache.pekko.http.scaladsl.model.{
ContentTypes,
HttpEntity,
HttpResponse,
StatusCode,
StatusCodes
}
import org.apache.pekko.http.scaladsl.server.Directives.{
authenticateBasic,
complete,
handleExceptions,
handleRejections
}
import org.apache.pekko.http.scaladsl.server.directives.{
Credentials,
DebuggingDirectives,
MarshallingDirectives,
MethodDirectives,
PathDirectives
}
import akka.http.scaladsl.unmarshalling.FromRequestUnmarshaller
import akka.stream.scaladsl.{Flow, Keep, Sink, Source}
import akka.{Done, NotUsed}
import de.heikoseeberger.akkahttpupickle.UpickleSupport._
import grizzled.slf4j.Logging
import org.apache.pekko.http.scaladsl.server.directives.Credentials.Missing
import org.apache.pekko.http.scaladsl.server.{
Directive1,
Directives,
ExceptionHandler,
RejectionHandler,
Route,
StandardRoute
}
import org.apache.pekko.http.scaladsl.unmarshalling.FromRequestUnmarshaller
import org.apache.pekko.stream.scaladsl.{Flow, Keep, Sink, Source}
import org.bitcoins.commons.config.AppConfig
import org.bitcoins.commons.jsonmodels.ws.WsNotification
import org.bitcoins.server.util.{ServerBindings, WsServerConfig}
@ -197,7 +215,7 @@ case class Server(
private val eventsRoute = "events"
private def wsRoutes: Route = {
val commonRoute = path(eventsRoute) {
val commonRoute = Directives.path(eventsRoute) {
Directives.handleWebSocketMessages(wsHandler)
}

View file

@ -1,7 +1,7 @@
package org.bitcoins.server.routes
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.{Directive1, Route}
import org.apache.pekko.http.scaladsl.server.Directives.{complete, provide}
import org.apache.pekko.http.scaladsl.server.{Directive1, Route}
import scala.util.Try

View file

@ -1,7 +1,7 @@
package org.bitcoins.server.util
import akka.actor.ActorSystem
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
trait BitcoinSApp {
def actorSystemName: String

View file

@ -1,7 +1,7 @@
package org.bitcoins.server.util
import akka.http.scaladsl.Http
import grizzled.slf4j.Logging
import org.apache.pekko.http.scaladsl.Http
import scala.concurrent.duration.DurationInt
import scala.concurrent.{ExecutionContext, Future}

View file

@ -1,6 +1,6 @@
package org.bitcoins.server
import akka.stream.StreamDetachedException
import org.apache.pekko.stream.StreamDetachedException
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.server.util.CallbackUtil
import org.bitcoins.testkit.wallet.BitcoinSWalletTest

View file

@ -1,7 +1,7 @@
package org.bitcoins.server
import akka.http.scaladsl.model.ContentTypes
import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.apache.pekko.http.scaladsl.model.ContentTypes
import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
import org.bitcoins.core.util.EnvUtil
import org.bitcoins.server.routes.{CommonRoutes, ServerCommand}
import org.bitcoins.testkit.BitcoinSTestAppConfig

View file

@ -1,7 +1,7 @@
package org.bitcoins.server
import akka.http.scaladsl.model.ContentTypes
import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.apache.pekko.http.scaladsl.model.ContentTypes
import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
import org.bitcoins.server.routes.ServerCommand
import org.bitcoins.testkit.BitcoinSTestAppConfig
import org.bitcoins.testkitcore.dlc.DLCTestUtil

View file

@ -1,7 +1,7 @@
package org.bitcoins.server
import akka.http.scaladsl.model.ContentTypes
import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.apache.pekko.http.scaladsl.model.ContentTypes
import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
import org.bitcoins.core.api.dlc.wallet.db.DLCContactDb
import org.bitcoins.core.currency.{Bitcoins, Satoshis}
import org.bitcoins.core.protocol.dlc.models.ContractInfo

View file

@ -1,8 +1,11 @@
package org.bitcoins.server
import akka.http.scaladsl.model.ContentTypes._
import akka.http.scaladsl.model.StatusCodes
import akka.http.scaladsl.testkit.{RouteTestTimeout, ScalatestRouteTest}
import org.apache.pekko.http.scaladsl.model.ContentTypes._
import org.apache.pekko.http.scaladsl.model.StatusCodes
import org.apache.pekko.http.scaladsl.testkit.{
RouteTestTimeout,
ScalatestRouteTest
}
import org.bitcoins.core.api.chain.ChainApi
import org.bitcoins.core.api.chain.db._
import org.bitcoins.core.api.wallet.db._

View file

@ -1,7 +1,7 @@
package org.bitcoins.server
import akka.http.scaladsl.model.ContentTypes._
import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.apache.pekko.http.scaladsl.model.ContentTypes._
import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
import org.bitcoins.core.api.chain.ChainApi
import org.bitcoins.core.protocol.BitcoinAddress
import org.bitcoins.core.protocol.dlc.models.DLCMessage.{DLCAccept, DLCOffer}

View file

@ -1,15 +1,18 @@
package org.bitcoins.server
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.headers.{Authorization, BasicHttpCredentials}
import akka.http.scaladsl.model.ws.{
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.model.headers.{
Authorization,
BasicHttpCredentials
}
import org.apache.pekko.http.scaladsl.model.ws.{
Message,
TextMessage,
WebSocketRequest,
WebSocketUpgradeResponse
}
import akka.http.scaladsl.model.{HttpHeader, StatusCodes}
import akka.stream.scaladsl.{Flow, Keep, Sink, Source}
import org.apache.pekko.http.scaladsl.model.{HttpHeader, StatusCodes}
import org.apache.pekko.stream.scaladsl.{Flow, Keep, Sink, Source}
import org.bitcoins.cli.ConsoleCli.exec
import org.bitcoins.cli.{CliCommand, Config, ConsoleCli}
import org.bitcoins.commons.jsonmodels.ws.ChainNotification.{
@ -36,7 +39,7 @@ import org.bitcoins.testkit.server.{
BitcoinSServerMainBitcoindFixture,
ServerWithBitcoind
}
import org.bitcoins.testkit.util.AkkaUtil
import org.bitcoins.testkit.util.PekkoUtil
import java.net.InetSocketAddress
import scala.concurrent.duration.DurationInt
@ -163,7 +166,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
val expectedAddress = BitcoinAddress.fromString(expectedAddressStr)
for {
_ <- AkkaUtil.nonBlockingSleep(500.millis)
_ <- PekkoUtil.nonBlockingSleep(500.millis)
_ = promise.success(None)
notifications <- walletNotificationsF
} yield {
@ -203,7 +206,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
getTxCmd = GetTransaction(expectedTxId)
expectedTxStr = ConsoleCli.exec(getTxCmd, cliConfig)
expectedTx = Transaction.fromHex(expectedTxStr.get)
_ <- AkkaUtil.nonBlockingSleep(500.millis)
_ <- PekkoUtil.nonBlockingSleep(500.millis)
_ = promise.success(None)
notifications <- notificationsF
} yield {
@ -242,7 +245,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
getTxCmd = GetTransaction(expectedTxId)
expectedTxStr = ConsoleCli.exec(getTxCmd, cliConfig)
expectedTx = Transaction.fromHex(expectedTxStr.get)
_ <- AkkaUtil.nonBlockingSleep(500.millis)
_ <- PekkoUtil.nonBlockingSleep(500.millis)
_ = promise.success(None)
notifications <- notificationsF
} yield {
@ -276,7 +279,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
getBlockHeaderResultStr = ConsoleCli.exec(cmd, cliConfig)
getBlockHeaderResult = upickle.default.read(getBlockHeaderResultStr.get)(
Picklers.getBlockHeaderResultPickler)
_ <- AkkaUtil.nonBlockingSleep(timeout)
_ <- PekkoUtil.nonBlockingSleep(timeout)
_ = promise.success(None)
notifications <- notificationsF
} yield {
@ -312,7 +315,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
ConsoleCli.exec(unlockCmd, cliConfig)
for {
_ <- AkkaUtil.nonBlockingSleep(500.millis)
_ <- PekkoUtil.nonBlockingSleep(500.millis)
_ = promise.success(None)
notifications <- notificationsF
} yield {
@ -353,7 +356,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
.get
for {
_ <- AkkaUtil.nonBlockingSleep(500.millis)
_ <- PekkoUtil.nonBlockingSleep(500.millis)
_ = promise.success(None)
notifications <- walletNotificationsF
} yield {
@ -392,7 +395,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
ignoreCreationTime = false)
val _ = ConsoleCli.exec(cmd, cliConfig)
for {
_ <- AkkaUtil.nonBlockingSleep(10.second)
_ <- PekkoUtil.nonBlockingSleep(10.second)
_ = promise.success(None)
notifications <- notificationsF
} yield {
@ -415,7 +418,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
val promise = tuple._2._2
for {
_ <- AkkaUtil.nonBlockingSleep(15.seconds)
_ <- PekkoUtil.nonBlockingSleep(15.seconds)
_ = promise.success(None)
notifications <- notificationsF
} yield {
@ -438,7 +441,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
val notificationsF = tuple._2._1
val promise = tuple._2._2
for {
_ <- AkkaUtil.nonBlockingSleep(2.seconds)
_ <- PekkoUtil.nonBlockingSleep(2.seconds)
_ = promise.success(None)
notifications <- notificationsF
} yield {
@ -479,7 +482,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
for {
_ <- setupF
_ = ConsoleCli.exec(acceptMsg, cliConfig)
_ <- AkkaUtil.nonBlockingSleep(500.millis)
_ <- PekkoUtil.nonBlockingSleep(500.millis)
_ = promise.success(None)
notifications <- walletNotificationsF
} yield {
@ -512,7 +515,7 @@ class WebsocketTests extends BitcoinSServerMainBitcoindFixture {
val promise = tuple._2._2
for {
_ <- AkkaUtil.nonBlockingSleep(2.seconds)
_ <- PekkoUtil.nonBlockingSleep(2.seconds)
_ = promise.success(None)
notifications <- notificationsF
} yield assert(notifications.isEmpty)

View file

@ -107,16 +107,16 @@
<!-- Get rid of messages like this:
Connection attempt failed. Backing off new connection
attempts for at least 800 milliseconds. -->
<logger name="akka.http.impl.engine.client.PoolGateway" level="OFF"/>
<logger name="org.apache.pekko.http.impl.engine.client.PoolGateway" level="OFF"/>
<!-- get rid of "Slf4jLogger started" messages -->
<logger name="akka.event.slf4j.Slf4jLogger" level="OFF"/>
<logger name="org.apache.pekko.event.slf4j.Slf4jLogger" level="OFF"/>
<!-- get rid of "Running CoordinatedShutdown Phase" messages -->
<logger name="akka.actor.slf4j.CoordinatedShutdown" level="OFF"/>
<logger name="org.apache.pekko.actor.slf4j.CoordinatedShutdown" level="OFF"/>
<!-- get rid of akka dead letter messages -->
<logger name="akka.actor.RepointableActorRef" level="OFF"/>
<logger name="akka.actor.LocalActorRef" level="OFF"/>
<logger name="org.apache.pekko.actor.RepointableActorRef" level="OFF"/>
<logger name="org.apache.pekko.actor.LocalActorRef" level="OFF"/>
</configuration>

View file

@ -1,8 +1,8 @@
package org.bitcoins.server
import akka.actor.ActorSystem
import com.typesafe.config.{Config, ConfigFactory}
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.chain.config.ChainAppConfig
import org.bitcoins.commons.config.AppConfig.DEFAULT_BITCOIN_S_CONF_FILE
import org.bitcoins.commons.config.{AppConfig, ConfigOps}

View file

@ -1,15 +1,15 @@
package org.bitcoins.server
import akka.actor.ActorSystem
import akka.stream.OverflowStrategy
import akka.stream.scaladsl.{
import org.apache.pekko.{Done, NotUsed}
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.OverflowStrategy
import org.apache.pekko.stream.scaladsl.{
BroadcastHub,
Keep,
Sink,
Source,
SourceQueueWithComplete
}
import akka.{Done, NotUsed}
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.asyncutil.AsyncUtil.Exponential
import org.bitcoins.chain.ChainCallbacks

View file

@ -1,10 +1,16 @@
package org.bitcoins.server
import akka.{Done, NotUsed}
import akka.actor.{ActorSystem, Cancellable}
import akka.stream.BoundedSourceQueue
import akka.stream.scaladsl.{Flow, Keep, RunnableGraph, Sink, Source}
import grizzled.slf4j.Logging
import org.apache.pekko.{Done, NotUsed}
import org.apache.pekko.actor.{ActorSystem, Cancellable}
import org.apache.pekko.stream.BoundedSourceQueue
import org.apache.pekko.stream.scaladsl.{
Flow,
Keep,
RunnableGraph,
Sink,
Source
}
import org.bitcoins.chain.ChainCallbacks
import org.bitcoins.commons.jsonmodels.bitcoind.GetBlockHeaderResult
import org.bitcoins.core.api.node.NodeApi

View file

@ -1,8 +1,8 @@
package org.bitcoins.server
import akka.actor.ActorSystem
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.server.Directives.complete
import org.apache.pekko.http.scaladsl.server.Route
import org.bitcoins.commons.jsonmodels.BitcoinSServerInfo
import org.bitcoins.commons.rpc.GetBlockHeader
import org.bitcoins.commons.serializers.Picklers

View file

@ -1,8 +1,8 @@
package org.bitcoins.server
import akka.actor.ActorSystem
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.server.Directives.complete
import org.apache.pekko.http.scaladsl.server.Route
import org.bitcoins.commons.jsonmodels.{SerializedPSBT, SerializedTransaction}
import org.bitcoins.commons.serializers.Picklers._
import org.bitcoins.core.hd.AddressType

View file

@ -1,8 +1,8 @@
package org.bitcoins.server
import akka.actor.ActorSystem
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.server.Directives.complete
import org.apache.pekko.http.scaladsl.server.Route
import org.bitcoins.commons.rpc._
import org.bitcoins.commons.serializers.Picklers
import org.bitcoins.core.api.dlc.node.DLCNodeApi

View file

@ -1,7 +1,7 @@
package org.bitcoins.server
import akka.actor.ActorSystem
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.api.chain.ChainQueryApi
import org.bitcoins.core.api.commons.ArgumentSource
import org.bitcoins.core.api.dlc.wallet.DLCNeutrinoHDWalletApi

View file

@ -1,8 +1,8 @@
package org.bitcoins.server
import akka.actor.ActorSystem
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.server.Directives.complete
import org.apache.pekko.http.scaladsl.server.Route
import org.bitcoins.core.api.node.NodeApi
import org.bitcoins.node.Node
import org.bitcoins.rpc.client.common.BitcoindRpcClient

View file

@ -1,11 +1,11 @@
package org.bitcoins.server
import akka.actor.ActorSystem
import akka.http.scaladsl.model.HttpEntity
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import akka.stream.Materializer
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.model.HttpEntity
import org.apache.pekko.http.scaladsl.server.Directives.complete
import org.apache.pekko.http.scaladsl.server.Route
import org.apache.pekko.stream.Materializer
import org.bitcoins.commons.rpc._
import org.bitcoins.commons.serializers.Picklers._
import org.bitcoins.core.api.wallet.db.SpendingInfoDb

View file

@ -1,7 +1,7 @@
package org.bitcoins.server.util
import akka.actor.Cancellable
import grizzled.slf4j.Logging
import org.apache.pekko.actor.Cancellable
case class BitcoindPollingCancellable(
blockPollingCancellable: Cancellable,

View file

@ -1,8 +1,8 @@
package org.bitcoins.server.util
import akka.actor.ActorSystem
import akka.stream.scaladsl.{Sink, Source}
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.scaladsl.{Sink, Source}
import org.bitcoins.core.api.dlc.wallet.DLCNeutrinoHDWalletApi
import org.bitcoins.core.api.wallet.{NeutrinoWalletApi, WalletApi}
import org.bitcoins.core.gcs.GolombFilter

View file

@ -1,8 +1,8 @@
package org.bitcoins.server.util
import akka.actor.ActorSystem
import akka.stream.scaladsl.SourceQueueWithComplete
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.scaladsl.SourceQueueWithComplete
import org.bitcoins.chain.config.ChainAppConfig
import org.bitcoins.chain.{
ChainCallbacks,

View file

@ -3,7 +3,7 @@ package org.bitcoins.bench.eclair
import java.io.File
import java.nio.file.{Files, StandardOpenOption}
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.commons.jsonmodels.eclair.PaymentId
import org.bitcoins.core.protocol.ln.currency._
import org.bitcoins.testkit.async.TestAsyncUtil

View file

@ -17,7 +17,7 @@ import org.bitcoins.testkit.rpc.{
BitcoindFixturesCachedPairNewest,
BitcoindRpcTestUtil
}
import org.bitcoins.testkit.util.AkkaUtil
import org.bitcoins.testkit.util.PekkoUtil
import org.scalatest.{FutureOutcome, Outcome}
import java.io.File
@ -64,7 +64,7 @@ class MultiWalletRpcTest extends BitcoindFixturesCachedPairNewest {
_ <- RpcUtil.awaitServerShutdown(walletClient)
// Very rarely we are prevented from starting the client again because Core
// hasn't released its locks on the datadir. This is prevent that.
_ <- AkkaUtil.nonBlockingSleep(1.second)
_ <- PekkoUtil.nonBlockingSleep(1.second)
started <- walletClient.start()
_ <- walletClient.loadWallet(walletName)

View file

@ -29,7 +29,7 @@ import org.bitcoins.testkit.rpc.{
BitcoindFixturesCachedPairV21,
BitcoindRpcTestUtil
}
import org.bitcoins.testkit.util.AkkaUtil
import org.bitcoins.testkit.util.PekkoUtil
import org.scalatest.{FutureOutcome, Outcome}
import java.io.File
@ -64,7 +64,7 @@ class WalletRpcTest extends BitcoindFixturesCachedPairV21 {
_ <- RpcUtil.awaitServerShutdown(walletClient)
// Very rarely we are prevented from starting the client again because Core
// hasn't released its locks on the datadir. This is prevent that.
_ <- AkkaUtil.nonBlockingSleep(1.second)
_ <- PekkoUtil.nonBlockingSleep(1.second)
_ <- walletClient.start()
} yield walletClient
}

View file

@ -1,7 +1,7 @@
package org.bitcoins.rpc.client.common
import akka.actor.ActorSystem
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.api.chain.db.{
BlockHeaderDb,
CompactFilterDb,

View file

@ -1,14 +1,20 @@
package org.bitcoins.rpc.client.common
import akka.actor.ActorSystem
import akka.http.javadsl.model.headers.HttpCredentials
import akka.http.scaladsl.model._
import akka.http.scaladsl.settings.ConnectionPoolSettings
import akka.http.scaladsl.unmarshalling.Unmarshal
import akka.http.scaladsl.{Http, HttpExt}
import akka.stream.StreamTcpException
import com.fasterxml.jackson.core.JsonParseException
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.javadsl.model.headers.HttpCredentials
import org.apache.pekko.http.scaladsl.{Http, HttpExt}
import org.apache.pekko.http.scaladsl.model.{
ContentTypes,
HttpEntity,
HttpMethods,
HttpRequest,
HttpResponse
}
import org.apache.pekko.http.scaladsl.settings.ConnectionPoolSettings
import org.apache.pekko.http.scaladsl.unmarshalling.Unmarshal
import org.apache.pekko.stream.StreamTcpException
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.commons.jsonmodels.bitcoind.RpcOpts
import org.bitcoins.commons.serializers.JsonSerializers._

View file

@ -1,6 +1,6 @@
package org.bitcoins.rpc.client.v21
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.commons.jsonmodels.bitcoind._
import org.bitcoins.commons.serializers.JsonSerializers._
import org.bitcoins.commons.serializers.JsonWriters._

View file

@ -1,6 +1,6 @@
package org.bitcoins.rpc.client.v22
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.rpc.client.common.{
BitcoindRpcClient,
BitcoindVersion,

View file

@ -1,6 +1,6 @@
package org.bitcoins.rpc.client.v23
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.rpc.client.common.{BitcoindRpcClient, BitcoindVersion}
import org.bitcoins.rpc.client.v22.BitcoindV22RpcClient
import org.bitcoins.rpc.config.BitcoindInstance

View file

@ -1,6 +1,6 @@
package org.bitcoins.rpc.client.v24
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.commons.jsonmodels.bitcoind.{
GetTxSpendingPrevOutResult,
SimulateRawTransactionResult

View file

@ -1,8 +1,8 @@
package org.bitcoins.rpc.config
import akka.actor.ActorSystem
import com.typesafe.config.ConfigFactory
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.commons.util.NativeProcessFactory
import org.bitcoins.core.api.commons.{InstanceFactory, InstanceFactoryLocal}
import org.bitcoins.core.api.tor.Socks5ProxyParams

View file

@ -1,7 +1,7 @@
package org.bitcoins.rpc.config
import akka.actor.ActorSystem
import com.typesafe.config.Config
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.commons.config.{AppConfig, ConfigOps}
import org.bitcoins.core.api.tor.Socks5ProxyParams

View file

@ -1,6 +1,6 @@
package org.bitcoins.rpc.util
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.commons.config.{AppConfig, AppConfigFactoryBase}
/** An AppConfigFactory that has implicit actor systems passed into the datadir */

View file

@ -1,7 +1,7 @@
package org.bitcoins.rpc.util
import akka.NotUsed
import akka.stream.scaladsl.Flow
import org.apache.pekko.NotUsed
import org.apache.pekko.stream.scaladsl.Flow
import org.bitcoins.commons.jsonmodels.bitcoind.GetBlockHeaderResult
import org.bitcoins.core.protocol.blockchain.Block
import org.bitcoins.crypto.DoubleSha256Digest

View file

@ -1,7 +1,7 @@
package com.bitcoins.clightning.rpc
import akka.http.scaladsl.model._
import akka.util._
import org.apache.pekko.http.scaladsl.model.{ContentTypes, HttpEntity}
import org.apache.pekko.util.ByteString
import org.newsclub.net.unix.AFUNIXSocketAddress
import play.api.libs.json._

View file

@ -1,6 +1,6 @@
package com.bitcoins.clightning.rpc.config
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.api.commons.InstanceFactoryLocal
import org.bitcoins.core.config._
import org.bitcoins.rpc.config.BitcoindAuthCredentials.PasswordBased

View file

@ -21,7 +21,7 @@ class TaprootTxTests extends BitcoinSAsyncTest {
override lazy val timeLimit: Span = 10.minutes
implicit override val executionContext: ExecutionContext =
system.dispatchers.lookup("akka.actor.multi-core-dispatcher")
system.dispatchers.lookup("pekko.actor.multi-core-dispatcher")
//these tests are from
//https://raw.githubusercontent.com/bitcoin-core/qa-assets/main/unit_test_data/script_assets_test.json

View file

@ -243,7 +243,7 @@ bitcoin-s {
}
}
akka {
pekko {
# keep the connection alive in websockets by sending ping every 5 seconds
# https://doc.akka.io/docs/akka-http/current/server-side/websocket-support.html#automatic-keep-alive-ping-support
@ -258,7 +258,7 @@ akka {
# Loggers to register at boot time (akka.event.Logging$DefaultLogger logs
# to STDOUT)
loggers = ["akka.event.slf4j.Slf4jLogger"]
loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"]
# Log level used by the configured loggers (see "loggers") as soon
# as they have been started; before that, see "stdout-loglevel"
@ -272,7 +272,7 @@ akka {
# Filter of log events that is used by the LoggingAdapter before
# publishing log events to the eventStream.
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter"
use-slf4j = on

View file

@ -1,6 +1,6 @@
package org.bitcoins.dlc.node
import akka.actor.ActorRef
import org.apache.pekko.actor.ActorRef
import org.bitcoins.core.api.node.Peer
import org.bitcoins.core.number.UInt32
import org.bitcoins.core.protocol.BigSizeUInt

View file

@ -1,7 +1,7 @@
package org.bitcoins.dlc.node
import akka.actor.ActorRef
import akka.testkit.{TestActorRef, TestProbe}
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.testkit.{TestActorRef, TestProbe}
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.core.api.node.Peer
import org.bitcoins.core.number.UInt16

View file

@ -1,7 +1,7 @@
package org.bitcoins.dlc.node
import akka.actor.ActorRef
import akka.testkit.{TestActorRef, TestProbe}
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.testkit.{TestActorRef, TestProbe}
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.core.api.node.Peer
import org.bitcoins.core.api.tor.Socks5ProxyParams

View file

@ -1,8 +1,15 @@
package org.bitcoins.dlc.node
import akka.actor._
import akka.event.LoggingReceive
import akka.io.{IO, Tcp}
import org.apache.pekko.actor.{
Actor,
ActorLogging,
ActorRef,
ActorSystem,
Props,
Terminated
}
import org.apache.pekko.event.LoggingReceive
import org.apache.pekko.io.{IO, Tcp}
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi
import org.bitcoins.core.api.node.Peer
import org.bitcoins.core.api.tor.Socks5ProxyParams

View file

@ -1,10 +1,10 @@
package org.bitcoins.dlc.node
import akka.actor._
import akka.event.LoggingReceive
import akka.io.Tcp
import akka.util.ByteString
import grizzled.slf4j.Logging
import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, Props, Terminated}
import org.apache.pekko.event.LoggingReceive
import org.apache.pekko.io.Tcp
import org.apache.pekko.util.ByteString
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi
import org.bitcoins.core.protocol.BigSizeUInt
import org.bitcoins.core.protocol.tlv._

View file

@ -1,7 +1,14 @@
package org.bitcoins.dlc.node
import akka.actor._
import akka.event.LoggingReceive
import org.apache.pekko.actor.{
Actor,
ActorContext,
ActorLogging,
ActorRef,
Props,
Terminated
}
import org.apache.pekko.event.LoggingReceive
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi
import org.bitcoins.core.protocol.tlv._

View file

@ -1,7 +1,7 @@
package org.bitcoins.dlc.node
import akka.actor.{ActorRef, ActorSystem}
import grizzled.slf4j.Logging
import org.apache.pekko.actor.{ActorRef, ActorSystem}
import org.bitcoins.core.api.dlc.node.DLCNodeApi
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi
import org.bitcoins.core.api.node.Peer

View file

@ -1,9 +1,15 @@
package org.bitcoins.dlc.node
import akka.actor._
import akka.event.LoggingReceive
import akka.io.{IO, Tcp}
import grizzled.slf4j.Logging
import org.apache.pekko.actor.{
Actor,
ActorLogging,
ActorRef,
ActorSystem,
Props
}
import org.apache.pekko.event.LoggingReceive
import org.apache.pekko.io.{IO, Tcp}
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi
import org.bitcoins.core.protocol.BigSizeUInt
import org.bitcoins.tor._

View file

@ -1,7 +1,7 @@
package org.bitcoins.dlc.node.config
import akka.actor.ActorSystem
import com.typesafe.config.Config
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.commons.config.{AppConfig, AppConfigFactory}
import org.bitcoins.core.api.CallbackConfig
import org.bitcoins.core.api.dlc.wallet.DLCWalletApi

View file

@ -1,7 +1,7 @@
package org.bitcoins.dlc.wallet
import akka.actor.ActorSystem
import com.typesafe.config.Config
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.commons.config.{AppConfigFactoryBase, ConfigOps}
import org.bitcoins.core.api.CallbackConfig
import org.bitcoins.core.api.chain.ChainQueryApi

View file

@ -1,10 +1,15 @@
package org.bitcoins.dlc.wallet.callback
import akka.Done
import akka.actor.ActorSystem
import akka.stream.OverflowStrategy
import akka.stream.scaladsl.{Keep, Sink, Source, SourceQueueWithComplete}
import grizzled.slf4j.{Logging}
import grizzled.slf4j.Logging
import org.apache.pekko.Done
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.OverflowStrategy
import org.apache.pekko.stream.scaladsl.{
Keep,
Sink,
Source,
SourceQueueWithComplete
}
import org.bitcoins.core.api.CallbackHandler
import org.bitcoins.core.api.dlc.wallet.db.IncomingDLCOfferDb
import org.bitcoins.core.protocol.dlc.models.DLCStatus
@ -12,7 +17,7 @@ import org.bitcoins.core.util.StartStopAsync
import org.bitcoins.crypto.Sha256Digest
import java.util.concurrent.atomic.AtomicBoolean
import scala.concurrent.{Future}
import scala.concurrent.Future
case class DLCWalletCallbackStreamManager(
callbacks: DLCWalletCallbacks,

View file

@ -4,7 +4,7 @@ title: Chain Query API
---
```scala mdoc:invisible
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.api.chain.ChainQueryApi
import org.bitcoins.core.api.chain.ChainQueryApi.FilterResponse
import org.bitcoins.crypto._

View file

@ -24,7 +24,7 @@ import org.bitcoins.chain.config.ChainAppConfig
import org.bitcoins.rpc.config.BitcoindInstanceLocal
import org.bitcoins.rpc.client.common.BitcoindRpcClient
import org.bitcoins.testkit.chain._
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import scala.concurrent._
import java.nio.file.Files
```

View file

@ -22,7 +22,7 @@ Our internal infrastructure depends on one function to be implemented to be able
```scala mdoc:invisible
import scala.concurrent.Future
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.gcs._
import org.bitcoins.core.protocol.blockchain.BlockHeader

View file

@ -19,7 +19,7 @@ The resolved configuration gets parsed by
projects. Here's some examples of how to construct a wallet configuration:
```scala mdoc:compile-only
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.wallet.config.WalletAppConfig
import com.typesafe.config.ConfigFactory
import java.nio.file.Paths
@ -413,7 +413,7 @@ bitcoin-s {
}
akka {
pekko {
loglevel = "OFF"
stdout-loglevel = "OFF"
http {

View file

@ -3,7 +3,7 @@ id: node-api title: Node API
---
```scala mdoc:invisible
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.api.node._
import org.bitcoins.crypto._
import org.bitcoins.core.protocol.blockchain.Block

View file

@ -41,7 +41,7 @@ For your node to be able to service these filters you will need set
`blockfilterindex=1` and `peerblockfilters=1` in your `bitcoin.conf` file.
```scala mdoc:invisible
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.protocol.blockchain.Block
import org.bitcoins.node._
import org.bitcoins.rpc.client.common.BitcoindVersion

View file

@ -44,7 +44,7 @@ import org.bitcoins.rpc.BitcoindWalletException
import org.bitcoins.crypto._
import org.bitcoins.core.protocol._
import org.bitcoins.core.currency._
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
```
```scala mdoc:compile-only

View file

@ -34,7 +34,7 @@ We will default to using the `binary` field first when trying to start the jar,
Here is an example of how to start eclair:
```scala mdoc:invisible
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.eclair.rpc.client.EclairRpcClient
import org.bitcoins.eclair.rpc.config.EclairInstanceLocal
import java.nio.file.Paths

View file

@ -30,7 +30,7 @@ We will default to using the `binary` field first when trying to start the jar,
Here is an example of how to start lnd:
```scala mdoc:invisible
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.lnd.rpc._
import org.bitcoins.lnd.rpc.config._
import java.nio.file.Paths

View file

@ -12,7 +12,7 @@ There are other examples of these in the Scala ecosystem like the `akka-testkit`
We use this testkit to test bitcoin-s it self.
```scala mdoc:invisible
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.protocol.ln.currency._
import org.bitcoins.rpc.client.common._
import org.bitcoins.testkit.rpc._

View file

@ -32,7 +32,7 @@ that you are notified of the event. For instance, if your DLC transitions from
Here is an example of constructing a wallet and registering a callback, so you can be notified of an event.
```scala mdoc:invisible
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.crypto._
import org.bitcoins.core.protocol.transaction.Transaction
import org.bitcoins.core.wallet.fee._

View file

@ -49,7 +49,7 @@ import org.bitcoins.server.BitcoinSAppConfig
import org.bitcoins.wallet.config.WalletAppConfig
import org.bitcoins.wallet.callback.WalletCallbacks
import org.bitcoins.testkit.node.MockNodeApi
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import scala.concurrent._
import scala.concurrent.duration.DurationInt
```

View file

@ -64,7 +64,7 @@ Given these for things, we can use [`WalletSync.syncFullBlocks`](https://github.
Here is a code example
```scala mdoc:invisible
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import scala.concurrent._

View file

@ -69,7 +69,7 @@ import org.bitcoins.wallet.Wallet
import com.typesafe.config.ConfigFactory
import java.nio.file.Files
import scala.concurrent._
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
val chainApi = new ChainQueryApi {
override def epochSecondToBlockHeight(time: Long): Future[Int] = Future.successful(0)

View file

@ -1,6 +1,6 @@
package org.bitcoins.eclair.rpc
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.eclair.rpc.client.EclairRpcClient
import org.bitcoins.testkit.eclair.rpc.EclairRpcTestUtil
import org.bitcoins.testkit.util.BitcoinSAsyncTest

View file

@ -1,14 +1,27 @@
package org.bitcoins.eclair.rpc.client
import akka.Done
import akka.actor.ActorSystem
import akka.http.javadsl.model.headers.HttpCredentials
import akka.http.scaladsl.Http
import akka.http.scaladsl.model._
import akka.http.scaladsl.model.headers.{Authorization, BasicHttpCredentials}
import akka.http.scaladsl.model.ws.{Message, TextMessage, WebSocketRequest}
import akka.stream.scaladsl.{Flow, Sink, Source}
import akka.util.ByteString
import org.apache.pekko.Done
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.javadsl.model.headers.HttpCredentials
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.model.headers.{
Authorization,
BasicHttpCredentials
}
import org.apache.pekko.http.scaladsl.model.ws.{
Message,
TextMessage,
WebSocketRequest
}
import org.apache.pekko.http.scaladsl.model.{
FormData,
HttpMethods,
HttpRequest,
HttpResponse,
StatusCodes
}
import org.apache.pekko.stream.scaladsl.{Flow, Sink, Source}
import org.apache.pekko.util.ByteString
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.commons.jsonmodels.eclair._
import org.bitcoins.commons.serializers.JsonReaders._
@ -817,8 +830,8 @@ class EclairRpcClient(
/** Pings eclair to see if a invoice has been paid
* If the invoice has been paid or the payment has failed, we publish a
* [[OutgoingPayment]]
* event to the [[akka.actor.ActorSystem ActorSystem]]'s
* [[akka.event.EventStream ActorSystem.eventStream]]
* event to the [[org.apache.pekko.actor.ActorSystem ActorSystem]]'s
* [[org.apache.pekko.event.EventStream ActorSystem.eventStream]]
*
* We also return a Future[PaymentResult] that is completed when one of three things is true
* 1. The payment has succeeded

View file

@ -1,7 +1,7 @@
package org.bitcoins.eclair.rpc.config
import akka.actor.ActorSystem
import com.typesafe.config.{Config, ConfigFactory}
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.api.commons.InstanceFactoryLocal
import org.bitcoins.core.api.tor.Socks5ProxyParams
import org.bitcoins.core.config.{MainNet, NetworkParameters, RegTest, TestNet3}

View file

@ -1,10 +1,10 @@
package org.bitcoins.esplora
import akka.actor.ActorSystem
import akka.http.scaladsl._
import akka.http.scaladsl.client.RequestBuilding.Post
import akka.http.scaladsl.model._
import akka.util.ByteString
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.client.RequestBuilding.Post
import org.apache.pekko.http.scaladsl.model.{HttpMethods, HttpRequest}
import org.apache.pekko.http.scaladsl.{Http, HttpExt}
import org.apache.pekko.util.ByteString
import org.bitcoins.core.api.chain.ChainQueryApi
import org.bitcoins.core.api.tor.Socks5ProxyParams
import org.bitcoins.core.protocol.blockchain.{Block, BlockHeader}

View file

@ -1,7 +1,7 @@
package org.bitcoins.feeprovider
import akka.actor.ActorSystem
import akka.http.scaladsl.model.Uri
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.model.Uri
import org.bitcoins.commons.jsonmodels.wallet.BitGoResult
import org.bitcoins.commons.serializers.JsonSerializers._
import org.bitcoins.core.api.tor.Socks5ProxyParams

View file

@ -1,7 +1,7 @@
package org.bitcoins.feeprovider
import akka.actor.ActorSystem
import akka.http.scaladsl.model.Uri
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.model.Uri
import org.bitcoins.commons.jsonmodels.wallet.BitcoinerLiveResult
import org.bitcoins.commons.serializers.JsonSerializers._
import org.bitcoins.core.api.tor.Socks5ProxyParams

View file

@ -1,7 +1,7 @@
package org.bitcoins.feeprovider
import akka.actor.ActorSystem
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.api.feeprovider.FeeRateApi
import org.bitcoins.core.api.tor.Socks5ProxyParams
import org.bitcoins.core.config.BitcoinNetwork

View file

@ -1,10 +1,11 @@
package org.bitcoins.feeprovider
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.model.{HttpRequest, Uri}
import org.apache.pekko.util.ByteString
import java.time.{Duration, Instant}
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.{HttpRequest, Uri}
import akka.util.ByteString
import org.bitcoins.core.api.feeprovider.FeeRateApi
import org.bitcoins.core.api.tor.Socks5ProxyParams
import org.bitcoins.core.util.TimeUtil

View file

@ -1,7 +1,7 @@
package org.bitcoins.feeprovider
import akka.actor.ActorSystem
import akka.http.scaladsl.model.Uri
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.model.Uri
import org.bitcoins.commons.jsonmodels.wallet.MempoolSpaceResult
import org.bitcoins.commons.serializers.JsonSerializers._
import org.bitcoins.core.api.tor.Socks5ProxyParams

View file

@ -1,7 +1,7 @@
package org.bitcoins.lnd.rpc
import akka.stream._
import akka.stream.scaladsl._
import org.apache.pekko.stream._
import org.apache.pekko.stream.scaladsl._
import lnrpc._
import org.bitcoins.core.currency._
import org.bitcoins.core.number._

View file

@ -8,7 +8,7 @@ libraryDependencies ++= Deps.lndRpc
CommonSettings.prodSettings
enablePlugins(AkkaGrpcPlugin)
enablePlugins(PekkoGrpcPlugin)
// Disable deprecation and unused imports warning otherwise generated files will cause errors
Compile / scalacOptions ++= Seq(

View file

@ -1,9 +1,8 @@
package org.bitcoins.lnd.rpc
import akka.NotUsed
import akka.actor.ActorSystem
import akka.grpc.{GrpcClientSettings, SSLContextUtils}
import akka.stream.scaladsl.{Sink, Source}
import org.apache.pekko.NotUsed
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.scaladsl.{Sink, Source}
import chainrpc._
import com.google.protobuf.ByteString
import grizzled.slf4j.Logging
@ -13,6 +12,7 @@ import io.grpc.{CallCredentials, Metadata}
import lnrpc.ChannelPoint.FundingTxid.FundingTxidBytes
import lnrpc.CloseStatusUpdate.Update.{ChanClose, ClosePending}
import lnrpc._
import org.apache.pekko.grpc.{GrpcClientSettings, SSLContextUtils}
import org.bitcoins.commons.jsonmodels.lnd._
import org.bitcoins.commons.util.NativeProcessFactory
import org.bitcoins.core.currency._

View file

@ -1,6 +1,6 @@
package org.bitcoins.lnd.rpc.config
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.core.api.commons.InstanceFactoryLocal
import org.bitcoins.core.config._
import scodec.bits._

View file

@ -1,12 +1,12 @@
package org.bitcoins.lnurl
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.client.RequestBuilding.Get
import akka.http.scaladsl.model.headers.Accept
import akka.http.scaladsl.model.{HttpRequest, MediaTypes}
import akka.util.ByteString
import grizzled.slf4j.Logging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.client.RequestBuilding.Get
import org.apache.pekko.http.scaladsl.model.{HttpRequest, MediaTypes}
import org.apache.pekko.http.scaladsl.model.headers.Accept
import org.apache.pekko.util.ByteString
import org.bitcoins.core.api.tor.Socks5ProxyParams
import org.bitcoins.core.currency._
import org.bitcoins.core.protocol.ln.LnInvoice

View file

@ -1,6 +1,6 @@
package org.bitcoins.node
import akka.actor.Cancellable
import org.apache.pekko.actor.Cancellable
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.chain.models.{CompactFilterDAO, CompactFilterHeaderDAO}
import org.bitcoins.core.api.node.Peer
@ -11,7 +11,7 @@ import org.bitcoins.server.BitcoinSAppConfig
import org.bitcoins.testkit.BitcoinSTestAppConfig
import org.bitcoins.testkit.node.fixture.NeutrinoNodeConnectedWithBitcoinds
import org.bitcoins.testkit.node.{NodeTestUtil, NodeTestWithCachedBitcoindPair}
import org.bitcoins.testkit.util.{AkkaUtil, TorUtil}
import org.bitcoins.testkit.util.{PekkoUtil, TorUtil}
import org.scalatest.{Assertion, FutureOutcome, Outcome}
import scala.concurrent.Future
@ -240,7 +240,7 @@ class NeutrinoNodeTest extends NodeTestWithCachedBitcoindPair {
for {
_ <- NodeTestUtil.awaitSyncAndIBD(node, bitcoind)
_ <- AkkaUtil.nonBlockingSleep(3.seconds)
_ <- PekkoUtil.nonBlockingSleep(3.seconds)
//have to generate the block headers independent of one another
//rather than just calling generateToAddress(2,junkAddress)
//because of this bitcoin core bug: https://github.com/bitcoin-s/bitcoin-s/issues/1098

View file

@ -15,7 +15,7 @@ import org.bitcoins.testkit.node.{
NodeTestUtil,
NodeTestWithCachedBitcoindNewest
}
import org.bitcoins.testkit.util.AkkaUtil
import org.bitcoins.testkit.util.PekkoUtil
import org.bitcoins.testkit.wallet.BitcoinSWalletTest
import org.scalatest.{FutureOutcome, Outcome}
@ -278,7 +278,7 @@ class NeutrinoNodeWithWalletTest extends NodeTestWithCachedBitcoindNewest {
//broadcast tx
_ <- bitcoind.sendRawTransaction(tx)
_ <- bitcoind.generateToAddress(1, bitcoindAddr)
_ <- AkkaUtil.nonBlockingSleep(3.seconds)
_ <- PekkoUtil.nonBlockingSleep(3.seconds)
//bring node back online
startedNode <- stoppedNode.start()

View file

@ -1,24 +1,24 @@
package org.bitcoins.node
import akka.actor.{ActorSystem, Cancellable}
import akka.stream.scaladsl.{
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.chain.config.ChainAppConfig
import org.bitcoins.core.api.chain.ChainQueryApi.FilterResponse
import NodeState.DoneSyncing
import org.apache.pekko.{Done, NotUsed}
import org.apache.pekko.actor.{ActorSystem, Cancellable}
import org.apache.pekko.stream.{
ActorAttributes,
OverflowStrategy,
QueueOfferResult,
Supervision
}
import org.apache.pekko.stream.scaladsl.{
Keep,
RunnableGraph,
Source,
SourceQueue,
SourceQueueWithComplete
}
import akka.stream.{
ActorAttributes,
OverflowStrategy,
QueueOfferResult,
Supervision
}
import akka.{Done, NotUsed}
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.chain.config.ChainAppConfig
import org.bitcoins.core.api.chain.ChainQueryApi.FilterResponse
import NodeState.DoneSyncing
import org.bitcoins.core.api.node.{NodeType, Peer}
import org.bitcoins.core.protocol.BlockStamp
import org.bitcoins.node.config.NodeAppConfig

View file

@ -1,6 +1,6 @@
package org.bitcoins.node
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.chain.blockchain.ChainHandlerCached
import org.bitcoins.chain.config.ChainAppConfig
import org.bitcoins.chain.models.{

View file

@ -1,7 +1,7 @@
package org.bitcoins.node
import akka.Done
import akka.actor.ActorSystem
import org.apache.pekko.Done
import org.apache.pekko.actor.ActorSystem
import org.bitcoins.chain.config.ChainAppConfig
import org.bitcoins.core.api.node.{Peer, PeerWithServices}
import org.bitcoins.core.p2p.ServiceIdentifier

View file

@ -1,7 +1,7 @@
package org.bitcoins.node
import akka.actor.{ActorSystem, Cancellable}
import akka.stream.scaladsl.SourceQueue
import org.apache.pekko.actor.{ActorSystem, Cancellable}
import org.apache.pekko.stream.scaladsl.SourceQueue
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.chain.config.ChainAppConfig
import org.bitcoins.core.api.node.{Peer, PeerManagerApi}

View file

@ -1,8 +1,8 @@
package org.bitcoins.node
import akka.actor.{ActorSystem, Cancellable}
import akka.stream.scaladsl.{Sink, SourceQueue}
import grizzled.slf4j.Logging
import org.apache.pekko.actor.{ActorSystem, Cancellable}
import org.apache.pekko.stream.scaladsl.{Sink, SourceQueue}
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.chain.blockchain.ChainHandler
import org.bitcoins.chain.config.ChainAppConfig

Some files were not shown because too many files have changed in this diff Show more