[blockchain] Fix receiving a coinbase using Electrum/Esplora

Closes #107
This commit is contained in:
Alekos Filini committed 2020-10-13 11:56:59 +02:00
1 parent 848b52c50e
commit 0caad5f3d9
3 files changed
+26 -6

No files matched your search

+15
View File
@@ -520,6 +520,21 @@ pub fn bdk_blockchain_tests(attr: TokenStream, item: TokenStream) -> TokenStream
assert_eq!(wallet.get_balance().unwrap(), 0);
assert_eq!(new_details.received, 0);
}
#[test]
#[serial]
fn test_sync_receive_coinbase() {
let (wallet, descriptors, mut test_client) = init_single_sig();
let wallet_addr = wallet.get_new_address().unwrap();
wallet.sync(noop_progress(), None).unwrap();
assert_eq!(wallet.get_balance().unwrap(), 0);
test_client.generate(1, Some(wallet_addr));
wallet.sync(noop_progress(), None).unwrap();
assert!(wallet.get_balance().unwrap() > 0);
}
}
};