handle transaction inputs correctly (#512)

* commit

* bump grin crates to latest version on master
This commit is contained in:
Antioch Peverell
2020-09-07 18:04:07 +01:00
committed by GitHub
parent b040ae4c5d
commit 073c63aa16
7 changed files with 97 additions and 55 deletions
+1 -2
View File
@@ -17,7 +17,6 @@ use strum::IntoEnumIterator;
use crate::api_impl::owner::finalize_tx as owner_finalize;
use crate::api_impl::owner::{check_ttl, post_tx};
use crate::grin_core::core::transaction::Transaction;
use crate::grin_keychain::Keychain;
use crate::grin_util::secp::key::SecretKey;
use crate::internal::{selection, tx, updater};
@@ -91,7 +90,7 @@ where
}
}
ret_slate.tx = Some(Transaction::empty());
ret_slate.tx = Some(Slate::empty_transaction());
let height = w.last_confirmed_height()?;
let keychain = w.keychain(keychain_mask)?;
+2 -2
View File
@@ -647,7 +647,7 @@ where
}
// if this is compact mode, we need to create the transaction now
ret_slate.tx = Some(Transaction::empty());
ret_slate.tx = Some(Slate::empty_transaction());
// if self sending, make sure to store 'initiator' keys
let context_res = w.get_private_context(keychain_mask, slate.id.as_bytes());
@@ -721,7 +721,7 @@ where
let mut sl = slate.clone();
if sl.tx == None {
sl.tx = Some(Transaction::empty());
sl.tx = Some(Slate::empty_transaction());
selection::repopulate_tx(&mut *w, keychain_mask, &mut sl, &context, true)?;
}