node: Don't allow timestamps with too much delta
modified node/src/protocol.rs
@@ -37,6 +37,7 @@ pub const ANNOUNCE_INTERVAL: LocalDuration = LocalDuration::from_secs(30);
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -878,20 +879,23 @@ impl Peer {
|
|
|
|
|
|
| - | |
| - | |
| - | |
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified node/src/test/tests.rs
@@ -122,12 +122,14 @@ fn test_inventory_fetch() {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -135,7 +137,7 @@ fn test_inventory_relay_bad_timestamp() {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|