mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
This pull request introduces a workaround in the database range deleter: if key == hash(value), the entry will be excluded from deletion. In hash mode, trie nodes are stored using their hash as the database key without any prefix. As a result, they may unintentionally collide with entries marked for deletion. This workaround will remain in place until hash mode is fully deprecated.
23 lines
1,008 B
Go
23 lines
1,008 B
Go
// Copyright 2025 The go-ethereum Authors
|
|
// This file is part of the go-ethereum library.
|
|
//
|
|
// The go-ethereum library is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Lesser General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// The go-ethereum library is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU Lesser General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
package ethdb
|
|
|
|
import "errors"
|
|
|
|
// ErrTooManyKeys is returned when the number of keys pending range
|
|
// deletion exceeds the allowed limit.
|
|
var ErrTooManyKeys = errors.New("exceeded maximum keys for range deletion")
|