mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-03 12:24:27 +01:00
clean up contracts
This commit is contained in:
@@ -274,7 +274,6 @@ fn contract_accounts_impl(test_dir: &'static str) -> Result<(), libwallet::Error
|
||||
let (_, wallet1_info) = api.retrieve_summary_info(m, true, 1)?;
|
||||
assert_eq!(wallet1_info.last_confirmed_height, 13);
|
||||
let (_, txs) = api.retrieve_txs(m, true, None, None, None)?;
|
||||
println!("{:?}", txs);
|
||||
assert_eq!(txs.len(), 5);
|
||||
Ok(())
|
||||
},
|
||||
|
||||
@@ -105,7 +105,6 @@ fn contract_early_proofs_rsr_test_impl(
|
||||
)?;
|
||||
|
||||
assert_eq!(slate.state, SlateState::Invoice1);
|
||||
println!("I1 State slate: {}", slate);
|
||||
slate = roundtrip_slate(&slate, 5)?;
|
||||
|
||||
wallet::controller::owner_single_use(
|
||||
@@ -123,7 +122,6 @@ fn contract_early_proofs_rsr_test_impl(
|
||||
Ok(())
|
||||
},
|
||||
)?;
|
||||
println!("I2 State slate: {}", slate);
|
||||
|
||||
assert_eq!(slate.state, SlateState::Invoice2);
|
||||
slate = roundtrip_slate(&slate, 5)?;
|
||||
@@ -241,9 +239,6 @@ fn contract_early_proofs_rsr_test_impl(
|
||||
);
|
||||
let early_proof_json = serde_json::to_string(&early_proof).unwrap();
|
||||
|
||||
// Should have all proof fields filled out
|
||||
println!("EARLY PAYMENT PROOF: {}", early_proof_json);
|
||||
|
||||
wallet::controller::foreign_single_use(
|
||||
recv_wallet.clone(),
|
||||
PathBuf::from(test_dir),
|
||||
|
||||
@@ -231,8 +231,6 @@ fn contract_early_proofs_srs_test_impl(test_dir: &'static str) -> Result<(), lib
|
||||
);
|
||||
let early_proof_json = serde_json::to_string(&early_proof).unwrap();
|
||||
|
||||
// Should have all proof fields filled out
|
||||
println!("EARLY PAYMENT PROOF: {}", early_proof_json);
|
||||
{
|
||||
let api = grin_wallet_api::Foreign::new(
|
||||
recv_wallet.clone(),
|
||||
|
||||
@@ -234,11 +234,6 @@ fn contract_rsr_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error>
|
||||
wallet_info.amount_currently_spendable,
|
||||
4 * 60_000_000_000 + 5_000_000_000 - expected_fees_paid.unwrap().fee() // we expect the balance of 4 mined blocks + 5 Grin - fees paid
|
||||
);
|
||||
// println!("txlogentry: {:#?}", tx_log);
|
||||
// println!("wallet info: {:#?}", wallet_info);
|
||||
// let (validated, commits) = api.retrieve_outputs(m, true, false, Some(tx_log.id))?;
|
||||
// println!("commits: {:#?}", commits);
|
||||
// panic!("lala");
|
||||
Ok(())
|
||||
},
|
||||
)?;
|
||||
|
||||
@@ -51,7 +51,6 @@ fn contract_self_spend_custom_tx_impl(test_dir: &'static str) -> Result<(), libw
|
||||
PathBuf::from(test_dir),
|
||||
|api, m| {
|
||||
let (_, commits) = api.retrieve_outputs(m, true, false, None)?;
|
||||
println!("OOOT: {:?}", commits[0].output);
|
||||
use_inputs = format!(
|
||||
"{},{}",
|
||||
commits[0].output.commit.as_ref().unwrap(),
|
||||
|
||||
@@ -144,9 +144,7 @@ fn contract_srs_mwixnet_tx_impl(test_dir: &'static str) -> Result<(), libwallet:
|
||||
// get last output
|
||||
let last_output = outputs.1[outputs.1.len() - 1].clone();
|
||||
|
||||
let mwixnet_req = api.create_mwixnet_req(m, ¶ms, &last_output.commit, true)?;
|
||||
|
||||
println!("MWIXNET REQ: {:?}", mwixnet_req);
|
||||
api.create_mwixnet_req(m, ¶ms, &last_output.commit, true)?;
|
||||
|
||||
// check output we created comsig for is indeed locked
|
||||
let outputs = api.retrieve_outputs(recv_mask, false, false, None)?;
|
||||
|
||||
Reference in New Issue
Block a user