aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-04-16 17:18:34 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-04-19 21:05:14 -0700
commit9c2a8b8d34c2ff6bd8611587ae883c1dc0091a45 (patch)
tree354039b23d039f90934aadad515a692f647b7767 /test
parent08f322865429c307ea620a1e349855f9eee3af7e (diff)
downloadbitcoin-9c2a8b8d34c2ff6bd8611587ae883c1dc0091a45.tar.xz
Do not treat bare multisig as IsMine
Such outputs can still be watched, and signed for, but they aren't treated as valid payments. That means they won't cause transactions to appear in listtransactions, their outputs to be shown under listunspent, or affect balances.
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_segwit.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py
index fa1732c4c5..88c4d7fb2c 100755
--- a/test/functional/feature_segwit.py
+++ b/test/functional/feature_segwit.py
@@ -311,8 +311,10 @@ class SegWitTest(BitcoinTestFramework):
v = self.nodes[0].getaddressinfo(i)
if (v['isscript']):
[bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v)
- # bare and p2sh multisig with compressed keys should always be spendable
- spendable_anytime.extend([bare, p2sh])
+ # p2sh multisig with compressed keys should always be spendable
+ spendable_anytime.extend([p2sh])
+ # bare multisig can be watched and signed, but is not treated as ours
+ solvable_after_importaddress.extend([bare])
# P2WSH and P2SH(P2WSH) multisig with compressed keys are spendable after direct importaddress
spendable_after_importaddress.extend([p2wsh, p2sh_p2wsh])
else:
@@ -328,8 +330,10 @@ class SegWitTest(BitcoinTestFramework):
v = self.nodes[0].getaddressinfo(i)
if (v['isscript']):
[bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v)
- # bare and p2sh multisig with uncompressed keys should always be spendable
- spendable_anytime.extend([bare, p2sh])
+ # p2sh multisig with uncompressed keys should always be spendable
+ spendable_anytime.extend([p2sh])
+ # bare multisig can be watched and signed, but is not treated as ours
+ solvable_after_importaddress.extend([bare])
# P2WSH and P2SH(P2WSH) multisig with uncompressed keys are never seen
unseen_anytime.extend([p2wsh, p2sh_p2wsh])
else: