-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Bitcoin-Qt: fix known addressbook bugs #2157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/ae1c11d44a4ea90001ea777883cc2cef8a60c846 for binaries and test log. This could happen for one of several reasons:
|
@TheBlueMatt Can you fix @BitcoinPullTester? |
Cool btw: Are you sure this is needed? It should already stay in sorted order by picking the insertion positions carefully |
@laanwj Take a look here, the unsorted list caused some weird issues for me. |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/ae1c11d44a4ea90001ea777883cc2cef8a60c846 for binaries and test log. |
I consider this a rather important bugfix and would love to see it in 0.8. I'll try to get some bug-reporters, to test this. |
@@ -342,9 +361,8 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con | |||
strAddress = CBitcoinAddress(newKey.GetID()).ToString(); | |||
} | |||
else | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't do this. I prefer explicit {} around blocks, as it prevents a class of bugs when a statement is added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I reverted this one.
Edit: Do you have any clue, why my Firefox refuses to display Commits
and Files Changed
on Github? I'm getting crazy because of this...
Edit 2: Crazy, I had dom.storage.enabled set to false, which prevents Github page from working correctly!
- add qSort() for cachedAddressTable, as qLowerBound() and qUpperBound() require the list to be in ascending order (see http://harmattan-dev.nokia.com/docs/library/html/qt4/qtalgorithms.html#qLowerBound) - add a new check in AddressTableModel::setData() to just return, when no changes were made to a label or an address (prevents entry duplication issue) - remove "rec->label = value.toString();" from AddressTableModel::setData() as the label gets updated by AddressTablePriv::updateEntry() anyway (seems @sipa added this line via 1025440#L6R225) - add another new check in AddressTableModel::setData() to just return, if a duplicate address was found (prevents address overwrite) - add a new check to EditAddressDialog::setModel() to prevent setting an invalid model - re-work the switch-case statement in AddressTableModel::accept() to always break (as return get's called anyway) and order the list to match the enum definition - make accept() in editaddressdialog.h a public slot, which it should be - misc small coding style changes
Code changes are OK, but if some people can confirm that this solves their bug that'd be great :) |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/e6d230056202b05a27f187dff2648eb5c76fcfee for binaries and test log. |
@laanwj ping² :-P |
Bitcoin-Qt: fix known addressbook bugs
Bitcoin-Qt: fix known addressbook bugs
…itcoin#2157) Messages should be serialized according the protocol of the peer who asked us or otherwise peers running on other protocols won't be able to deserialize the message correctly.
…itcoin#2157) Messages should be serialized according the protocol of the peer who asked us or otherwise peers running on other protocols won't be able to deserialize the message correctly.
…itcoin#2157) Messages should be serialized according the protocol of the peer who asked us or otherwise peers running on other protocols won't be able to deserialize the message correctly.
…itcoin#2157) Messages should be serialized according the protocol of the peer who asked us or otherwise peers running on other protocols won't be able to deserialize the message correctly.
…itcoin#2157) Messages should be serialized according the protocol of the peer who asked us or otherwise peers running on other protocols won't be able to deserialize the message correctly.
* MAZA-POS: (5575 commits) Mazafication of code More mazafication More mazafications and compile correction fixes fix for build issues fix for build issues fix string in net.cpp correct pow.cpp correct validation.cpp fixing for build errors fix typo Merge remote-tracking branch 'origin/MAZA-POS' into MAZA-POS merge to dash rebase Release notes 0.12.3.3 Remove redundant parameter fCheckDuplicateInputs from CheckTransaction Fix crash bug with duplicate inputs within a transaction Bump to 0.12.3.3 Release notes 0.12.3.2 (bitcoin#2174) Add tests for special rules for slow blocks on devnet/testnet (bitcoin#2176) Allow mining min diff for very slow (2h+) blocks (bitcoin#2175) Fix issues with selections on Masternode tab (bitcoin#2170) Sync mn list and mnw list from 3 peers max (bitcoin#2169) A few devnet related fixes (bitcoin#2168) Adjust diff for slow testnet/devnet blocks a bit smoother (bitcoin#2161) Make PS Buttons not react to spacebar (bitcoin#2154) Bump to 0.12.3.2 (bitcoin#2173) Bump to 0.12.3.1 (bitcoin#2158) Update release notes (bitcoin#2155) Use correct protocol when serializing messages in reply to `getdata` (bitcoin#2157) Fix p2pkh tests asserts (bitcoin#2153) Fix block value/payee validation in lite mode (bitcoin#2148) ...
require the list to be in ascending order (see
http://harmattan-dev.nokia.com/docs/library/html/qt4/qtalgorithms.html#qLowerBound)
changes were made to a label or an address (prevents entry duplication
issue)
AddressTableModel::setData() as the label gets updated by
AddressTablePriv::updateEntry() anyway (seems @sipa added this line via
1025440#L6R225)
a duplicate address was found (prevents address overwrite)
invalid model
always break (as return get's called anyway) and order the list to match
the enum definition
Intended to fix: #2137 and #1839.