all: simplify s[:] to s where s is a slice (#17673)
This commit is contained in:
@ -445,7 +445,7 @@ func (c *ChainIndexer) AddChildIndexer(indexer *ChainIndexer) {
|
||||
func (c *ChainIndexer) loadValidSections() {
|
||||
data, _ := c.indexDb.Get([]byte("count"))
|
||||
if len(data) == 8 {
|
||||
c.storedSections = binary.BigEndian.Uint64(data[:])
|
||||
c.storedSections = binary.BigEndian.Uint64(data)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ func LogsBloom(logs []*Log) *big.Int {
|
||||
}
|
||||
|
||||
func bloom9(b []byte) *big.Int {
|
||||
b = crypto.Keccak256(b[:])
|
||||
b = crypto.Keccak256(b)
|
||||
|
||||
r := new(big.Int)
|
||||
|
||||
@ -130,7 +130,7 @@ var Bloom9 = bloom9
|
||||
|
||||
func BloomLookup(bin Bloom, topic bytesBacked) bool {
|
||||
bloom := bin.Big()
|
||||
cmp := bloom9(topic.Bytes()[:])
|
||||
cmp := bloom9(topic.Bytes())
|
||||
|
||||
return bloom.And(bloom, cmp).Cmp(cmp) == 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user