mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 22:43:47 +00:00
feat: changr size after delete data
This commit is contained in:
parent
f81ca9b344
commit
de4294e9c2
1 changed files with 4 additions and 0 deletions
|
|
@ -205,6 +205,8 @@ func (c *ContentStorage) Put(contentKey []byte, contentId []byte, content []byte
|
||||||
c.sizeChan <- struct{}{}
|
c.sizeChan <- struct{}{}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
c.capacityChan <- c.size
|
||||||
}
|
}
|
||||||
c.sizeChan <- struct{}{}
|
c.sizeChan <- struct{}{}
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -273,6 +275,8 @@ func (c *ContentStorage) prune() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
c.size -= curentSize
|
||||||
|
c.capacityChan <- c.size - curentSize
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue