lint: update and appease the linter (#6101)

Closes: #5775
This commit is contained in:
Callum Waters
2021-02-16 12:41:36 +04:00
committed by GitHub
parent 2e406e0d78
commit 84904ecef1
54 changed files with 81 additions and 134 deletions
+2 -2
View File
@@ -707,9 +707,9 @@ func (cache *mapTxCache) Push(tx types.Tx) bool {
if cache.list.Len() >= cache.size {
popped := cache.list.Front()
poppedTxHash := popped.Value.([sha256.Size]byte)
delete(cache.cacheMap, poppedTxHash)
if popped != nil {
poppedTxHash := popped.Value.([sha256.Size]byte)
delete(cache.cacheMap, poppedTxHash)
cache.list.Remove(popped)
}
}