rs: Run hooks, methods and notification handlers in tokio tasks

Changelog-Changed: cln-plugin: Hooks, notifications and RPC methods now run asynchronously allowing for re-entrant handlers
This commit is contained in:
Christian Decker
2023-04-11 06:57:45 +09:30
committed by ShahanaFarooqui
parent db3707f957
commit f69da84256
5 changed files with 97 additions and 144 deletions

View File

@@ -41,20 +41,20 @@ pub(crate) enum Request {
#[serde(tag = "method", content = "params")]
#[serde(rename_all = "snake_case")]
pub(crate) enum Notification {
// ChannelOpened,
// ChannelOpenFailed,
// ChannelStateChanged,
// Connect,
// Disconnect,
// InvoicePayment,
// InvoiceCreation,
// Warning,
// ForwardEvent,
// SendpaySuccess,
// SendpayFailure,
// CoinMovement,
// OpenchannelPeerSigs,
// Shutdown,
// ChannelOpened,
// ChannelOpenFailed,
// ChannelStateChanged,
// Connect,
// Disconnect,
// InvoicePayment,
// InvoiceCreation,
// Warning,
// ForwardEvent,
// SendpaySuccess,
// SendpayFailure,
// CoinMovement,
// OpenchannelPeerSigs,
// Shutdown,
}
#[derive(Deserialize, Debug)]