-
Notifications
You must be signed in to change notification settings - Fork 39.1k
p2p: remove adjusted time #25908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
p2p: remove adjusted time #25908
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f30a2fb
p2p: stop sampling timedata from peers
fanquake b5a55b7
timedata: remove TimeOffset from AdjustedTime
fanquake 970996b
time: replace GetAdjustedTime() with NodeClock::now()
fanquake e300fb3
rpc: remove timeoffset from getnetworkinfo() RPC
fanquake 7fdea2f
init: remove -maxtimeadjustment option
fanquake 644f93f
time: remove timedata
fanquake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,6 @@ | |
| #include <rpc/server_util.h> | ||
| #include <rpc/util.h> | ||
| #include <sync.h> | ||
| #include <timedata.h> | ||
| #include <util/chaintype.h> | ||
| #include <util/strencodings.h> | ||
| #include <util/string.h> | ||
|
|
@@ -596,7 +595,6 @@ static RPCHelpMan getnetworkinfo() | |
| {RPCResult::Type::STR, "SERVICE_NAME", "the service name"}, | ||
| }}, | ||
| {RPCResult::Type::BOOL, "localrelay", "true if transaction relay is requested from peers"}, | ||
| {RPCResult::Type::NUM, "timeoffset", "the time offset"}, | ||
| {RPCResult::Type::NUM, "connections", "the total number of connections"}, | ||
| {RPCResult::Type::NUM, "connections_in", "the number of inbound connections"}, | ||
| {RPCResult::Type::NUM, "connections_out", "the number of outbound connections"}, | ||
|
|
@@ -646,7 +644,6 @@ static RPCHelpMan getnetworkinfo() | |
| if (node.peerman) { | ||
| obj.pushKV("localrelay", !node.peerman->IgnoresIncomingTxs()); | ||
| } | ||
| obj.pushKV("timeoffset", GetTimeOffset()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe keep this field and instead return the median offset of the currently connected outbounds or so? See also #24606 (comment) |
||
| if (node.connman) { | ||
| obj.pushKV("networkactive", node.connman->GetNetworkActive()); | ||
| obj.pushKV("connections", node.connman->GetNodeCount(ConnectionDirection::Both)); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps:
(ie, add a counter to
PeerManagerImpl, and on the third outbound connection that has a time offset of 30mins or more, set a warning that will show up ingetblockchaininfo,getnetworkinfo,getmininginfountil restart)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we regularly do new feeler and blocks-only connections, perhaps we could keep a rolling average of
abs(peer.nTimeOffset)and report that ingetnetworkinfo?