use lightning-kmp 1.6.2-FEECREDIT-4
This commit is contained in:
parent
0698418f09
commit
d36ad92ed5
@ -1,6 +1,6 @@
|
|||||||
object Versions {
|
object Versions {
|
||||||
val kotlin = "1.9.23"
|
val kotlin = "1.9.23"
|
||||||
val lightningKmp = "1.6.2-FEECREDIT-3"
|
val lightningKmp = "1.6.2-FEECREDIT-4-SNAPSHOT"
|
||||||
val sqlDelight = "2.0.1"
|
val sqlDelight = "2.0.1"
|
||||||
val okio = "3.8.0"
|
val okio = "3.8.0"
|
||||||
val clikt = "4.2.2"
|
val clikt = "4.2.2"
|
||||||
|
@ -74,7 +74,15 @@ class Phoenixd : CliktCommand() {
|
|||||||
private val chain by option("--chain", help = "Bitcoin chain to use").choice(
|
private val chain by option("--chain", help = "Bitcoin chain to use").choice(
|
||||||
"mainnet" to Chain.Mainnet, "testnet" to Chain.Testnet
|
"mainnet" to Chain.Mainnet, "testnet" to Chain.Testnet
|
||||||
).default(Chain.Mainnet, defaultForHelp = "mainnet")
|
).default(Chain.Mainnet, defaultForHelp = "mainnet")
|
||||||
private val customMempoolSpaceHost by option("--mempool-space", help = "Custom mempool.space instance")
|
private val mempoolSpaceUrl by option("--mempool-space-url", help = "Custom mempool.space instance")
|
||||||
|
.convert { Url(it) }
|
||||||
|
.defaultLazy {
|
||||||
|
when (chain) {
|
||||||
|
Chain.Mainnet -> MempoolSpaceClient.OfficialMempoolMainnet
|
||||||
|
Chain.Testnet -> MempoolSpaceClient.OfficialMempoolTestnet
|
||||||
|
else -> error("unsupported chain")
|
||||||
|
}
|
||||||
|
}
|
||||||
private val mempoolPollingInterval by option("--mempool-space-polling-interval-minutes", help = "Polling interval for mempool.space API", hidden = true)
|
private val mempoolPollingInterval by option("--mempool-space-polling-interval-minutes", help = "Polling interval for mempool.space API", hidden = true)
|
||||||
.int().convert { it.minutes }
|
.int().convert { it.minutes }
|
||||||
.default(10.minutes)
|
.default(10.minutes)
|
||||||
@ -202,11 +210,6 @@ class Phoenixd : CliktCommand() {
|
|||||||
if (verbosity == Verbosity.Verbose) add(CommonWriter(TimestampFormatter))
|
if (verbosity == Verbosity.Verbose) add(CommonWriter(TimestampFormatter))
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
val mempoolSpaceHost = customMempoolSpaceHost ?: when (chain) {
|
|
||||||
Chain.Mainnet -> "mempool.space"
|
|
||||||
Chain.Testnet -> "mempool.space/testnet"
|
|
||||||
else -> error("unsupported chain")
|
|
||||||
}
|
|
||||||
val lsp = LSP.from(chain)
|
val lsp = LSP.from(chain)
|
||||||
val liquidityPolicy = LiquidityPolicy.Auto(
|
val liquidityPolicy = LiquidityPolicy.Auto(
|
||||||
maxAbsoluteFee = liquidityOptions.maxAbsoluteFee,
|
maxAbsoluteFee = liquidityOptions.maxAbsoluteFee,
|
||||||
@ -247,7 +250,7 @@ class Phoenixd : CliktCommand() {
|
|||||||
val channelsDb = SqliteChannelsDb(driver, database)
|
val channelsDb = SqliteChannelsDb(driver, database)
|
||||||
val paymentsDb = SqlitePaymentsDb(database)
|
val paymentsDb = SqlitePaymentsDb(database)
|
||||||
|
|
||||||
val mempoolSpace = MempoolSpaceClient(mempoolSpaceHost, loggerFactory)
|
val mempoolSpace = MempoolSpaceClient(mempoolSpaceUrl, loggerFactory)
|
||||||
val watcher = MempoolSpaceWatcher(mempoolSpace, scope, loggerFactory, pollingInterval = mempoolPollingInterval)
|
val watcher = MempoolSpaceWatcher(mempoolSpace, scope, loggerFactory, pollingInterval = mempoolPollingInterval)
|
||||||
val peer = Peer(
|
val peer = Peer(
|
||||||
nodeParams = nodeParams, walletParams = lsp.walletParams, client = mempoolSpace, watcher = watcher, db = object : Databases {
|
nodeParams = nodeParams, walletParams = lsp.walletParams, client = mempoolSpace, watcher = watcher, db = object : Databases {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user