From d4bfa252ece0c856896ef5bb54b0e29ff6694a4d Mon Sep 17 00:00:00 2001 From: Michael Tsitrin Date: Wed, 15 May 2024 21:25:47 +0300 Subject: [PATCH] linter --- mempool/v1/mempool.go | 2 +- settlement/dymension/dymension.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mempool/v1/mempool.go b/mempool/v1/mempool.go index 95aff4599..4d98dcaaa 100644 --- a/mempool/v1/mempool.go +++ b/mempool/v1/mempool.go @@ -272,7 +272,7 @@ func (txmp *TxMempool) removeTxByKey(key types.TxKey) error { // removeTxByElement removes the specified transaction element from the mempool. // The caller must hold txmp.mtx exclusively. func (txmp *TxMempool) removeTxByElement(elt *clist.CElement) { - w := elt.Value.(*WrappedTx) + w, _ := elt.Value.(*WrappedTx) delete(txmp.txByKey, w.tx.Key()) delete(txmp.txBySender, w.sender) txmp.txs.Remove(elt) diff --git a/settlement/dymension/dymension.go b/settlement/dymension/dymension.go index ca161dcf6..490dc98a1 100644 --- a/settlement/dymension/dymension.go +++ b/settlement/dymension/dymension.go @@ -263,7 +263,7 @@ func (d *HubClient) PostBatch(batch *types.Batch, daClient da.Client, daResult * return fmt.Errorf("subscription cancelled") case event := <-subscription.Out(): - eventData := event.Data().(*settlement.EventDataNewBatchAccepted) + eventData, _ := event.Data().(*settlement.EventDataNewBatchAccepted) if eventData.EndHeight != batch.EndHeight { d.logger.Info("Received event for a different batch, ignoring.", "event", eventData) continue