From 655882ff77bccd47e377a372bc83f3fdffbf6124 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 28 Jul 2023 15:16:18 +0200 Subject: [PATCH] error check --- cosmos/x/evm/types/tx.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cosmos/x/evm/types/tx.go b/cosmos/x/evm/types/tx.go index 923bf6cbe..683cf486f 100644 --- a/cosmos/x/evm/types/tx.go +++ b/cosmos/x/evm/types/tx.go @@ -169,7 +169,10 @@ func ProvideEthereumTransactionGetSigners() signing.CustomGetSigner { ethTxData := msg.(*v1alpha1evm.WrappedEthereumTransaction).Data // Get a new empty Transaction. - ethTx := txSyncPool.Get().(*coretypes.Transaction) + ethTx, ok := txSyncPool.Get().(*coretypes.Transaction) + if !ok { + return nil, errors.New("failed to get sync pool when getting signers") + } // Fill it with the data. if err := ethTx.UnmarshalBinary(ethTxData); err != nil {