Add a test for sled
This commit is contained in:
parent
6f01c38a71
commit
58ef298a42
@ -13,7 +13,7 @@ class LibTest {
|
||||
"wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)"
|
||||
|
||||
@Test
|
||||
fun walletNewAddress() {
|
||||
fun memoryWalletNewAddress() {
|
||||
val config = DatabaseConfig.Memory("")
|
||||
val wallet = OfflineWallet(desc, config)
|
||||
val address = wallet.getNewAddress()
|
||||
@ -26,4 +26,13 @@ class LibTest {
|
||||
val config = DatabaseConfig.Memory("")
|
||||
OfflineWallet("invalid-descriptor", config)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sledWalletNewAddress() {
|
||||
val config = DatabaseConfig.Sled(SledDbConfiguration("/tmp/testdb", "testdb"))
|
||||
val wallet = OfflineWallet(desc, config)
|
||||
val address = wallet.getNewAddress()
|
||||
assertNotNull(address)
|
||||
assertEquals(address, "bcrt1qzg4mckdh50nwdm9hkzq06528rsu73hjxytqkxs")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user