mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Don't clean unconfirmed outputs > 500 blocks old (#2275)
* only clean unconfirmed coinbase * only past 50 blocks
This commit is contained in:
parent
f5e4782a30
commit
906adb9e6d
1 changed files with 6 additions and 2 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue