mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Clarifying comment for rejection of blocks too far in future.
This commit is contained in:
parent
4d7bc2269b
commit
2e860d04cf
1 changed files with 1 additions and 2 deletions
|
@ -108,8 +108,7 @@ fn validate_header(b: &Block, ctx: &mut BlockContext) -> Result<(), Error> {
|
||||||
}
|
}
|
||||||
if header.timestamp >
|
if header.timestamp >
|
||||||
time::now() + time::Duration::seconds(12 * (consensus::BLOCK_TIME_SEC as i64)) {
|
time::now() + time::Duration::seconds(12 * (consensus::BLOCK_TIME_SEC as i64)) {
|
||||||
// refuse blocks too far in future, constant of 12 comes from bitcoin (2h worth
|
// refuse blocks more than 12 blocks intervals in future (as in bitcoin)
|
||||||
// of blocks)
|
|
||||||
// TODO add warning in p2p code if local time is too different from peers
|
// TODO add warning in p2p code if local time is too different from peers
|
||||||
return Err(Error::InvalidBlockTime);
|
return Err(Error::InvalidBlockTime);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue