Use a thread-safe MemoryDatabase

This commit is contained in:
Sudarsan Balaji
2021-10-14 03:53:22 +05:30
parent a66e8eb8ed
commit 23c17ca841
3 changed files with 16 additions and 15 deletions

View File

@@ -12,13 +12,13 @@ class LibTest {
val desc =
"wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)"
// @Test
// fun walletNewAddress() {
// val wallet = OfflineWallet(desc)
// val address = wallet.getNewAddress()
// assertNotNull(address)
// assertEquals(address, "bcrt1qzg4mckdh50nwdm9hkzq06528rsu73hjxytqkxs")
// }
@Test
fun walletNewAddress() {
val wallet = OfflineWallet(desc)
val address = wallet.getNewAddress()
assertNotNull(address)
assertEquals(address, "bcrt1qzg4mckdh50nwdm9hkzq06528rsu73hjxytqkxs")
}
@Test(expected=BdkException.Descriptor::class)
fun invalidDescriptorExceptionIsThrown() {