aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorGregory Sanders <gsanders87@gmail.com>2019-09-18 09:25:23 -0400
committerGregory Sanders <gsanders87@gmail.com>2019-09-26 16:23:32 -0400
commitf50785ab56c0c094960c7049cfe9209b101e2823 (patch)
treedab9043e8044b6840c195ecd8d6951fe541500b7 /test/functional
parentae3902ee3f3e4ea21c2a19470d402e418965b8ef (diff)
Change default address type to bech32
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 a7c79ec916..a1ec28076b 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],