Address Book related Fixes #358

pull sgimenez wants to merge 3 commits into bitcoin:master from sgimenez:addressbookfixes changing 4 files +19 −8
  1. sgimenez commented at 9:46 PM on June 27, 2011: contributor

    This is a rebased series of patches from pull request #335

    1. Fix the synchronization of sending addresses between a CWallet and its associated CWalletDB (this was reported independently in Issue #350).

    2. Add a check for validity of sending addresses (Issue #328).

    3. Avoid propagation of unnecessary updates to CWalletDB.

    4. Fix the behavior of setaccount on sending addresses that are already listed in the Address Book. (Issue #329).

    5. Add wallet methods GetDefaultAddress and SetDefaultAddress (contributed by laanwj in Issue #350).

  2. sipa commented at 9:15 PM on June 28, 2011: member
    1. ACK
    2. ACK; I don't like using mapPubKeys as a check for whether a key is ours though (there's pwalletMain->HaveKey()), but for now it's correct.
    3. ACK
    4. NAK: you change the check for whether the key belongs to a certain account, but still look it up there the next line?
    5. I like accessor functions for those things, but a GetDefaultAddress should return the address corresponding to vchDefaultKey, and SetDefaultAddress should update vchDefaultKey (and push to db), imho.
  3. sgimenez commented at 10:48 PM on June 28, 2011: contributor

    Ok i've amended the commits.

    About 4), I assumed previously that mapPubKey contained a subset of mapAddressBook. Maybe it is (or will become) false, but anyway it is better to add the check.

    About 5), I hope I've done the wanted changes.

    About HaveKey(), there are many other occurrences of mapPubKeys that should be replaced as well. So it's probably better to leave it unchanged until a global substitution is performed.

  4. sipa commented at 10:57 PM on June 28, 2011: member

    mapPubKeys is not a subset of mapAddressBook; it contains reserve keys while mapAddressBook doesn't. You can assume for now that mapPubKeys does contain all 'our' keys though, and ignore HaveKey for now.

  5. sgimenez commented at 10:08 AM on June 29, 2011: contributor

    Indeed. Reserve keys! Thank you.

  6. jrmithdobbs commented at 9:28 PM on June 29, 2011: contributor

    Can we get a breakdown of the original problems this addresses instead of just what was done to correct them?

  7. sgimenez commented at 4:25 PM on June 30, 2011: contributor
    1. If you need a concrete appearance of the underlying problem, make some changes in your address book using the gui (current head), close the address book window, open it again. Changes are not displayed.

    2. and 4) see respective links.

    3. and 5) are just improvements.

  8. sipa commented at 10:28 PM on June 30, 2011: member

    ACK.

  9. TheBlueMatt commented at 12:32 AM on July 1, 2011: member

    NACK - crashes when loading from empty .bitcoin - "Error to load wallet.dat"

  10. TheBlueMatt commented at 12:39 AM on July 1, 2011: member

    Problem first showed up in 0efc5d29a2d8922b10dcd02a1f1ad7b46258edd8, Ill let you do the rest.

  11. sgimenez commented at 12:25 PM on July 1, 2011: contributor

    Yes a small issue with big consequences. The address name "" was generated as the default "map"ed value, and therefore it was not written to db.

    Note to myself, I should really keep away from languages that allow me to make such stupid mistakes :-)

  12. sgimenez commented at 12:19 AM on July 12, 2011: contributor

    Status update.

    1. has been pulled.

    2. and 4) are still pending fixes for outstanding bugs. Note: expect merge conflicts with recent work by sipa.

  13. sipa commented at 12:32 PM on July 14, 2011: member

    If 1 has been pulled, why is its commit still listed here? Can you do a rebase, removing the already-merged parts?

  14. sgimenez commented at 1:39 PM on July 14, 2011: contributor

    Dunno, the first patch was kind of cherry-picked. Here comes the clean rebase.

  15. Add a check for validity of sending addresses (Issue #328) c41d05b081
  16. Fix for setaccount related Issue #329 c613990c38
  17. Avoid propagation of unnecessary updates to CWalletDB 21b31e1761
  18. sgimenez commented at 1:41 PM on August 10, 2011: contributor

    Rebased against recent changes. Removed 5) since its purpose is no so clear now.

  19. sipa commented at 2:25 PM on December 25, 2011: member

    How relevant are these fixes still?

  20. gavinandresen closed this on Jan 13, 2012

  21. zathras-crypto referenced this in commit a4e611dc58 on Apr 18, 2016
  22. ptschip referenced this in commit 0c4b48cd8e on Mar 12, 2017
  23. hanchon referenced this in commit 40ccbc40b4 on Aug 17, 2017
  24. lateminer referenced this in commit a18b7ac19e on Oct 16, 2019
  25. Losangelosgenetics referenced this in commit 0eebda6504 on Mar 12, 2020
  26. cryptapus referenced this in commit 123c33c048 on May 3, 2021
  27. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

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-13 21:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me