Skip to content

Commit e7a56a9

Browse files
committed
Change wallet::get_funded_wallet to return Wallet<AnyDatabase>
1 parent 2f32532 commit e7a56a9

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/wallet/mod.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ use utils::{check_nlocktime, check_nsequence_rbf, After, Older, SecpCtx};
5757

5858
use crate::blockchain::{GetHeight, NoopProgress, Progress, WalletSync};
5959
use crate::database::memory::MemoryDatabase;
60-
use crate::database::{BatchDatabase, BatchOperations, DatabaseUtils, SyncTime};
60+
use crate::database::{AnyDatabase, BatchDatabase, BatchOperations, DatabaseUtils, SyncTime};
6161
use crate::descriptor::derived::AsDerived;
6262
use crate::descriptor::policy::BuildSatisfaction;
6363
use crate::descriptor::{
@@ -1613,17 +1613,13 @@ where
16131613
/// Return a fake wallet that appears to be funded for testing.
16141614
pub fn get_funded_wallet(
16151615
descriptor: &str,
1616-
) -> (
1617-
Wallet<MemoryDatabase>,
1618-
(String, Option<String>),
1619-
bitcoin::Txid,
1620-
) {
1616+
) -> (Wallet<AnyDatabase>, (String, Option<String>), bitcoin::Txid) {
16211617
let descriptors = testutils!(@descriptors (descriptor));
16221618
let wallet = Wallet::new(
16231619
&descriptors.0,
16241620
None,
16251621
Network::Regtest,
1626-
MemoryDatabase::new(),
1622+
AnyDatabase::Memory(MemoryDatabase::new()),
16271623
)
16281624
.unwrap();
16291625

0 commit comments

Comments
 (0)