Use json instead of wire format in mempool add api

Uniform all http api to use json as the encoding
This commit is contained in:
Giacomo Pasini 2023-11-06 15:54:02 +01:00
parent 8eb8472af1
commit 19a332d513
No known key found for this signature in database
GPG Key ID: FC08489D2D895D4B
1 changed files with 1 additions and 2 deletions

View File

@ -14,7 +14,6 @@ use tokio::sync::oneshot;
use tracing::error;
// internal
use full_replication::{Blob, Certificate};
use nomos_core::wire;
use nomos_core::{
block::Block,
da::{blob, certificate::Certificate as _},
@ -400,7 +399,7 @@ pub(super) async fn handle_mempool_add_req<K, V>(
where
K: DeserializeOwned,
{
let item = wire::deserialize::<K>(&wire_item)?;
let item: K = serde_json::from_slice(&wire_item)?;
let (sender, receiver) = oneshot::channel();
let key = key(&item);
mempool_channel