[bug] fix improper mark_output_mined
This commit is contained in:
parent
60a497cdde
commit
66248a4600
@ -288,13 +288,7 @@ async fn handle_state_updates(
|
||||
let mut sp_wallet = WALLET.get().unwrap().lock_anyhow().unwrap();
|
||||
// inputs first
|
||||
for outpoint in found_inputs {
|
||||
if let Some(output) = sp_wallet.get_mut_outputs().get_mut(&outpoint) {
|
||||
output.spend_status =
|
||||
OutputSpendStatus::Mined(blkhash.as_raw_hash().to_byte_array());
|
||||
} else {
|
||||
// We found an input that we don't have in our wallet, that shouldn't happen
|
||||
error!("Spent unknown output: {:?}", outpoint);
|
||||
}
|
||||
sp_wallet.mark_output_mined(&outpoint, blkhash);
|
||||
}
|
||||
sp_wallet.get_mut_outputs().extend(found_outputs);
|
||||
sp_wallet.set_last_scan(blkheight.to_consensus_u32());
|
||||
|
Loading…
x
Reference in New Issue
Block a user