iroha icon indicating copy to clipboard operation
iroha copied to clipboard

[refactor]: Change code organization in `iroha_client_cli`

Open Erigara opened this issue 2 years ago • 1 comments

Btw, it seems that context is used only within submit and listen functions. So, maybe you can define a "miniclient" struct that has submit and listen functions, 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<()>;
}

RunArgs might work with MiniClient trait. The struct that implements MiniClient might contain both configuration and debugging logic, which RunArgs does not care about.

Originally posted by @0x009922 in https://github.com/hyperledger/iroha/pull/3608#discussion_r1230562370

Erigara avatar Jun 15 '23 08:06 Erigara

@0x009922 is this still relevant?

mversic avatar Jan 24 '24 16:01 mversic