mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
consensus: delete unused functions rlpHash (#1749)
This commit is contained in:
parent
7641bcfd19
commit
812abd4b83
1 changed files with 0 additions and 11 deletions
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/XinFinOrg/XDPoSChain/common"
|
||||
"github.com/XinFinOrg/XDPoSChain/log"
|
||||
"github.com/XinFinOrg/XDPoSChain/rlp"
|
||||
"golang.org/x/crypto/sha3"
|
||||
)
|
||||
|
||||
func Position(list []common.Address, x common.Address) int {
|
||||
|
|
@ -89,13 +88,3 @@ func DecodeBytesExtraFields(b []byte, val interface{}) error {
|
|||
return fmt.Errorf("consensus version %d is not defined, or this block is v1 block", b[0])
|
||||
}
|
||||
}
|
||||
|
||||
func rlpHash(x interface{}) (h common.Hash) {
|
||||
hw := sha3.NewLegacyKeccak256()
|
||||
err := rlp.Encode(hw, x)
|
||||
if err != nil {
|
||||
log.Error("[rlpHash] Fail to hash item", "Error", err)
|
||||
}
|
||||
hw.Sum(h[:0])
|
||||
return h
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue