Skip to content

Conversation

@Stukalov-A-M
Copy link

No description provided.

Signed-off-by: Stukalov-A-M <stukalov07@gmail.com>
Copy link
Contributor

@0x009922 0x009922 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start. Please don't perceive my comments as very critical. I understand that you are new to Rust and the code is totally fine.

Comment on lines 27 to 30
fn initiate_block_listener(
iroha_client: &Client,
initial_block_number: u64,
) -> Result<(), Box<dyn Error>> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example readability, I'd move it into main directly.

let iroha_client: Client = Client::new(&config).unwrap();

/// Processing the initial block number to a non zero value
let block_number = NonZeroU64::new(1).expect("The block number most be > 0");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the message in expect(..), in this case, would better say something like "it will never fail, because 1 > 0".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants