Skip to content

Commit f83de3d

Browse files
committed
Make era nondecreasing
1 parent 114b058 commit f83de3d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

types/src/common_params.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ impl CommonParams {
231231
current_network_id, transaction_network_id
232232
))
233233
}
234+
if self.era < current_params.era {
235+
return Err(format!("The era({}) shouldn't be less than the current era({})", self.era, current_params.era))
236+
}
234237
Ok(())
235238
}
236239
}

0 commit comments

Comments
 (0)