Stop treating importaddress’ed scripts as change #7687

pull sipa wants to merge 1 commits into bitcoin:master from sipa:fixscriptimport changing 1 files +7 −0
  1. sipa commented at 6:03 pm on March 14, 2016: member

    Before this, if someone imported a scriptPubKey directly (in hex form) using importaddress, outputs sending to it would be treated as change, as the corresponding CTxDestination was not added to the address book.

    Fix this by trying to detect scriptPubKeys that are in fact convertible to a CTxDestination and add them anyway. Add a warning to the RPC help to warn against importing raw non-standard scripts.

    Open question: should the RPC fail/warn in some way when this conversion is not possible? Things like listunspent work fine with such outputs, but listtransactions won’t.

  2. sipa commented at 8:07 pm on March 14, 2016: member
    In retrospect, I think it would have been better to have a separate importscript RPC, that only takes a hex script as input, for the p2sh=false case input to importaddress, as its behaviour is very different and does not correspond to what would be considered “importing an address”.
  3. jonasschnelli added the label Wallet on Mar 14, 2016
  4. laanwj commented at 5:28 pm on March 18, 2016: member
    utACK 2b3947c
  5. Stop treating importaddress'ed scripts as change
    Before this, if someone imported a scriptPubKey directly (in hex form) using
    importaddress, outputs sending to it would be treated as change, as the
    corresponding CTxDestination was not added to the address book.
    
    Fix this by trying to detect scriptPubKeys that are in fact convertible to a
    CTxDestination and add them anyway. Add a warning to the RPC help to warn
    against importing raw non-standard scripts.
    595b22e5c0
  6. sipa force-pushed on Jun 2, 2016
  7. sipa commented at 1:53 pm on June 2, 2016: member
    Rebased.
  8. jonasschnelli commented at 1:57 pm on June 2, 2016: contributor
    utACK 595b22e5c0bf1c3e8ee73aea2f28397c12046a60
  9. laanwj merged this on Jun 20, 2016
  10. laanwj closed this on Jun 20, 2016

  11. laanwj referenced this in commit a6ddb19bd9 on Jun 20, 2016
  12. codablock referenced this in commit 975b220830 on Sep 16, 2017
  13. codablock referenced this in commit 3e57819fe4 on Sep 19, 2017
  14. codablock referenced this in commit a44f6cb8c5 on Dec 27, 2017
  15. codablock referenced this in commit d2c3b7efef on Dec 28, 2017
  16. andvgal referenced this in commit e859b1af4a on Jan 6, 2019
  17. zkbot referenced this in commit 900ed4555f on Dec 19, 2019
  18. 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: 2024-11-24 06:12 UTC

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