Make Transaction Field in V4 Slate Optional (#356)

* make transaction field in V4 Slate optional

* add mutable/non mutable version of tx getter

* removal of mut references where not needed

* remove more muts

* update from master

* update from master

* test fixes
This commit is contained in:
Yeastplume
2020-03-10 18:19:27 +00:00
committed by GitHub
parent aebc352fbe
commit c42d5ddcff
35 changed files with 312 additions and 205 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ where
let w = w_lock.lc_provider()?.wallet_inst()?;
w.w2n_client().clone()
};
owner::post_tx(&client, &slate.tx, false)?; // mines a block
owner::post_tx(&client, slate.tx_or_err()?, false)?; // mines a block
Ok(())
}
+2 -2
View File
@@ -276,7 +276,7 @@ where
if o_str.is_empty() {
continue;
}
let c = util::from_hex(o_str).unwrap();
let c = util::from_hex(&o_str).unwrap();
let commit = Commitment::from_vec(c);
let out = super::get_output_local(&self.chain.clone(), &commit);
if let Some(o) = out {
@@ -345,7 +345,7 @@ where
let excess = split[0].parse::<String>().unwrap();
let min = split[1].parse::<u64>().unwrap();
let max = split[2].parse::<u64>().unwrap();
let commit_bytes = util::from_hex(excess).unwrap();
let commit_bytes = util::from_hex(&excess).unwrap();
let commit = pedersen::Commitment::from_vec(commit_bytes);
let min = match min {
0 => None,