Don't clean unconfirmed outputs > 500 blocks old (#2275)
* only clean unconfirmed coinbase * only past 50 blocks
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user