Skip to content

Conversation

@NicolasDorier
Copy link
Contributor

I thought whitelistrelay default was false when it is true.

The root of the issue come from the fact that all references to DEFAULT_ are not in the scope of this file, so hard coding of default values are used everywhere in net.cpp. I think that in a separate PR we should fix that more fundamentally everywhere.

Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

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

utACK, agree this also needs a more structural solution.

@NicolasDorier
Copy link
Contributor Author

Is there something strange with travis? all PRs seems not passing.

@NicolasDorier NicolasDorier force-pushed the fix/default-whiterelay branch from 2433fc1 to 59542e8 Compare August 16, 2019 12:17
@cvengler
Copy link
Contributor

NACK sorry, I think removing args shouldn't be done instantly. They should go through a depraction process and be removed after one major version has been released. Otherwise it could break compatibility.

@NicolasDorier
Copy link
Contributor Author

@emilengler this PR is precisely about restoring compatibility that I broke during previous PR.

@NicolasDorier NicolasDorier force-pushed the fix/default-whiterelay branch from 59542e8 to 2e35132 Compare August 16, 2019 13:57
@cvengler
Copy link
Contributor

Concept ACK

@NicolasDorier
Copy link
Contributor Author

NicolasDorier commented Aug 16, 2019

As @MarcoFalke suggested, I moved DEFAULT_WHITELISTRELAY/DEFAULT_WHITELISTFORCERELAY to net.h. It build fine, and is a more natural place for those constant to be.

I also reformatted the p2p_permissions.py file (indent after (\n opening)

@Sjors
Copy link
Member

Sjors commented Aug 16, 2019

ACK 2e35132, modulo missing +x permission for p2p_permissions.py (squash Sjors@e79aa1e if that's tricky on Windows).

Is there something strange with travis? all PRs seems not passing.

Yes, one more rebase should make that go away, see #16633.

@NicolasDorier NicolasDorier force-pushed the fix/default-whiterelay branch from 2e35132 to 751b28b Compare August 16, 2019 14:24
@NicolasDorier
Copy link
Contributor Author

@Sjors oops, fixed the chmod, sorry for that.

@NicolasDorier NicolasDorier force-pushed the fix/default-whiterelay branch from 751b28b to df0d847 Compare August 16, 2019 14:25
@NicolasDorier
Copy link
Contributor Author

NicolasDorier commented Aug 16, 2019

Fixing the chmods on #16635

@NicolasDorier NicolasDorier force-pushed the fix/default-whiterelay branch from df0d847 to 3b05f0f Compare August 16, 2019 15:44
@NicolasDorier
Copy link
Contributor Author

I rebased and also fixed rpc_setban

@promag
Copy link
Contributor

promag commented Aug 18, 2019

ACK 3b05f0f.

nit, could split the moved code to a move-only commit.

@Sjors
Copy link
Member

Sjors commented Aug 19, 2019

re-ACK 3b05f0f

@laanwj laanwj changed the title [Fix] The default whitelistrelay should be true net: The default whitelistrelay should be true Aug 19, 2019
@laanwj
Copy link
Member

laanwj commented Aug 19, 2019

ACK 3b05f0f

@laanwj laanwj changed the title net: The default whitelistrelay should be true net: Restore default whitelistrelay to true Aug 19, 2019
laanwj added a commit that referenced this pull request Aug 19, 2019
3b05f0f Reformat p2p_permissions.py (nicolas.dorier)
ce7eac3 [Fix] The default whitelistrelay should be true (nicolas.dorier)

Pull request description:

  I thought `whitelistrelay` default was `false` when it is `true`.

  The root of the issue come from the fact that all references to `DEFAULT_` are not in the scope of this file, so hard coding of default values are used everywhere in `net.cpp`. I think that in a separate PR we should fix that more fundamentally everywhere.

ACKs for top commit:
  promag:
    ACK 3b05f0f.
  Sjors:
    re-ACK 3b05f0f

Tree-SHA512: f4a75f986fa2adf1a5f1c91605e0d261f7ac5ac8535fb05437d83b8392dbcf5cc1a47d755adcf8ad8dc67a88de28060187200fd3ce06545261a5c7ec0fea831a
@laanwj laanwj merged commit 3b05f0f into bitcoin:master Aug 19, 2019
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 19, 2019
3b05f0f Reformat p2p_permissions.py (nicolas.dorier)
ce7eac3 [Fix] The default whitelistrelay should be true (nicolas.dorier)

Pull request description:

  I thought `whitelistrelay` default was `false` when it is `true`.

  The root of the issue come from the fact that all references to `DEFAULT_` are not in the scope of this file, so hard coding of default values are used everywhere in `net.cpp`. I think that in a separate PR we should fix that more fundamentally everywhere.

ACKs for top commit:
  promag:
    ACK 3b05f0f.
  Sjors:
    re-ACK 3b05f0f

Tree-SHA512: f4a75f986fa2adf1a5f1c91605e0d261f7ac5ac8535fb05437d83b8392dbcf5cc1a47d755adcf8ad8dc67a88de28060187200fd3ce06545261a5c7ec0fea831a
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Sep 3, 2019
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Sep 3, 2019
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request May 2, 2020
Summary: This is a backport of Core [[bitcoin/bitcoin#16631 | PR16631]]

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5940
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 20, 2021
3b05f0f Reformat p2p_permissions.py (nicolas.dorier)
ce7eac3 [Fix] The default whitelistrelay should be true (nicolas.dorier)

Pull request description:

  I thought `whitelistrelay` default was `false` when it is `true`.

  The root of the issue come from the fact that all references to `DEFAULT_` are not in the scope of this file, so hard coding of default values are used everywhere in `net.cpp`. I think that in a separate PR we should fix that more fundamentally everywhere.

ACKs for top commit:
  promag:
    ACK 3b05f0f.
  Sjors:
    re-ACK 3b05f0f

Tree-SHA512: f4a75f986fa2adf1a5f1c91605e0d261f7ac5ac8535fb05437d83b8392dbcf5cc1a47d755adcf8ad8dc67a88de28060187200fd3ce06545261a5c7ec0fea831a
@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.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants