Wallet recovery return unspent only (#340)

* beginning to add wallet restore... api endpoints and basic restore

* basic restore working, still missing features

* rustfmt

* large speed up to output search, should be more or less working

* properly mark coinbase status

* ensure only unspent utxos are returned from sumtree
This commit is contained in:
Yeastplume
2017-11-20 10:38:49 +00:00
committed by GitHub
parent e20975136e
commit 6ad403fbf8
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -118,7 +118,8 @@ impl UtxoHandler {
let outputs = block
.outputs
.iter()
.map(|k| OutputSwitch::from_output(k, &header))
.filter(|c|self.chain.is_unspent(&c.commit).unwrap())
.map(|k|OutputSwitch::from_output(k, &header))
.collect();
BlockOutputs {
header: BlockHeaderInfo::from_header(&header),