Skip to content

Commit d8797ec

Browse files
committed
chore: add detete key debug log
1 parent 2a3e002 commit d8797ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

trie/secure_trie.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,18 @@ func (t *StateTrie) MustDelete(key []byte) {
197197
// DeleteStorage removes any existing storage slot from the trie.
198198
// If the specified trie node is not in the trie, nothing will be changed.
199199
// If a node is not found in the database, a MissingNodeError is returned.
200-
func (t *StateTrie) DeleteStorage(_ common.Address, key []byte) error {
200+
func (t *StateTrie) DeleteStorage(address common.Address, key []byte) error {
201201
hk := t.hashKey(key)
202202
delete(t.getSecKeyCache(), string(hk))
203+
log.Info("update storage", "owner", address.String(), "key", common.Bytes2Hex(key))
203204
return t.trie.Delete(hk)
204205
}
205206

206207
// DeleteAccount abstracts an account deletion from the trie.
207208
func (t *StateTrie) DeleteAccount(address common.Address) error {
208209
hk := t.hashKey(address.Bytes())
209210
delete(t.getSecKeyCache(), string(hk))
211+
log.Info("delete account", "addr", address.String())
210212
return t.trie.Delete(hk)
211213
}
212214

0 commit comments

Comments
 (0)