mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 10:01:02 +00:00
chainhead backend: notify subscribers when the backend is closed (#1817)
* FollowEvent::stop include backend closed or not * simplify code: enum variant BackendClosed * check both stopped and backend closed * simplify hacky code * remove old test * Update subxt/src/backend/chain_head/follow_stream_driver.rs * Update subxt/src/backend/chain_head/mod.rs * Update subxt/src/backend/chain_head/mod.rs * Update subxt/src/backend/chain_head/follow_stream_driver.rs
This commit is contained in:
@@ -308,7 +308,7 @@ impl<T: Config> ChainHeadRpcMethods<T> {
|
||||
/// The following events are related to operations:
|
||||
/// - OperationBodyDone: The response of the `chainHead_body`
|
||||
/// - OperationCallDone: The response of the `chainHead_call`
|
||||
/// - OperationStorageItems: Items produced by the `chianHead_storage`
|
||||
/// - OperationStorageItems: Items produced by the `chainHead_storage`
|
||||
/// - OperationWaitingForContinue: Generated after OperationStorageItems and requires the user to
|
||||
/// call `chainHead_continue`
|
||||
/// - OperationStorageDone: The `chainHead_storage` method has produced all the results
|
||||
@@ -651,7 +651,7 @@ impl<Hash: BlockHash> Stream for FollowSubscription<Hash> {
|
||||
|
||||
if let Poll::Ready(Some(Ok(FollowEvent::Stop))) = &res {
|
||||
// No more events will occur after this one.
|
||||
self.done = true
|
||||
self.done = true;
|
||||
}
|
||||
|
||||
res
|
||||
|
||||
Reference in New Issue
Block a user