CheckInherentError can now report when something would be valid (#1204)

* CheckInherentError can now report when something would be valid

* set timestamp inherent to next valid block time

* return max timestamp for valid-after when checking
This commit is contained in:
Robert Habermeier
2018-12-04 09:19:36 +01:00
committed by Bastian Köcher
parent 93b212d2cc
commit 9bccc9661c
6 changed files with 30 additions and 13 deletions
+4 -1
View File
@@ -487,7 +487,10 @@ impl BasicInherentData {
#[derive(Encode)]
#[cfg_attr(feature = "std", derive(Decode))]
pub enum CheckInherentError {
TimestampInFuture(u64),
/// The inherents are generally valid but a delay until the given timestamp
/// is required.
ValidAtTimestamp(u64),
/// Some other error has occurred.
Other(RuntimeString),
}