Foreign API documentation and small cleanup (#31)

* verify slate messages documentation

* rustfmt

* foreign API documentation

* rustfmt
This commit is contained in:
Yeastplume
2019-03-29 08:46:12 +00:00
committed by GitHub
parent f756b10d78
commit 7b8fe92f53
13 changed files with 360 additions and 88 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ fn file_exchange_test_impl(test_dir: &str) -> Result<(), libwallet::Error> {
// wallet 2 receives file, completes, sends file back
wallet::controller::foreign_single_use(wallet2.clone(), |api| {
api.receive_tx(&mut slate, None, Some(sender2_message.clone()))?;
slate = api.receive_tx(&slate, None, Some(sender2_message.clone()))?;
adapter.send_tx_async(&receive_file, &mut slate)?;
Ok(())
})?;
+1 -1
View File
@@ -132,7 +132,7 @@ fn file_repost_test_impl(test_dir: &str) -> Result<(), libwallet::Error> {
wallet::controller::foreign_single_use(wallet1.clone(), |api| {
let adapter = FileWalletCommAdapter::new();
slate = adapter.receive_tx_async(&send_file)?;
api.receive_tx(&mut slate, None, None)?;
slate = api.receive_tx(&slate, None, None)?;
adapter.send_tx_async(&receive_file, &mut slate)?;
Ok(())
})?;
+1 -1
View File
@@ -99,7 +99,7 @@ fn self_send_test_impl(test_dir: &str) -> Result<(), libwallet::Error> {
api.tx_lock_outputs(&slate)?;
// Send directly to self
wallet::controller::foreign_single_use(wallet1.clone(), |api| {
api.receive_tx(&mut slate, Some("listener"), None)?;
slate = api.receive_tx(&slate, Some("listener"), None)?;
Ok(())
})?;
slate = api.finalize_tx(&slate)?;