Skip to content

Commit

Permalink
Update send_transaction and send_raw_transaction to return error for …
Browse files Browse the repository at this point in the history
…read-only node.
  • Loading branch information
itsyaasir committed Feb 22, 2024
1 parent e5ebed7 commit a75f961
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/rpc/rpc/src/eth/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,12 @@ where
}

/// Handler for: `eth_sendTransaction`
async fn send_transaction(&self, request: TransactionRequest) -> Result<B256> {
async fn send_transaction(&self, _request: TransactionRequest) -> Result<B256> {
Err(internal_rpc_err("read-only node"))
}

/// Handler for: `eth_sendRawTransaction`
async fn send_raw_transaction(&self, tx: Bytes) -> Result<B256> {
async fn send_raw_transaction(&self, _tx: Bytes) -> Result<B256> {
Err(internal_rpc_err("read-only node"))
}

Expand Down

0 comments on commit a75f961

Please sign in to comment.