From c759dc6d0f7f2877c729066cba60384e091d08fc Mon Sep 17 00:00:00 2001 From: Konstantin Kladko <13399135+kladkogex@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:22:56 +0000 Subject: [PATCH] 1545 Fix pull request comment --- libweb3jsonrpc/Eth.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/libweb3jsonrpc/Eth.cpp b/libweb3jsonrpc/Eth.cpp index 8e92f36d6..81698052c 100644 --- a/libweb3jsonrpc/Eth.cpp +++ b/libweb3jsonrpc/Eth.cpp @@ -412,6 +412,7 @@ Json::Value Eth::setSchainExitTime( Json::Value const& /*_transaction*/ ) { } + Json::Value Eth::eth_inspectTransaction( std::string const& _rlp ) { try { return toJson( Transaction( jsToBytes( _rlp, OnFailed::Throw ), @@ -428,17 +429,7 @@ string Eth::eth_sendRawTransaction( std::string const& _rlp ) { // will be checked as a part of transaction import Transaction t( jsToBytes( _rlp, OnFailed::Throw ), CheckTransaction::None, false, EIP1559TransactionsPatch::isEnabledInWorkingBlock() ); - try { - return toJS( client()->importTransaction( t, TransactionBroadcast::BroadcastToAll ) ); - } catch ( PendingTransactionAlreadyExists& ) { - throw JsonRpcException( - "Same transaction already exists in the pending transaction queue." ); - } catch ( TransactionAlreadyInChain& ) { - // make it similar to what geth does - throw JsonRpcException( "Nonce too low." ); - } catch ( InvalidNonce& ) { - throw JsonRpcException( "Invalid transaction nonce." ); - } + return toJS( client()->importTransaction( t, TransactionBroadcast::BroadcastToAll ) ); }