Skip to content

Conversation

nedelcho-delchev-tues
Copy link
Contributor

closes #85

catch
{:error, _message} ->
Logger.error(fn ->
"Failed to mine block"
Copy link
Collaborator

@thepiwo thepiwo Nov 21, 2017

Choose a reason for hiding this comment

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

can you log the message here as well?

@nedelcho-delchev-tues
Copy link
Contributor Author

Not done yet, don't merge

 - do correct check in miner, differing from next calculation
@nedelcho-delchev-tues
Copy link
Contributor Author

The issue is fixed, you can review it @meivantodorov, @cytadela8, @andonov.

Copy link
Contributor

@cytadela8 cytadela8 left a comment

Choose a reason for hiding this comment

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

Looks good!

else
[_ | something] = Chain.get_blocks(latest_block_hash, Difficulty.get_number_of_blocks() + 1)
something
end
Copy link
Contributor

Choose a reason for hiding this comment

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

I trust this logic is correct. it looks weird

Copy link
Collaborator

Choose a reason for hiding this comment

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

@nedelcho-delchev-tues maybe we can optimize this somehow to be better readable and add some comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I pushed a change directly to master, you can see if it is better and more understandable.
@cytadela8

@andonov andonov merged commit fe23bb5 into master Nov 22, 2017
@thepiwo thepiwo deleted the GH-85 branch October 5, 2018 11:48
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.

validate difficulty target

5 participants