test: remove unused if statements

This commit is contained in:
Aurèle Oulès 2022-07-25 09:57:34 +02:00
parent 194f6dc43c
commit 7ab43eb811
No known key found for this signature in database
GPG Key ID: 55F3976F7001D998

View File

@ -345,13 +345,6 @@ class AddressTypeTest(BitcoinTestFramework):
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')
if self.options.descriptors:
self.log.info("Nodes with addresstype=p2sh-segwit match the change output")
self.test_change_output_type(1, [to_address_p2sh], 'p2sh-segwit')
self.test_change_output_type(1, [to_address_bech32_1], 'bech32')
self.test_change_output_type(1, [to_address_p2sh, to_address_bech32_1], 'bech32')
self.test_change_output_type(1, [to_address_bech32_1, to_address_bech32_2], 'bech32')
else:
self.log.info("Nodes with addresstype=p2sh-segwit match the change output")
self.test_change_output_type(1, [to_address_p2sh], 'p2sh-segwit')
self.test_change_output_type(1, [to_address_bech32_1], 'bech32')
@ -362,11 +355,6 @@ class AddressTypeTest(BitcoinTestFramework):
self.test_change_output_type(2, [to_address_bech32_1], 'bech32')
self.test_change_output_type(2, [to_address_p2sh], 'bech32')
if self.options.descriptors:
self.log.info("Nodes with addresstype=bech32 match the change output (unless changetype is set otherwise):")
self.test_change_output_type(3, [to_address_bech32_1], 'bech32')
self.test_change_output_type(3, [to_address_p2sh], 'p2sh-segwit')
else:
self.log.info("Nodes with addresstype=bech32 match the change output (unless changetype is set otherwise):")
self.test_change_output_type(3, [to_address_bech32_1], 'bech32')
self.test_change_output_type(3, [to_address_p2sh], 'p2sh-segwit')