Skip to content

Commit

Permalink
revert some code
Browse files Browse the repository at this point in the history
  • Loading branch information
Eason committed Nov 16, 2023
1 parent 74e9300 commit 35ef862
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions core/api/src/jsonrpc/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ pub enum RpcError {
InvalidFromBlockAndToBlockUnion,
#[display(fmt = "Invalid filter id {}", _0)]
CannotFindFilterId(u64),
#[display(fmt = "Invalid request params {}", _0)]
InvalidRequestParams(U256),

#[display(fmt = "EVM error {}", "decode_revert_msg(&_0.ret)")]
Evm(TxResp),
Expand Down Expand Up @@ -90,7 +88,6 @@ impl RpcError {
RpcError::InvalidRewardPercentiles(_, _) => -40020,
RpcError::InvalidFromBlockAndToBlockUnion => -40021,
RpcError::CannotFindFilterId(_) => -40022,
RpcError::InvalidRequestParams(_) => -40023,

RpcError::Evm(_) => -49998,
RpcError::Internal(_) => -49999,
Expand Down Expand Up @@ -132,7 +129,6 @@ impl From<RpcError> for ErrorObjectOwned {
ErrorObject::owned(err_code, err, none_data)
}
RpcError::CannotFindFilterId(_) => ErrorObject::owned(err_code, err, none_data),
RpcError::InvalidRequestParams(_) => ErrorObject::owned(err_code, err, none_data),

RpcError::Evm(resp) => {
ErrorObject::owned(err_code, err.clone(), Some(vm_err(resp.clone())))
Expand Down
2 changes: 1 addition & 1 deletion core/api/src/jsonrpc/impl/axon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<Adapter: APIAdapter + 'static> AxonRpcServer for AxonRpcImpl<Adapter> {
Ok(ret)
}

async fn get_proposal_by_number(&self, block_number: U256) -> RpcResult<Proposal> {
async fn get_proposal_by_number(&self, block_number: U64) -> RpcResult<Proposal> {
let block_number = block_number.low_u64();

let prev_state_root = if block_number == 0 {
Expand Down

0 comments on commit 35ef862

Please sign in to comment.