aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-11-30 16:49:04 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2018-01-09 15:35:27 -0800
commitf37c64e477d679853a4076f2f7888568bb034e90 (patch)
treec89e9c12f55bf306452d8cd20c45a7a81f9fed6e /src/test
parent57273f2b302949d4ca3511f703627b5d717be40c (diff)
downloadbitcoin-f37c64e477d679853a4076f2f7888568bb034e90.tar.xz
Implicitly know about P2WPKH redeemscripts
Make CKeyStore automatically known about the redeemscripts necessary for P2SH-P2WPKH (and due to the extra checks in IsMine, also P2WPKH) spending.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/script_standard_tests.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/test/script_standard_tests.cpp b/src/test/script_standard_tests.cpp
index 19060eccc9..cd30fbeda7 100644
--- a/src/test/script_standard_tests.cpp
+++ b/src/test/script_standard_tests.cpp
@@ -508,12 +508,7 @@ BOOST_AUTO_TEST_CASE(script_standard_IsMine)
scriptPubKey.clear();
scriptPubKey << OP_0 << ToByteVector(pubkeys[0].GetID());
- // Keystore has key, but no P2SH redeemScript
- result = IsMine(keystore, scriptPubKey, isInvalid);
- BOOST_CHECK_EQUAL(result, ISMINE_NO);
- BOOST_CHECK(!isInvalid);
-
- // Keystore has key and P2SH redeemScript
+ // Keystore implicitly has key and P2SH redeemScript
keystore.AddCScript(scriptPubKey);
result = IsMine(keystore, scriptPubKey, isInvalid);
BOOST_CHECK_EQUAL(result, ISMINE_SPENDABLE);