mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +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{}{}
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
c.capacityChan <- c.size
|
||||
}
|
||||
c.sizeChan <- struct{}{}
|
||||
return nil
|
||||
|
|
@ -273,6 +275,8 @@ func (c *ContentStorage) prune() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c.size -= curentSize
|
||||
c.capacityChan <- c.size - curentSize
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue