Skip to content

Conversation

@sipa
Copy link
Member

@sipa sipa commented May 24, 2012

Rework network config settings according to the specification in https://gist.github.com/2763381.

The network base does no longer call GetArg directly. Instead, everything happens through a few globals and the SetProxy/SetNameProxy methods. These are called in init.cpp:AppInit2, and in Bitcoin-Qt's optionsmodel.cpp.

@jgarzik
Copy link
Contributor

jgarzik commented May 24, 2012

ACK

Tangentially related: it would be nice to move as much code from init.cpp into net*.cpp as possible, with init.cpp only calling NetParseConfig() or somesuch. Maybe that would help with qt/optionsmodel.cpp long term maintenance.

@sipa
Copy link
Member Author

sipa commented May 24, 2012

@jgarzik agree, I considered that, but wanted to postpone that until after tor hidden service support is merged, as that will extend the network config options further.

@sipa sipa mentioned this pull request May 25, 2012
@sipa
Copy link
Member Author

sipa commented May 26, 2012

@laanwj ack on the optionsmodel changes? After tor hidden service support is merged, the network option panel should be extended, I think, but for now, this should do.

Copy link
Member

Choose a reason for hiding this comment

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

Why does GetProxy have NET_IPV4 all over? do IPv6 proxies work?

Copy link
Member Author

Choose a reason for hiding this comment

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

Internally, proxies can be selected separately for each network, and for hostname-based destination. The config and GUI right now are pinned to assume the IPv4 one is the only one, so they read NET_IPV4, and modify the NET_IPV4, NET_IPV6, and named ones simuitaneously.

It's just a temporary measure, I expect the GUI config panel will be extended with more proxy options, and for RPC maybe we can move to a "getnetconfig" command that returns this kind of information, including connected peers and some statistics?

@sipa
Copy link
Member Author

sipa commented May 27, 2012

updated

@sipa
Copy link
Member Author

sipa commented May 31, 2012

As asked by @gavinandresen: the parameter interactions are now done using SoftSetBoolArg, instead of complex boolean formulas. Also added some comments.

@laanwj
Copy link
Member

laanwj commented Jun 1, 2012

ACK on gui changes

I wonder if "applyproxysettings" belongs in optionsmodel, though (or the ui
code at all). It uses core settings to update core settings, wouldn't it be
just as applicable when proxy is changed through other means?

@sipa
Copy link
Member Author

sipa commented Jun 1, 2012

Yes, and it is effectively duplicated code from init.cpp for now. That's why Jeff already suggested a common NetParseConfig somehwere - I think that's the right approach.

@gavinandresen
Copy link
Contributor

ACK. Lightly tested on OSX.

@gavinandresen gavinandresen merged commit 587f929 into bitcoin:master Jun 4, 2012
@Diapolo
Copy link

Diapolo commented Jun 4, 2012

@sipa This introduces a small display bug in the Qt GUI, it displays "localhost" as default Proxy-IP and it seems hostnames are not allowed there. If I enable the proxy and click apply it is changed to 127.0.0.1.

I think this happens in CNetAddr::ToStringIP(), which resolves 127.0.0.1 to "localhost", which is true, but currently not allowed in the GUI input field or in this line: https://github.com/bitcoin/bitcoin/pull/1389/files#L9R151

suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Jan 22, 2019
Print command line configuration to debug.log
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
2be6f7b [GUI] MasterNodeWizardDialog: fix RegTestNet default port 51476 (random-zebra)
68a92f9 [GUI] MasternodeWidget: unlock collateral output coin after MN deletion (random-zebra)
bdb13c8 [GUI][Model] Enforce required depth for mn collaterals (random-zebra)
1c197d2 [GUI] MasternodeWizard: lock collateral output coin after MN creation (random-zebra)
d56a8f8 [Trivial] Styling: spaces and brackets (random-zebra)

Pull request description:

  This PR fixes some issue with the masternode GUI interaction.

  **1)**  __MasternodeWizard: lock collateral output after MN creation.__
  The masternode configuration file is only read during init, and then the `COutPoint`s relative to the collateral of each entry is locked for spending. Thus, after creating a MN controller with the wizard, the collateral remains unlocked until the wallet is restarted, and therefore could be potentially spent or staked.

  **2)** __Enforce required depth for mn collaterals__
  The masternode collateral transaction requires at least 15 confirmations before the mn broadcast can be considered valid. Properly inform the user after creating a controller with the wizard, and when trying to start a masternode not yet confirmed.

  **3)** __MasternodeWidget: unlock collateral output coin after MN deletion__
  Mirrors (1). Unlock the collateral utxo when the masternode is deleted, otherwise it remains locked until wallet restart.

  **4)** __MasterNodeWizardDialog: fix RegTestNet default port__
  RegTest was using the fixed port value of TestNet instead of the default 51476.

ACKs for top commit:
  Fuzzbawls:
    utACK 2be6f7b
  furszy:
    code ACK 2be6f7b.

Tree-SHA512: a0d9a51b548dbf4d808ebdbd6ad696fc05f9d59c8768dafc7985e7753351ec1094c975c80c5b4cf7b788c45344432d5dfc241cca089236cdce904d1429db9608
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
…ature collateral

7830c17 [BUG] Prevent StartAll from starting mns with immature collateral (random-zebra)

Pull request description:

  Extends the fix of bitcoin#1389 (point 2) also to `startAll` (not only `startAlias`).

  Additional ref: PIVX-Project#1226

ACKs for top commit:
  Fuzzbawls:
    utACK 7830c17
  furszy:
    utACK 7830c17

Tree-SHA512: 74798a075aab71d27b3e65827e625eb876ddc7d0a0a6a641864aa5bfa8bc720ee8200020dc497b03e436b6e4df25bef09955397dbdc7f267cdbd3f5781b08223
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants