From 29821069d804f0bcdaacf18d848b871f412221a6 Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 11 May 2022 16:09:59 -0400 Subject: [PATCH] Use same wallet descriptor as for the bdk-kotlin tests --- tests/test_bdk.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_bdk.py b/tests/test_bdk.py index 6259c97..c43e2ac 100644 --- a/tests/test_bdk.py +++ b/tests/test_bdk.py @@ -1,8 +1,7 @@ import bdkpython as bdk import unittest -# taken from bdk test suite @ https://github.com/bitcoindevkit/bdk/blob/master/src/descriptor/template.rs#L676 -descriptor = "wpkh(tprv8ZgxMBicQKsPcx5nBGsR63Pe8KnRUqmbJNENAfGftF3yuXoMMoVJJcYeUw5eVkm9WBPjWYt6HMWYJNesB5HaNVBaFc1M6dRjWSYnmewUMYy/84h/0h/0h/0/*)" +descriptor = "wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)" db_config = bdk.DatabaseConfig.MEMORY() blockchain_config = bdk.BlockchainConfig.ELECTRUM( bdk.ElectrumConfig( @@ -27,7 +26,7 @@ class TestSimpleBip84Wallet(unittest.TestCase): ) address = wallet.get_new_address() # print(f"New address is {address}") - assert address == "tb1qkmvk2nadgplmd57ztld8nf8v2yxkzmdvvztyse", f"Wrong address {address}, should be tb1qkmvk2nadgplmd57ztld8nf8v2yxkzmdvvztyse" + assert address == "tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e", f"Wrong address {address}, should be tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e" def test_wallet_balance(self): wallet = bdk.Wallet( @@ -39,7 +38,7 @@ class TestSimpleBip84Wallet(unittest.TestCase): wallet.sync(blockchain, None) balance = wallet.get_balance() # print(f"Balance is {balance} sat") - assert balance > 0, "Balance is 0, send testnet coins to tb1qkmvk2nadgplmd57ztld8nf8v2yxkzmdvvztyse" + assert balance > 0, "Balance is 0, send testnet coins to tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e" if __name__ == '__main__':