mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 11:31: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 total_kernel_offset = BlindingFactor::read(reader)?;
|
||||||
let pow = Proof::read(reader)?;
|
let pow = Proof::read(reader)?;
|
||||||
|
|
||||||
|
if timestamp > (1 << 60) {
|
||||||
|
return Err(ser::Error::CorruptedData);
|
||||||
|
}
|
||||||
|
|
||||||
Ok(BlockHeader {
|
Ok(BlockHeader {
|
||||||
version: version,
|
version: version,
|
||||||
height: height,
|
height: height,
|
||||||
|
|
Loading…
Reference in a new issue