Skip to content

Commit

Permalink
Changed Some strings to Bytes32
Browse files Browse the repository at this point in the history
  • Loading branch information
luna committed Dec 23, 2023
1 parent 192c3e1 commit 80c3c6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions clients/src/api/full_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ pub trait FullnodeAPI {
height: u32,
) -> Result<CoinSpend, Error>;
async fn get_coin_spend(&self, coin_record: &CoinRecord) -> Result<CoinSpend, Error>;
async fn get_all_mempool_tx_ids(&self) -> Result<Vec<String>, Error>;
async fn get_all_mempool_items(&self) -> Result<HashMap<String, MempoolItem>, Error>;
async fn get_all_mempool_tx_ids(&self) -> Result<Vec<Bytes32>, Error>;
async fn get_all_mempool_items(&self) -> Result<HashMap<Bytes32, MempoolItem>, Error>;
async fn get_mempool_item_by_tx_id(&self, tx_id: &str) -> Result<MempoolItem, Error>;
async fn get_mempool_items_by_coin_name(
&self,
Expand Down
4 changes: 2 additions & 2 deletions clients/src/api/responses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ pub struct MempoolItemAryResp {

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct MempoolItemsResp {
pub mempool_items: HashMap<String, MempoolItem>,
pub mempool_items: HashMap<Bytes32, MempoolItem>,
pub success: bool,
}

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct MempoolTXResp {
pub tx_ids: Vec<String>,
pub tx_ids: Vec<Bytes32>,
pub success: bool,
}

Expand Down
4 changes: 2 additions & 2 deletions clients/src/rpc/full_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ impl FullnodeAPI for FullnodeClient {
self.get_puzzle_and_solution(&coin_record.coin.name(), coin_record.spent_block_index)
.await
}
async fn get_all_mempool_tx_ids(&self) -> Result<Vec<String>, Error> {
async fn get_all_mempool_tx_ids(&self) -> Result<Vec<Bytes32>, Error> {
Ok(post::<MempoolTXResp>(
&self.client,
&get_url(self.host.as_str(), self.port, "get_all_mempool_tx_ids"),
Expand All @@ -471,7 +471,7 @@ impl FullnodeAPI for FullnodeClient {
.await?
.tx_ids)
}
async fn get_all_mempool_items(&self) -> Result<HashMap<String, MempoolItem>, Error> {
async fn get_all_mempool_items(&self) -> Result<HashMap<Bytes32, MempoolItem>, Error> {
Ok(post::<MempoolItemsResp>(
&self.client,
&get_url(self.host.as_str(), self.port, "get_all_mempool_items"),
Expand Down

0 comments on commit 80c3c6d

Please sign in to comment.