Skip to content

Commit

Permalink
1545 Fix pull request comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kladkogex committed Dec 16, 2024
1 parent e40a7d9 commit c759dc6
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions libweb3jsonrpc/Eth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ),
Expand All @@ -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 ) );
}


Expand Down

0 comments on commit c759dc6

Please sign in to comment.