rpc: add /check_tx endpoint (#5017)

Closes #4549
This commit is contained in:
Anton Kaliaev
2020-06-19 09:25:52 +04:00
committed by GitHub
parent 95d2d136cd
commit 257a374b78
15 changed files with 164 additions and 4 deletions
+2 -2
View File
@@ -706,9 +706,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) //nolint:staticcheck // SA5011: possible nil pointer dereference
delete(cache.cacheMap, poppedTxHash)
if popped != nil {
poppedTxHash := popped.Value.([sha256.Size]byte)
delete(cache.cacheMap, poppedTxHash)
cache.list.Remove(popped)
}
}