mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 09:51:36 +00:00
Replace the single-field struct with a type alias on common.Hash. Both have identical layout (32 bytes, no pointers) and noscan span placement, but the alias matches master's style and reads more naturally. A zero-arg Hash() method keeps call sites terse.
25 lines
1 KiB
Go
25 lines
1 KiB
Go
// Copyright 2025 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 bintrie
|
|
|
|
import "github.com/ethereum/go-ethereum/common"
|
|
|
|
// HashedNode is an unresolved node — only its hash is known.
|
|
type HashedNode common.Hash
|
|
|
|
// Hash returns the node's hash.
|
|
func (h HashedNode) Hash() common.Hash { return common.Hash(h) }
|