Bounding block timestamp to avoid surprises. Fixes #783

This commit is contained in:
Ignotus Peverell 2018-03-15 18:36:44 +00:00
parent 244fc8d32e
commit e4871065b0
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211

View file

@ -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,