From 906adb9e6defd45e6d5063d2324a77d5e34d503a Mon Sep 17 00:00:00 2001 From: Yeastplume Date: Wed, 2 Jan 2019 14:27:17 +0000 Subject: [PATCH] Don't clean unconfirmed outputs > 500 blocks old (#2275) * only clean unconfirmed coinbase * only past 50 blocks --- wallet/src/libwallet/internal/updater.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wallet/src/libwallet/internal/updater.rs b/wallet/src/libwallet/internal/updater.rs index 99251b9c5..442416c99 100644 --- a/wallet/src/libwallet/internal/updater.rs +++ b/wallet/src/libwallet/internal/updater.rs @@ -309,12 +309,16 @@ where C: NodeClient, K: Keychain, { - if height < 500 { + if height < 50 { return Ok(()); } let mut ids_to_del = vec![]; for out in wallet.iter() { - if out.status == OutputStatus::Unconfirmed && out.height > 0 && out.height < height - 500 { + if out.status == OutputStatus::Unconfirmed + && out.height > 0 + && out.height < height - 50 + && out.is_coinbase + { ids_to_del.push(out.key_id.clone()) } }