iroha
iroha copied to clipboard
[refactor]: Change code organization in `iroha_client_cli`
Btw, it seems that
contextis used only withinsubmitandlistenfunctions. So, maybe you can define a "miniclient" struct that hassubmitandlistenfunctions, and does the printing internally?trait MiniClient { fn listen(&mut self, height: NonZeroU64) -> Result<()>; fn submit(&mut self, isi: impl Into<Executable>, metadata: UnlimitedMetadata) -> Result<()>; }
RunArgsmight work withMiniClienttrait. The struct that implementsMiniClientmight contain both configuration and debugging logic, whichRunArgsdoes not care about.
Originally posted by @0x009922 in https://github.com/hyperledger/iroha/pull/3608#discussion_r1230562370
@0x009922 is this still relevant?