feat(serve): implement new ReadTx spec endpoint#500
feat(serve): implement new ReadTx spec endpoint#500lancevincentsalera wants to merge 11 commits intotxpipe:mainfrom
Conversation
…h associated block
…or better readability refactor(chain): rename get_tx_with_block to get_tx_with_block_data for better readability
| pub fn get_tx_with_block_data( | ||
| &self, | ||
| tx_hash: &[u8], | ||
| ) -> Result<Option<(BlockBody, Vec<u8>)>, Error> { |
There was a problem hiding this comment.
I think BlockBody used everywhere in this PR is the wrong name. A block is very loosely split into two things:
- block header
- block body
MultiEraBlock consists of the full block (body, header, anything else). That's also what I think is logical to return from utxorpc as well. However, in this PR, you refer to the fully block as "BlockBody" which is misleading because it makes it sound like you're returning only the "body" field of the block (whereas you're actually returning the full block)
Although I think this terminology overloading stems from beyond this PR, since I also this this ambiguity in types like RawBlock
There was a problem hiding this comment.
Makes sense. Thank you for pointing this out @SebastienGllmt ! Already applied the changes.
There was a problem hiding this comment.
maybe just to loop in @scarmuega since I'm not sure if there was a separate rationale for calling things "body"
Hello @scarmuega, @SebastienGllmt. This PR implements the introduced
ReadTxendpoint in utxrpc/spec: utxorpc/spec#143. I would very much appreciate your reviews and thoughts for this. Let me know if there's anything I need to change. Thank you!NOTE: This includes changes from utxorpc/spec#155 since
ReadTxis directly affected with the inclusion of block information inside tx watchers