Improve InvalidTransaction::AncientBirthBlock doc comment (#7743)

* Improve `InvalidTransaction::AncientBirthBlock` doc comment

Update

Remove stray parentheses

Tabs not spaces

Improve

whoops

* Update primitives/runtime/src/transaction_validity.rs

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

* Possible causes section; Expand example

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Zeke Mostov
2020-12-18 22:59:48 -08:00
committed by GitHub
parent 104747daa0
commit 31099491bc
@@ -54,6 +54,13 @@ pub enum InvalidTransaction {
/// it will only be able to assume a bad signature and cannot express a more meaningful error.
BadProof,
/// The transaction birth block is ancient.
///
/// # Possible causes
///
/// For `FRAME`-based runtimes this would be caused by `current block number
/// - Era::birth block number > BlockHashCount`. (e.g. in Polkadot `BlockHashCount` = 2400, so a
/// transaction with birth block number 1337 would be valid up until block number 1337 + 2400,
/// after which point the transaction would be considered to have an ancient birth block.)
AncientBirthBlock,
/// The transaction would exhaust the resources of current block.
///