Skip to content

Commit 382ebbe

Browse files
committed
Make era nondecreasing
1 parent 59e1696 commit 382ebbe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

types/src/common_params.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ impl CommonParams {
232232
))
233233
}
234234

235+
if self.era < current_params.era {
236+
return Err(format!("The era({}) shouldn't be less than the current era({})", self.era, current_params.era))
237+
}
238+
Ok(())
235239
}
236240
}
237241

0 commit comments

Comments
 (0)