From af80f39586f2e9fdfa38eaab0585682981d38f3d Mon Sep 17 00:00:00 2001 From: nelsonksh Date: Sun, 12 Oct 2025 21:29:03 +0530 Subject: [PATCH 1/2] feat(utxorpc): add block to WatchTx --- src/serve/grpc/watch.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/serve/grpc/watch.rs b/src/serve/grpc/watch.rs index 2a5e8b3f..ab096a9b 100644 --- a/src/serve/grpc/watch.rs +++ b/src/serve/grpc/watch.rs @@ -164,8 +164,12 @@ fn block_to_txs( }) .map(|x| u5c::watch::AnyChainTx { chain: Some(u5c::watch::any_chain_tx::Chain::Cardano(x)), - // TODO(p): should it be none? - block: None, + block: Some(u5c::watch::AnyChainBlock { + native_bytes: body.to_vec().into(), + chain: Some(u5c::watch::any_chain_block::Chain::Cardano( + mapper.map_block_cbor(body), + )), + }), }) .collect() } From 2469b0672fceb5d5939b967b7941c8b722936fad Mon Sep 17 00:00:00 2001 From: nelsonksh <150728524+nelsonksh@users.noreply.github.com> Date: Tue, 14 Oct 2025 03:22:55 +0530 Subject: [PATCH 2/2] Add block body reference in watch.rs --- src/serve/grpc/watch.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/serve/grpc/watch.rs b/src/serve/grpc/watch.rs index ab096a9b..b8b903fa 100644 --- a/src/serve/grpc/watch.rs +++ b/src/serve/grpc/watch.rs @@ -151,6 +151,7 @@ fn block_to_txs( mapper: &interop::Mapper, request: &u5c::watch::WatchTxRequest, ) -> Vec { + let body: &BlockBody = █ let block = MultiEraBlock::decode(block).unwrap(); let txs = block.txs();