Docs only changes (#9258)

* Docs changes to improve clarity

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Squirrel
2021-07-06 18:05:10 +01:00
committed by GitHub
parent d969da8aa5
commit 4f5d3b334e
5 changed files with 31 additions and 16 deletions
@@ -108,11 +108,13 @@ Hence every hash retrieved from `provided_tags` is always present in `ready`;
qed
"#;
/// Validated transactions that are block ready with all their dependencies met.
#[derive(Debug, parity_util_mem::MallocSizeOf)]
pub struct ReadyTransactions<Hash: hash::Hash + Eq, Ex> {
/// Insertion id
/// Next free insertion id (used to indicate when a transaction was inserted into the pool).
insertion_id: u64,
/// tags that are provided by Ready transactions
/// (only a single transaction can provide a specific tag)
provided_tags: HashMap<Tag, Hash>,
/// Transactions that are ready (i.e. don't have any requirements external to the pool)
ready: TrackedMap<Hash, ReadyTx<Hash, Ex>>,
@@ -235,7 +237,7 @@ impl<Hash: hash::Hash + Member + Serialize, Ex> ReadyTransactions<Hash, Ex> {
.fold(None, f)
}
/// Returns true if given hash is part of the queue.
/// Returns true if given transaction is part of the queue.
pub fn contains(&self, hash: &Hash) -> bool {
self.ready.read().contains_key(hash)
}
@@ -24,10 +24,11 @@ use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedSender, TracingUnbounded
/// Extrinsic watcher.
///
/// Represents a stream of status updates for particular extrinsic.
/// Represents a stream of status updates for a particular extrinsic.
#[derive(Debug)]
pub struct Watcher<H, BH> {
receiver: TracingUnboundedReceiver<TransactionStatus<H, BH>>,
/// transaction hash of watched extrinsic
hash: H,
}