Migrate to Futures in SigningQueue (#6689)
* oneshot channels instead of custom promises * Future instead of handle_dispatch * Even less copying * Those explicit waits were a mistake, thanks, @tomusdrw * No more unsafe polling * Test for the new `is_done()` method * Mark Futures as `#[must_use]` * Solve most compilation warnings * `try_ready!` is more ideomatic * Turn spaces into tabs * Documentation and visibility improvements * Minor code style improvements * Make Futures run on an explisit reactor * Another round of code style issues * Simplify ConfirmationReceiver type * Flatten ConfirmationOutcome into a plain Result type * Get rid of a separate `pending` set, it was a stupid idea * Clarify `add_request` docs * No need to reduce the scope of the mutex here
This commit is contained in:
committed by
Tomasz Drwięga
parent
98d0ef3fff
commit
86c2633280
@@ -244,7 +244,7 @@ impl FullDependencies {
|
||||
let deps = &$deps;
|
||||
let dispatcher = FullDispatcher::new(deps.client.clone(), deps.miner.clone());
|
||||
if deps.signer_service.is_enabled() {
|
||||
$handler.extend_with($namespace::to_delegate(SigningQueueClient::new(&deps.signer_service, dispatcher, &deps.secret_store)))
|
||||
$handler.extend_with($namespace::to_delegate(SigningQueueClient::new(&deps.signer_service, dispatcher, deps.remote.clone(), &deps.secret_store)))
|
||||
} else {
|
||||
$handler.extend_with($namespace::to_delegate(SigningUnsafeClient::new(&deps.secret_store, dispatcher)))
|
||||
}
|
||||
@@ -445,7 +445,7 @@ impl<C: LightChainClient + 'static> LightDependencies<C> {
|
||||
let secret_store = Some(deps.secret_store.clone());
|
||||
if deps.signer_service.is_enabled() {
|
||||
$handler.extend_with($namespace::to_delegate(
|
||||
SigningQueueClient::new(&deps.signer_service, dispatcher, &secret_store)
|
||||
SigningQueueClient::new(&deps.signer_service, dispatcher, deps.remote.clone(), &secret_store)
|
||||
))
|
||||
} else {
|
||||
$handler.extend_with(
|
||||
|
||||
Reference in New Issue
Block a user