Bump to lnd 18.x (#5695)

* Bump to lnd 18.x

* Fix version

* Fix windows hash
This commit is contained in:
Chris Stewart 2024-10-04 11:32:55 -05:00 committed by GitHub
parent e695474c61
commit bbac2590ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 35 deletions

View File

@ -40,7 +40,7 @@ TaskKeys.downloadLnd := {
Files.createDirectories(binaryDir)
}
val version = "0.17.5-beta"
val version = "0.18.3-beta"
val (platform, suffix) =
if (Properties.isLinux) ("linux-amd64", "tar.gz")
@ -75,13 +75,13 @@ TaskKeys.downloadLnd := {
val expectedHash =
if (Properties.isLinux)
"c06d96222990ecb240affba44c92413c26481057d9448657b18b6f0ab6a56d47"
"b7ef62befece22bbc60227d63280dee4dfa7ec46ec780f33988cece5a70b4b05"
else if (Properties.isMac && System.getProperty("os.arch") == "aarch64")
"fa88dc3e05605f71ec4a8c1cf608bc3b0d166caa5e0bbe2213e35c62346b31fd"
"69b43b6c84884305f856ca0fd2ac55263a54c1dedf43a7c8fb620bebc8453147"
else if (Properties.isMac)
"71ec034b2e62a6db29c88d941f8e8902fa6070ce45e1b3c22d529313ae5fd0ce"
else if (Properties.isWin)
"9b6f0ada7910d5beddc44d6eef3a92206d3f7f06c19e9e3dcc412dd6a0d6182d"
"07b5f5e6a97361850ffd3188d084a59a85c04397bbe9948f5d254152c6e9aa97"
else sys.error(s"Unsupported OS: ${Properties.osName}")
val success = hash.equalsIgnoreCase(expectedHash)

View File

@ -112,7 +112,7 @@ import scala.util.Try
/** @param binaryOpt
* Path to lnd executable
*/
class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
case class LndRpcClient(instance: LndInstance, binaryOpt: Option[File] = None)(
implicit val system: ActorSystem
) extends NativeProcessFactory
with LndUtils
@ -1263,11 +1263,6 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
for {
_ <- stopF
_ <- stopBinary()
_ <- {
if (system.name == LndRpcClient.ActorSystemName)
system.terminate()
else Future.unit
}
} yield this
}
@ -1288,32 +1283,8 @@ object LndRpcClient {
hex"8c45ee0b90e3afd0fb4d6f39afa3c5d551ee5f2c7ac2d06820ed3d16582186d2"
/** The current version we support of Lnd */
private[bitcoins] val version = "v0.17.5-beta"
private[bitcoins] val version = "v0.18.3-beta"
/** Key used for adding the macaroon to the gRPC header */
private[lnd] val macaroonKey = "macaroon"
/** THe name we use to create actor systems. We use this to know which actor
* systems to shut down on node shutdown
*/
private[lnd] val ActorSystemName = "lnd-rpc-client-created-by-bitcoin-s"
/** Creates an RPC client from the given instance, together with the given
* actor system. This is for advanced users, where you need fine grained
* control over the RPC client.
*/
def apply(
instance: LndInstance,
binary: Option[File] = None
): LndRpcClient = {
implicit val system: ActorSystem = ActorSystem.create(ActorSystemName)
withActorSystem(instance, binary)
}
/** Constructs a RPC client from the given datadir, or the default datadir if
* no directory is provided
*/
def withActorSystem(instance: LndInstance, binary: Option[File] = None)(
implicit system: ActorSystem
) = new LndRpcClient(instance, binary)
}