Skip to content

Commit

Permalink
fix pay-lnurl, use IO.async_ instead of Dispatcher whenever possible …
Browse files Browse the repository at this point in the history
…+ some other minor quibbles.
  • Loading branch information
fiatjaf committed Jul 5, 2022
1 parent f7d23e3 commit d984c93
Show file tree
Hide file tree
Showing 5 changed files with 281 additions and 170 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ enablePlugins(NativeImagePlugin)
name := "cliche"
organization := "fiatjaf"
scalaVersion := "2.13.8"
version := "0.5.0"
version := "0.4.4"
libraryDependencies ++= Seq(
"com.fiatjaf" % "immortan_2.13" % "0.7.2-SNAPSHOT",
"com.fiatjaf" % "immortan_2.13" % "0.7.2",
"com.github.alexarchambault" % "case-app_2.13" % "2.1.0-M13",
"com.lihaoyi" % "requests_2.13" % "0.7.0",
"com.iheart" % "ficus_2.13" % "1.5.0",
Expand Down
135 changes: 70 additions & 65 deletions native-image-configs/reflect-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
"allDeclaredFields":true,
"queryAllPublicMethods":true
},
{
"name":"PayLnurl",
"allDeclaredFields":true,
"queryAllPublicMethods":true
},
{
"name":"RemoveHostedChannel",
"allDeclaredFields":true,
Expand Down Expand Up @@ -208,8 +213,8 @@
{
"name":"fr.acinq.eclair.blockchain.electrum.ElectrumClient$ExceptionHandler",
"queriedMethods":[
{"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"write","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object","io.netty.channel.ChannelPromise"] }
]
},
Expand All @@ -219,7 +224,7 @@
{
"name":"fr.acinq.eclair.blockchain.electrum.ElectrumClient$ResponseHandler",
"queriedMethods":[
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }
]
},
Expand All @@ -238,11 +243,11 @@
{
"name":"io.netty.channel.ChannelDuplexHandler",
"queriedMethods":[
{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"read","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }
]
},
Expand All @@ -253,69 +258,69 @@
{
"name":"io.netty.channel.ChannelInboundHandlerAdapter",
"queriedMethods":[
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }
]
},
{
"name":"io.netty.channel.ChannelInitializer",
"queriedMethods":[
{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }
]
},
{
"name":"io.netty.channel.ChannelOutboundHandlerAdapter",
"queriedMethods":[
{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"read","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }
]
},
{
"name":"io.netty.channel.DefaultChannelPipeline$HeadContext",
"queriedMethods":[
{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"read","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"read","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"write","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object","io.netty.channel.ChannelPromise"] }
]
},
{
"name":"io.netty.channel.DefaultChannelPipeline$TailContext",
"queriedMethods":[
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }
]
},
Expand All @@ -326,9 +331,9 @@
{
"name":"io.netty.handler.codec.ByteToMessageDecoder",
"queriedMethods":[
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }
]
},
Expand All @@ -352,17 +357,17 @@
{
"name":"io.netty.handler.ssl.SslHandler",
"queriedMethods":[
{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"read","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] },
{"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] },
{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] },
{"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"read","parameterTypes":["io.netty.channel.ChannelHandlerContext"] },
{"name":"write","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object","io.netty.channel.ChannelPromise"] }
]
},
Expand Down Expand Up @@ -496,7 +501,7 @@
"name":"java.lang.management.RuntimeMXBean",
"queryAllPublicMethods":true,
"methods":[
{"name":"getInputArguments","parameterTypes":[] },
{"name":"getInputArguments","parameterTypes":[] },
{"name":"getName","parameterTypes":[] }
]
},
Expand Down Expand Up @@ -672,7 +677,7 @@
{
"name":"sun.misc.Signal",
"methods":[
{"name":"<init>","parameterTypes":["java.lang.String"] },
{"name":"<init>","parameterTypes":["java.lang.String"] },
{"name":"handle","parameterTypes":["sun.misc.Signal","sun.misc.SignalHandler"] }
]
},
Expand All @@ -684,14 +689,14 @@
"fields":[{"name":"theUnsafe"}],
"methods":[{"name":"invokeCleaner","parameterTypes":["java.nio.ByteBuffer"] }],
"queriedMethods":[
{"name":"copyMemory","parameterTypes":["java.lang.Object","long","java.lang.Object","long","long"] },
{"name":"copyMemory","parameterTypes":["java.lang.Object","long","java.lang.Object","long","long"] },
{"name":"getAndSetObject","parameterTypes":["java.lang.Object","long","java.lang.Object"] }
]
},
{
"name":"sun.nio.ch.SelectorImpl",
"fields":[
{"name":"publicSelectedKeys"},
{"name":"publicSelectedKeys"},
{"name":"selectedKeys"}
]
},
Expand Down
Loading

0 comments on commit d984c93

Please sign in to comment.