mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
Update database.go
This commit is contained in:
parent
9e13c0c225
commit
521b277b63
1 changed files with 11 additions and 1 deletions
|
|
@ -58,6 +58,8 @@ var (
|
|||
memcacheCommitTimeTimer = metrics.NewRegisteredResettingTimer("hashdb/memcache/commit/time", nil)
|
||||
memcacheCommitNodesMeter = metrics.NewRegisteredMeter("hashdb/memcache/commit/nodes", nil)
|
||||
memcacheCommitBytesMeter = metrics.NewRegisteredMeter("hashdb/memcache/commit/bytes", nil)
|
||||
|
||||
memcacheCleanDeleteMeter = metrics.NewRegisteredMeter("hashdb/memcache/clean/delete", nil)
|
||||
)
|
||||
|
||||
// Config contains the settings for database.
|
||||
|
|
@ -528,8 +530,16 @@ func (c *cleaner) Put(key []byte, rlp []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Delete removes the referenced node from the clean cache.
|
||||
// This is called during the replay phase of a commit operation
|
||||
// where the trie node has been deleted from the database.
|
||||
func (c *cleaner) Delete(key []byte) error {
|
||||
panic("not implemented")
|
||||
hash := common.BytesToHash(key)
|
||||
if c.db.cleans != nil {
|
||||
c.db.cleans.Del(hash[:])
|
||||
memcacheCleanDeleteMeter.Mark(1)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Update inserts the dirty nodes in provided nodeset into database and link the
|
||||
|
|
|
|||
Loading…
Reference in a new issue