grin output_identifier refactoring

This commit is contained in:
antiochp
2020-09-01 14:01:20 +01:00
parent 24f35a22bb
commit 2b1ba14db5
4 changed files with 11 additions and 16 deletions
+3 -2
View File
@@ -40,9 +40,10 @@ fn get_output_local(chain: &chain::Chain, commit: pedersen::Commitment) -> Optio
if chain.get_unspent(commit).unwrap().is_some() {
let block_height = chain.get_header_for_output(commit).unwrap().height;
let output_pos = chain.get_output_pos(&commit).unwrap_or(0);
return Some(api::Output::new(&commit, block_height, output_pos));
Some(api::Output::new(&commit, block_height, output_pos))
} else {
None
}
None
}
/// Get a kernel from the chain locally