Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Jan 10, 2019

The second and last change on this topic (c.f. #15109). Split up because the diff would otherwise interleave, making review harder than necessary.

This is not a stylistic change, but a change that avoids bugs such as:

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #14929 (net: Allow connections from misbehavior banned peers by gmaxwell)
  • #14897 (randomize GETDATA(tx) request order and introduce bias toward outbound by naumenkogs)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@practicalswift
Copy link
Contributor

Concept ACK. Will review.

std::atomic<int64_t> nPingUsecTime{0};
// Best measured round-trip time.
std::atomic<int64_t> nMinPingUsecTime;
std::atomic<int64_t> nMinPingUsecTime{std::numeric_limits<int64_t>::max()};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <limits>

@promag
Copy link
Contributor

promag commented Jan 11, 2019

ACK fac2f5e:

  • initialization values are the same
  • comments are moved
  • some styles fixes
  • annotations are unchanged

@sipa
Copy link
Member

sipa commented Jan 11, 2019

utACK fac2f5e

nTimeOffset = 0;
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
nVersion = 0;
strSubVer = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this redundant line? :-)

@Empact
Copy link
Contributor

Empact commented Jan 12, 2019

utACK fac2f5e

@laanwj
Copy link
Member

laanwj commented Jan 14, 2019

utACK fac2f5e

@laanwj laanwj merged commit fac2f5e into bitcoin:master Jan 14, 2019
laanwj added a commit that referenced this pull request Jan 14, 2019
fac2f5e Use C++11 default member initializers (MarcoFalke)

Pull request description:

  The second and last change on this topic (c.f. #15109). Split up because the diff would otherwise interleave, making review harder than necessary.

  This is not a stylistic change, but a change that avoids bugs such as:

  *  fix uninitialized read when stringifying an addrLocal #14728
  *  qt: Initialize members in WalletModel #12426
  *  net: correctly initialize nMinPingUsecTime #6636
  * ...

Tree-SHA512: 547ae72b87aeaed5890eb5fdcff612bfc93354632b238d89e1e1c0487187f39609bcdc537ef21345e0aea8cfcf1ea48da432d672c5386dd87cf58742446a86b1
@maflcko maflcko deleted the Mf1901-ctorClean branch January 14, 2019 15:36
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Aug 22, 2021
Backporting Merge bitcoin#15144: [refactor] CNode: Use C++11 default member initializers
Resolved Merge conflicts after cherry-picking the backport commit hash
vijaydasmp added a commit to vijaydasmp/dash that referenced this pull request Aug 22, 2021
vijaydasmp added a commit to vijaydasmp/dash that referenced this pull request Aug 22, 2021
…Use C++11 default member initializers"

This reverts commit b8a07d9.
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Aug 29, 2021
vijaydasmp added a commit to vijaydasmp/dash that referenced this pull request Aug 29, 2021
vijaydasmp added a commit to vijaydasmp/dash that referenced this pull request Aug 30, 2021
PastaPastaPasta pushed a commit to dashpay/dash that referenced this pull request Aug 31, 2021
…alizers (#4371)

* Merge bitcoin#15144: [refactor] CNode: Use C++11 default member initializers

* Backport Merge bitcoin#15144: [refactor] CNode: Use C++11 default member initializers

* Merge bitcoin#15144: [refactor] CNode: Use C++11 default member initializers #4371

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants