Skip to content

Commit

Permalink
feat: changr size after delete data
Browse files Browse the repository at this point in the history
  • Loading branch information
fearlessfe committed Nov 27, 2024
1 parent 9a5940e commit edee5a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions portalnetwork/storage/ethpepple/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -273,6 +275,8 @@ func (c *ContentStorage) prune() error {
if err != nil {
return err
}
c.size -= curentSize
c.capacityChan <- c.size - curentSize
return nil
}

Expand Down

0 comments on commit edee5a5

Please sign in to comment.