mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Bounding block timestamp to avoid surprises. Fixes #783
This commit is contained in:
parent
244fc8d32e
commit
e4871065b0
1 changed files with 4 additions and 0 deletions
|
@ -186,6 +186,10 @@ impl Readable for BlockHeader {
|
|||
let total_kernel_offset = BlindingFactor::read(reader)?;
|
||||
let pow = Proof::read(reader)?;
|
||||
|
||||
if timestamp > (1 << 60) {
|
||||
return Err(ser::Error::CorruptedData);
|
||||
}
|
||||
|
||||
Ok(BlockHeader {
|
||||
version: version,
|
||||
height: height,
|
||||
|
|
Loading…
Reference in a new issue