Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Stop treating importaddress'ed scripts as change #7687
Before this, if someone imported a scriptPubKey directly (in hex form) using
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
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".