We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d828159 commit 7b265f7Copy full SHA for 7b265f7
testnet/stacks-node/src/nakamoto_node/stackerdb_listener.rs
@@ -433,6 +433,16 @@ impl StackerDBListener {
433
.signer_idle_timestamps
434
.lock()
435
.expect("FATAL: failed to lock idle timestamps");
436
+
437
+ // Check the current timestamp for the given signer_pubkey
438
+ if let Some(existing_info) = idle_timestamps.get(&signer_pubkey) {
439
+ // Only update if the new timestamp is greater
440
+ if timestamp <= existing_info.timestamp {
441
+ return; // Exit early if the new timestamp is not greater
442
+ }
443
444
445
+ // Update the map with the new timestamp and weight
446
let timestamp_info = TimestampInfo { timestamp, weight };
447
idle_timestamps.insert(signer_pubkey, timestamp_info);
448
}
0 commit comments