Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD: block_stream #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Stukalov-A-M
Copy link

No description provided.

Signed-off-by: Stukalov-A-M <[email protected]>
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.

Rust/examples/block_stream.rs Outdated Show resolved Hide resolved
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.

Rust/examples/block_stream.rs Outdated Show resolved Hide resolved
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