Skip to content

Commit

Permalink
refactor: MpoolPending calling, remove mpool_ops
Browse files Browse the repository at this point in the history
  • Loading branch information
aatifsyed committed Apr 4, 2024
1 parent 493c4a1 commit 4df7bbc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
18 changes: 16 additions & 2 deletions src/cli/subcommands/mpool_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
use std::str::FromStr;

use crate::blocks::Tipset;
use crate::lotus_json::LotusJson;
use crate::message::SignedMessage;
use crate::rpc::mpool_api::MpoolPending;
use crate::rpc::types::ApiTipsetKey;
use crate::rpc::{self, RpcMethodExt as _};
use crate::rpc_client::ApiInfo;
use crate::shim::address::StrictAddress;
use crate::shim::message::Message;
Expand Down Expand Up @@ -211,7 +215,12 @@ impl MpoolCommands {
to,
from,
} => {
let messages = api.mpool_pending(vec![]).await?;
let messages = MpoolPending::call(
&rpc::Client::from(api.clone()),
(LotusJson(ApiTipsetKey(None)),),
)
.await?
.into_inner();

let local_addrs = if local {
let response = api.wallet_list().await?;
Expand Down Expand Up @@ -245,7 +254,12 @@ impl MpoolCommands {
let atto_str = api.chain_get_min_base_fee(basefee_lookback).await?;
let min_base_fee = TokenAmount::from_atto(atto_str.parse::<BigInt>()?);

let messages = api.mpool_pending(vec![]).await?;
let messages = MpoolPending::call(
&rpc::Client::from(api.clone()),
(LotusJson(ApiTipsetKey(None)),),
)
.await?
.into_inner();

let local_addrs = if local {
let response = api.wallet_list().await?;
Expand Down
1 change: 0 additions & 1 deletion src/rpc_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pub mod beacon_ops;
pub mod chain_ops;
pub mod common_ops;
pub mod eth_ops;
pub mod mpool_ops;
pub mod net_ops;
pub mod node_ops;
pub mod state_ops;
Expand Down
20 changes: 0 additions & 20 deletions src/rpc_client/mpool_ops.rs

This file was deleted.

0 comments on commit 4df7bbc

Please sign in to comment.