@@ -675,7 +675,7 @@ def run_test(self):
675
675
# Import pubkeys with key origin info
676
676
self .log .info ("Addresses should have hd keypath and master key id after import with key origin" )
677
677
pub_addr = self .nodes [1 ].getnewaddress ()
678
- pub_addr = self .nodes [1 ].getnewaddress ()
678
+ pub_addr = self .nodes [1 ].getnewaddress (address_type = "bech32" )
679
679
info = self .nodes [1 ].getaddressinfo (pub_addr )
680
680
pub = info ['pubkey' ]
681
681
pub_keypath = info ['hdkeypath' ]
@@ -693,7 +693,7 @@ def run_test(self):
693
693
assert_equal (pub_import_info ['hdkeypath' ], pub_keypath )
694
694
695
695
# Import privkeys with key origin info
696
- priv_addr = self .nodes [1 ].getnewaddress ()
696
+ priv_addr = self .nodes [1 ].getnewaddress (address_type = "bech32" )
697
697
info = self .nodes [1 ].getaddressinfo (priv_addr )
698
698
priv = self .nodes [1 ].dumpprivkey (priv_addr )
699
699
priv_keypath = info ['hdkeypath' ]
@@ -742,8 +742,8 @@ def run_test(self):
742
742
self .nodes [1 ].createwallet (wallet_name = "noprivkeys" , disable_private_keys = True )
743
743
wrpc = self .nodes [1 ].get_wallet_rpc ("noprivkeys" )
744
744
745
- addr1 = self .nodes [0 ].getnewaddress ()
746
- addr2 = self .nodes [0 ].getnewaddress ()
745
+ addr1 = self .nodes [0 ].getnewaddress (address_type = "bech32" )
746
+ addr2 = self .nodes [0 ].getnewaddress (address_type = "bech32" )
747
747
pub1 = self .nodes [0 ].getaddressinfo (addr1 )['pubkey' ]
748
748
pub2 = self .nodes [0 ].getaddressinfo (addr2 )['pubkey' ]
749
749
result = wrpc .importmulti (
@@ -761,15 +761,15 @@ def run_test(self):
761
761
assert result [0 ]['success' ]
762
762
assert result [1 ]['success' ]
763
763
assert_equal (wrpc .getwalletinfo ()["keypoolsize" ], 2 )
764
- newaddr1 = wrpc .getnewaddress ()
764
+ newaddr1 = wrpc .getnewaddress (address_type = "bech32" )
765
765
assert_equal (addr1 , newaddr1 )
766
- newaddr2 = wrpc .getnewaddress ()
766
+ newaddr2 = wrpc .getnewaddress (address_type = "bech32" )
767
767
assert_equal (addr2 , newaddr2 )
768
768
769
769
# Import some public keys to the internal keypool of a no privkey wallet
770
770
self .log .info ("Adding pubkey to internal keypool of disableprivkey wallet" )
771
- addr1 = self .nodes [0 ].getnewaddress ()
772
- addr2 = self .nodes [0 ].getnewaddress ()
771
+ addr1 = self .nodes [0 ].getnewaddress (address_type = "bech32" )
772
+ addr2 = self .nodes [0 ].getnewaddress (address_type = "bech32" )
773
773
pub1 = self .nodes [0 ].getaddressinfo (addr1 )['pubkey' ]
774
774
pub2 = self .nodes [0 ].getaddressinfo (addr2 )['pubkey' ]
775
775
result = wrpc .importmulti (
@@ -789,15 +789,15 @@ def run_test(self):
789
789
assert result [0 ]['success' ]
790
790
assert result [1 ]['success' ]
791
791
assert_equal (wrpc .getwalletinfo ()["keypoolsize_hd_internal" ], 2 )
792
- newaddr1 = wrpc .getrawchangeaddress ()
792
+ newaddr1 = wrpc .getrawchangeaddress (address_type = "bech32" )
793
793
assert_equal (addr1 , newaddr1 )
794
- newaddr2 = wrpc .getrawchangeaddress ()
794
+ newaddr2 = wrpc .getrawchangeaddress (address_type = "bech32" )
795
795
assert_equal (addr2 , newaddr2 )
796
796
797
797
# Import a multisig and make sure the keys don't go into the keypool
798
798
self .log .info ('Imported scripts with pubkeys should not have their pubkeys go into the keypool' )
799
- addr1 = self .nodes [0 ].getnewaddress ()
800
- addr2 = self .nodes [0 ].getnewaddress ()
799
+ addr1 = self .nodes [0 ].getnewaddress (address_type = "bech32" )
800
+ addr2 = self .nodes [0 ].getnewaddress (address_type = "bech32" )
801
801
pub1 = self .nodes [0 ].getaddressinfo (addr1 )['pubkey' ]
802
802
pub2 = self .nodes [0 ].getaddressinfo (addr2 )['pubkey' ]
803
803
result = wrpc .importmulti (
0 commit comments