Merge pull request #714 from gzliudan/fix-sa6005

core: fix staticcheck warning SA6005: should use strings.EqualFold
This commit is contained in:
Daniel Liu 2024-10-30 21:14:22 +08:00 committed by GitHub
commit 3f0e1576ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -389,7 +389,7 @@ func applyTransaction(config *params.ChainConfig, tokensFee map[common.Address]*
currentBlockNumber := blockNumber.Int64()
if addr, ok := blockMap[currentBlockNumber]; ok {
if strings.ToLower(addr) == strings.ToLower(addrFrom) {
if strings.EqualFold(addr, addrFrom) { // case insensitive
bal := addrMap[addr]
hBalance := new(big.Int)
hBalance.SetString(bal+"000000000000000000", 10)