mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-11 05:20:05 +00:00
fix linter warning
This commit is contained in:
parent
04a6517c5b
commit
432c2a5b26
@ -35,8 +35,7 @@ func HeaderTDKey(number uint64, hash common.Hash) []byte {
|
||||
|
||||
func IsHeaderTDKey(k []byte) bool {
|
||||
l := common.BlockNumberLength + common.HashLength + 1
|
||||
result := len(k) == l && bytes.Compare(k[l-1:], HeaderTDSuffix) == 0
|
||||
return result
|
||||
return len(k) == l && bytes.Equal(k[l-1:], HeaderTDSuffix)
|
||||
}
|
||||
|
||||
// headerHashKey = headerPrefix + num (uint64 big endian) + headerHashSuffix
|
||||
@ -46,8 +45,7 @@ func HeaderHashKey(number uint64) []byte {
|
||||
|
||||
func IsHeaderHashKey(k []byte) bool {
|
||||
l := common.BlockNumberLength + 1
|
||||
result := len(k) == l && bytes.Compare(k[l-1:], HeaderHashSuffix) == 0
|
||||
return result
|
||||
return len(k) == l && bytes.Equal(k[l-1:], HeaderHashSuffix)
|
||||
}
|
||||
|
||||
// headerNumberKey = headerNumberPrefix + hash
|
||||
|
Loading…
Reference in New Issue
Block a user