aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-10-02 17:35:47 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-10-02 17:46:01 +0200
commitfecc1be23143476b981352e8516cf9cce0450d62 (patch)
tree7fddddf7b4841918b025a4b855ea49870c523d1f /test/functional
parentccaef6c28b1997bd40faad2e1c66e22cdda11edc (diff)
parent71d4eddf42eb5a15e434d2273f11d0a3942ef502 (diff)
Merge #16884: wallet: Change default address type to bech32
71d4eddf42eb5a15e434d2273f11d0a3942ef502 Add release note for bech32 by default in wallet (Gregory Sanders) b34f0180e39fc95d88596a987724b994707e2552 Revert "gui: Generate bech32 addresses by default (take 2, fixup)" (Gregory Sanders) f50785ab56c0c094960c7049cfe9209b101e2823 Change default address type to bech32 (Gregory Sanders) Pull request description: ACKs for top commit: MarcoFalke: re-ACK 71d4eddf42eb5a15e434d2273f11d0a3942ef502 (only change is restore mimick behavior) laanwj: ACK 71d4eddf42eb5a15e434d2273f11d0a3942ef502 Tree-SHA512: 3c49a1b51c49f3a762ad08985167ca1b89b0177ae20ab6d5883f1f74dde7a155921c1b855a842199bbf32f563c56b33f8b603bc842637bdcb121001023d454b6
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/feature_bip68_sequence.py5
-rwxr-xr-xtest/functional/feature_rbf.py2
-rwxr-xr-xtest/functional/wallet_address_types.py2
-rwxr-xr-xtest/functional/wallet_basic.py2
-rwxr-xr-xtest/functional/wallet_bumpfee.py1
-rwxr-xr-xtest/functional/wallet_import_with_label.py4
6 files changed, 10 insertions, 6 deletions
diff --git a/test/functional/feature_bip68_sequence.py b/test/functional/feature_bip68_sequence.py
index fe6f9eade1..677362756c 100755
--- a/test/functional/feature_bip68_sequence.py
+++ b/test/functional/feature_bip68_sequence.py
@@ -29,9 +29,10 @@ NOT_FINAL_ERROR = "non-BIP68-final (code 64)"
class BIP68Test(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
+ # TODO remove output type argument and fix resulting "tx-size-small" errors
self.extra_args = [
- ["-acceptnonstdtxn=1"],
- ["-acceptnonstdtxn=0"],
+ ["-acceptnonstdtxn=1", "-addresstype=p2sh-segwit"],
+ ["-acceptnonstdtxn=0", "-addresstype=p2sh-segwit"],
]
def skip_test_if_missing_module(self):
diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py
index fd79df0b07..a1d4ce4c73 100755
--- a/test/functional/feature_rbf.py
+++ b/test/functional/feature_rbf.py
@@ -65,6 +65,7 @@ def make_utxo(node, amount, confirmed=True, scriptPubKey=CScript([1])):
class ReplaceByFeeTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
+ # TODO remove output type argument and fix resulting "tx-size-small" errors
self.extra_args = [
[
"-acceptnonstdtxn=1",
@@ -73,6 +74,7 @@ class ReplaceByFeeTest(BitcoinTestFramework):
"-limitancestorsize=101",
"-limitdescendantcount=200",
"-limitdescendantsize=101",
+ "-addresstype=p2sh-segwit",
],
]
diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py
index c41b31e2e1..b72f5c6008 100755
--- a/test/functional/wallet_address_types.py
+++ b/test/functional/wallet_address_types.py
@@ -345,7 +345,7 @@ class AddressTypeTest(BitcoinTestFramework):
self.sync_blocks()
assert_equal(self.nodes[4].getbalance(), 1)
- self.log.info("Nodes with addresstype=legacy never use a P2WPKH change output")
+ self.log.info("Nodes with addresstype=legacy never use a P2WPKH change output (unless changetype is set otherwise):")
self.test_change_output_type(0, [to_address_bech32_1], 'legacy')
self.log.info("Nodes with addresstype=p2sh-segwit only use a P2WPKH change output if any destination address is bech32:")
diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py
index 96ea5c9c35..550037923e 100755
--- a/test/functional/wallet_basic.py
+++ b/test/functional/wallet_basic.py
@@ -317,7 +317,7 @@ class WalletTest(BitcoinTestFramework):
assert_raises_rpc_error(-5, "Invalid private key encoding", self.nodes[0].importprivkey, "invalid")
# This will raise an exception for importing an address with the PS2H flag
- temp_address = self.nodes[1].getnewaddress()
+ temp_address = self.nodes[1].getnewaddress("", "p2sh-segwit")
assert_raises_rpc_error(-5, "Cannot use the p2sh flag with an address - use a script instead", self.nodes[0].importaddress, temp_address, "label", False, True)
# This will raise an exception for attempting to dump the private key of an address you do not own
diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py
index 89838ff058..0948d47653 100755
--- a/test/functional/wallet_bumpfee.py
+++ b/test/functional/wallet_bumpfee.py
@@ -38,6 +38,7 @@ class BumpFeeTest(BitcoinTestFramework):
"-walletrbf={}".format(i),
"-mintxfee=0.00002",
"-deprecatedrpc=totalFee",
+ "-addresstype=p2sh-segwit", # TODO update constants in test and remove
] for i in range(self.num_nodes)]
def skip_test_if_missing_module(self):
diff --git a/test/functional/wallet_import_with_label.py b/test/functional/wallet_import_with_label.py
index a623b75606..2a9051b1e8 100755
--- a/test/functional/wallet_import_with_label.py
+++ b/test/functional/wallet_import_with_label.py
@@ -100,8 +100,8 @@ class ImportWithLabel(BitcoinTestFramework):
"Test importprivkey won't label new dests with the same "
"label as others labeled dests for the same key."
)
- self.log.info("Import a watch-only legacy address with a label.")
- address4 = self.nodes[0].getnewaddress()
+ self.log.info("Import a watch-only p2sh-segwit address with a label.")
+ address4 = self.nodes[0].getnewaddress("", "p2sh-segwit")
label4_addr = "Test Label 4 for importaddress"
self.nodes[1].importaddress(address4, label4_addr)
test_address(self.nodes[1],