v0.2.7-pre.010-fix.001

This commit is contained in:
2026-08-23 00:26:17 +02:00
parent 1391858972
commit 74686892e9
4 changed files with 102 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-onchain-transport-lib/src/ws_subscription.rs
// version: 4
// version: 5
/// Typed handle for one logical Solana WebSocket subscription.
///
@@ -133,15 +133,6 @@ pub(crate) enum WsNotificationDispatchOutcome {
/// Type-erased actor-owned dispatcher for one heterogeneous typed notification channel.
pub(crate) type WsNotificationDispatcher = std::boxed::Box<dyn Fn(serde_json::Value) -> WsNotificationDispatchOutcome + std::marker::Send + std::marker::Sync>;
/// Creates one bounded typed notification receiver and its type-erased actor dispatcher.
pub(crate) fn typed_notification_channel<T, F>(capacity: usize, decoder: F) -> (WsNotificationDispatcher, tokio::sync::mpsc::Receiver<ksp_core_lib::Result<T>>)
where
T: std::marker::Send + 'static,
F: Fn(serde_json::Value) -> ksp_core_lib::Result<T> + std::marker::Send + std::marker::Sync + 'static,
{
return typed_notification_channel_with_completion(capacity, decoder, |_| return false);
}
/// Creates one bounded typed notification receiver whose dispatcher can mark a successfully delivered value as terminal.
pub(crate) fn typed_notification_channel_with_completion<T, F, C>(
capacity: usize,