From d47408751110ee74810b7962463156940fd481e9 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Mon, 30 Aug 2021 11:46:59 +0700 Subject: [PATCH] clean --- txpool/pool.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/txpool/pool.go b/txpool/pool.go index a97a838b8..7e1bec721 100644 --- a/txpool/pool.go +++ b/txpool/pool.go @@ -504,18 +504,8 @@ func (b *ByNonce) has(mt *metaTx) bool { found := b.tree.Get(&sortByNonce{mt}) return found != nil } -func (b *ByNonce) delete(mt *metaTx) { - deleted := b.tree.Delete(&sortByNonce{mt}) - if ASSERT { - if deleted != nil && deleted.(*sortByNonce).metaTx.Tx.idHash != mt.Tx.idHash { - panic(1) - } - } -} +func (b *ByNonce) delete(mt *metaTx) { b.tree.Delete(&sortByNonce{mt}) } func (b *ByNonce) replaceOrInsert(mt *metaTx) *metaTx { - if ASSERT && (mt == nil || mt.Tx == nil || mt.Tx.senderID == 0) { - panic("must never happen") - } it := b.tree.ReplaceOrInsert(&sortByNonce{mt}) if it != nil { return it.(*sortByNonce).metaTx