Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Network activity toggle #8996
Conversation
fanquake
added
the
P2P
label
Oct 23, 2016
|
Concept ACK While trying to test this, I have got:
almost immediately I pressed the network toggle icon. When the network is toggled off, the icon is hidden and I can't turn the network back on without trying to click in the empty space... |
|
There is a commit for RPC The RPC test is still named |
|
During startup, when there is 1 outgoing connection only:
@EthanHeilman Do you have an idea? |
I don't believe this can be related to this PR...
Sounds like a build system problem - it didn't update the resources with the new icon?
I don't see this as a problem. |
| +} | ||
| + | ||
| +/** Lets the control know about the Client Model */ | ||
| +void NetworkToggleStatusBarControl::setClientModel(ClientModel *clientModel) |
|
The missing icon issue was local one, yes (solved by clean build). Sorry for confusion. The icon should probably contain some visual reference to the network (compare with the no-HD icon). I can't create screenshot because it aborts almost immediately here. |
jonls
and others
added some commits
Mar 26, 2013
paveljanik
referenced this pull request
Oct 24, 2016
Closed
Assertion failed: (nMaxInbound > 0), function AcceptConnection, file net.cpp, line 973. #9007
|
It works as designed. Icon in the UI flips on RPC calls, can be clicked, nice tooltips, it works. When the network is disabled, it looks like this (with non-HD wallet): I still think that it should be done in 2 commits instead of this mess:
|
|
@paveljanik At the risk of stating the obvious if nMaxConnections is set to 8 then nMaxInbound will be set to -1 triggering the assert. int nMaxInbound = nMaxConnections - (nMaxOutbound + nMaxFeeler);
assert(nMaxInbound > 0);The value nMaxConnections is typically set to 125, I don't understand how it is getting set to 8, perhaps the system is running low on available sockets? |
|
@EthanHeilman nMaxConnections is user configurable. I typically set it to 3 on low-memory devices. |
|
I think the assert failure with a low maxconnections is an issue unrelated to this PR. |
|
@luke-jr @EthanHeilman Indeed, let's move to #9007. |
|
I think this is very useful function for some users. Please review. |
|
@jonasschnelli Jonas, can you please have a look? |
|
The reason why I'm waiting for this are the conceptual NACK's on the previous attempt to get this in: #5314 Some devs where claiming that we need a better solution then just disabling the network connection. Ideally, this mode should connect to the p2p network in case you have uncommitted wtxs. I'd like to get more Concept ACKs from others. Concept ACK. |
|
The previous NACK (there was one ;-) was about Wallet showing wrong info without network is the current state anyway. We could slide the "gray overlay" up as we do during IBD to make it clear! |
|
Some more thoughts about this: it depends how you look at this. So far, my view was as simple as follows. I do not care at all about the displayed stuff in the GUI, I just want GUI to immediately stop all communication. Be it if I plan to connect to the untrusted network, or slow network at parents', or limited usage network where every eight connections to the outside mean that no one else being able to use the network... I was solving this by suspending the GUI process (I do not want to stop it and start again when I need it). This brings new and elegant solution! The "better solution" mentioned above probably wants to solve different problem(s) though. |
jonasschnelli
added
the
GUI
label
Nov 11, 2016
|
Tested ACK 19f46f1. Would be nice if we would at least add a tooltip "Press to enable/disable network activity" over the connection statusbar icon. From the GUI perspective, it's kind of a hidden feature right now. |
jonasschnelli
merged commit 19f46f1
into
bitcoin:master
Nov 11, 2016
1 check passed
added a commit
that referenced
this pull request
Nov 11, 2016
This was referenced Nov 11, 2016
| + } | ||
| + | ||
| + if (!active) { | ||
| + fNetworkActive = false; |
jonasschnelli
referenced this pull request
Nov 11, 2016
Merged
fNetworkActive is not protected by a lock, use an atomic #9131
|
Sorry. This merge was a little bit pro active. |

luke-jr commentedOct 23, 2016
Yet another rebase of #2412 / #5314
I've made the RPC interface more consistent (booleans only) and removed the
getinfoaddition.Also removed the problematically-licensed icon and replaced it with an equivalent using our new style, from Typfonts.
I'd like to replace the PNG with its SVG equivalent, but I don't know if this is safe right now...?