Skip to content

Commit 58c6abe

Browse files
committed
fix: increase future block tolerance to 15s (Bor default)
1 parent c933482 commit 58c6abe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/polygon/src/validation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ pub fn validate_bor_header(
4848
}
4949

5050
// Reject blocks too far in the future (Bor bor.go:422-461)
51-
// Allow 1 second of clock drift.
51+
// Bor uses allowedFutureBlockTimeSeconds = 15 by default.
5252
let now = std::time::SystemTime::now()
5353
.duration_since(std::time::UNIX_EPOCH)
5454
.unwrap_or_default()
5555
.as_secs();
56-
if header.timestamp > now + 1 {
56+
if header.timestamp > now + 15 {
5757
return Err(InvalidBlockHeaderError::PolygonFutureBlock {
5858
header_time: header.timestamp,
5959
now,

0 commit comments

Comments
 (0)