mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Return a propoer error code for txpool is full error (#13245)
This commit is contained in:
@ -676,6 +676,9 @@ impl From<RpcPoolError> for jsonrpsee_types::error::ErrorObject<'static> {
|
||||
fn from(error: RpcPoolError) -> Self {
|
||||
match error {
|
||||
RpcPoolError::Invalid(err) => err.into(),
|
||||
RpcPoolError::TxPoolOverflow => {
|
||||
rpc_error_with_code(EthRpcErrorCode::TransactionRejected.code(), error.to_string())
|
||||
}
|
||||
error => internal_rpc_err(error.to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user