no need to rehash with index to compare output with input spending it (#3260)

* no need to rehash with index to compare output with input spending it

* compare output identifier when checking is_unspent()

* output identifier from cleanup
This commit is contained in:
Antioch Peverell
2020-03-04 08:36:33 +00:00
committed by GitHub
parent 2527006e8d
commit 5f5b1d2f13
5 changed files with 32 additions and 42 deletions
+1 -1
View File
@@ -288,7 +288,7 @@ impl OutputPrintable {
OutputType::Transaction
};
let out_id = core::OutputIdentifier::from_output(&output);
let out_id = core::OutputIdentifier::from(output);
let res = chain.is_unspent(&out_id);
let (spent, block_height) = if let Ok(output_pos) = res {
(false, Some(output_pos.height))