change everything to transaction (#6440)

This commit is contained in:
Nikolay Volf
2020-06-21 13:34:19 +03:00
committed by GitHub
parent 04c62d6c5a
commit 36d2eefdc9
3 changed files with 74 additions and 73 deletions
+4 -4
View File
@@ -1067,7 +1067,7 @@ ServiceBuilder<
spawn_handle.spawn(
"on-transaction-imported",
extrinsic_notifications(transaction_pool.clone(), network.clone()),
transaction_notifications(transaction_pool.clone(), network.clone()),
);
// Prometheus metrics.
@@ -1245,7 +1245,7 @@ ServiceBuilder<
}
}
async fn extrinsic_notifications<TBl, TExPool>(
async fn transaction_notifications<TBl, TExPool>(
transaction_pool: Arc<TExPool>,
network: Arc<NetworkService<TBl, <TBl as BlockT>::Hash>>
)
@@ -1253,10 +1253,10 @@ async fn extrinsic_notifications<TBl, TExPool>(
TBl: BlockT,
TExPool: MaintainedTransactionPool<Block=TBl, Hash = <TBl as BlockT>::Hash>,
{
// extrinsic notifications
// transaction notifications
transaction_pool.import_notification_stream()
.for_each(move |hash| {
network.propagate_extrinsic(hash);
network.propagate_transaction(hash);
let status = transaction_pool.status();
telemetry!(SUBSTRATE_INFO; "txpool.import";
"ready" => status.ready,