Skip to content

Commit

Permalink
Add multi witnesstype unittest with passphrases
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed Mar 11, 2024
1 parent 75afa63 commit 9b7ff64
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2709,3 +2709,16 @@ def test_wallet_mixed_witness_type_create(self):
self.assertListEqual(sorted(w.witness_types()), ['legacy', 'p2sh-segwit', 'segwit'])
self.assertListEqual(sorted(w.witness_types(account_id=101)), ['p2sh-segwit', 'segwit'])
self.assertListEqual(w.witness_types(network='litecoin'), ['segwit'])

def test_wallet_mixed_witness_types_passphrase(self):
p1 = 'advance upset milk quit sword tide pumpkin unit weekend denial tobacco alien'
p2 = 'danger aspect north choose run bean short race prepare receive armed burst'
w = Wallet.create('multiwitnessmultisigtest', keys=[p1, p2], cosigner_id=0, db_uri=self.database_uri)
w.new_key()
w.new_key(network='litecoin', witness_type='p2sh-segwit')
w.new_key(witness_type='legacy')
w.new_key(witness_type='p2sh-segwit')
expected_addresslist = \
['39h96ozh8F8W2sVrc2EhEbFwwdRoLHJAfB', '3LdJC6MSmFqKrn2WrxRfhd8DYkYYr8FNDr',
'MTSW4eC7xJiyp4YjwGZqpGmubsdm28Cdvc', 'bc1qgw8rg0057q9fmupx7ru6vtkxzy03gexc9ljycagj8z3hpzdfg7usvu56dp']
self.assertListEqual(sorted(w.addresslist()), expected_addresslist)

0 comments on commit 9b7ff64

Please sign in to comment.