- re-work code parts that check if we have a Statusbar warning
- use same variable names in the header
small update for BitcoinGUI::setNumBlocks() function #1594
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:GUI_testnet3_fix changing 2 files +15 −16-
Diapolo commented at 7:04 AM on July 13, 2012: none
-
laanwj commented at 9:09 AM on July 14, 2012: member
I don't think we should be making this many changes just for the testnet.
The testnet is just for testing, and it is supposed to behave just like the mainnet (at a much lower level than the UI), so there should be as little special casing as possible.
-
in src/qt/bitcoingui.cpp:None in 44423e1284 outdated
487 | @@ -488,7 +488,7 @@ void BitcoinGUI::setNumConnections(int count) 488 | labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Bitcoin network", "", count)); 489 | } 490 | 491 | -void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) 492 | +void BitcoinGUI::setNumBlocks(int nBlocks, int nBlocksOfPeers)
laanwj commented at 6:54 AM on July 17, 2012:Please don't use the ugly nXXX variable names here, thank you :-)
in src/qt/bitcoingui.cpp:None in 44423e1284 outdated
510 | - int nRemainingBlocks = nTotalBlocks - count; 511 | - float nPercentageDone = count / (nTotalBlocks * 0.01f); 512 | + float nPercentageDone = nBlocks / (nBlocksOfPeers * 0.01f); 513 | 514 | - if (clientModel->getStatusBarWarnings() == "") 515 | + if (strStatusBarWarnings.isEmpty())
laanwj commented at 7:27 AM on July 17, 2012:Agreed, using isEmpty is better, and caching the status bar warnings is also better than requesting them twice.
laanwj commented at 7:28 AM on July 17, 2012: memberYes, apart from the nXXX and strXXX variable convention that you're trying to sneak in :p, the other changes are OK with me.
Diapolo commented at 8:01 AM on July 17, 2012: noneI'll update this to be mergable ... you "catched" me again with that var names, heh ;)? But that's fine.
ce2f66d9bfsmall update for BitcoinGUI::setNumBlocks() function
- re-work code parts that check if we have a Statusbar warning - use same variable names in the header
burger2 commented at 7:14 PM on July 18, 2012: contributorIt would be nice to fix the testnet3 bug. But it might be fixed automatically when everyone is running 0.7.x.
laanwj commented at 7:54 PM on July 18, 2012: memberIf it ought to be fixed, it is on a deeper level than the ui, and not by special casing the testnet. Remember that the testnet is there to test how the client behaves in circumstances that are possible but unlikely on the main net. Special casing for testnet could effectively cover up problems.
Diapolo commented at 8:52 AM on July 26, 2012: noneAs this pull is now unrelated to testnet3, anything more I can do here?
laanwj referenced this in commit c1aed4eff4 on Jul 27, 2012laanwj merged this on Jul 27, 2012laanwj closed this on Jul 27, 2012suprnurd referenced this in commit cd262bf641 on Dec 5, 2017lateminer referenced this in commit e001ddf106 on May 6, 2020DrahtBot locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC
More mirrored repositories can be found on mirror.b10c.me