[WIP] V2 API Doctest generation (#24)

V2 API Doctest generation
This commit is contained in:
Yeastplume
2019-03-22 12:03:25 +00:00
committed by GitHub
parent 64772e6021
commit 94960b3edd
37 changed files with 1645 additions and 725 deletions
+3 -3
View File
@@ -76,7 +76,7 @@ fn self_send_test_impl(test_dir: &str) -> Result<(), libwallet::Error> {
w.set_parent_key_id_by_name("mining")?;
}
let mut bh = 10u64;
let _ = test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), bh as usize);
let _ = test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), bh as usize, false);
// Should have 5 in account1 (5 spendable), 5 in account (2 spendable)
wallet::controller::owner_single_use(wallet1.clone(), |api| {
@@ -101,13 +101,13 @@ fn self_send_test_impl(test_dir: &str) -> Result<(), libwallet::Error> {
api.receive_tx(&mut slate, Some("listener"), None)?;
Ok(())
})?;
api.finalize_tx(&mut slate)?;
slate = api.finalize_tx(&slate)?;
api.post_tx(&slate.tx, false)?; // mines a block
bh += 1;
Ok(())
})?;
let _ = test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), 3);
let _ = test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), 3, false);
bh += 3;
// Check total in mining account