teaandcode / TestChain

TestChain C++ tutorial
MIT License
94 stars 71 forks source link

update line 129 #5

Open darludi58 opened 5 years ago

darludi58 commented 5 years ago

for (int i = 0; i < SHA256::DIGEST_SIZE; i++) change to for (int i = 0; i < (int) SHA256::DIGEST_SIZE; i++)

knasher commented 5 years ago

Thanks for your PR, I didn't write the sha256.cpp file (as explained in my blog post) but I've taken a look and DIGEST_SIZE is already defined as an int, what benefit would there be from casting it to an int again?

subhutrivedi commented 5 years ago

After successful compilation, i am only gettinh the output as:- Mining 1...

after that it doesn't display anything. What could be the reason?? Please help me out to get the desired output.

AngelBravoS commented 5 years ago

it seems that the @subhutrivedi update just makes the warning

"comparison between signed and unsigned integer expressions [-Wsign-compare]"

disappear with no further consequences.

After successful compilation, i am only gettinh the output as:- Mining 1...

after that it doesn't display anything. What could be the reason?? Please help me out to get the desired output.

@subhutrivedi, have you ever tried to change the_nDifficulty = 6; from the blockchain constructor to a lower value?

subhutrivedi commented 5 years ago

Actually my problem got solved few minutes after I posted my comment that day and I am also getting the desired output and yeah I have not tried to change the _nDifficulty = 6; from the blockchain constructor to a lower value.

On Fri 12 Jul, 2019, 2:01 PM Ángel Bravo, notifications@github.com wrote:

it seems that the @subhutrivedi https://github.com/subhutrivedi update just makes the warning

"comparison between signed and unsigned integer expressions [-Wsign-compare]"

disappear with no further consequences.

After successful compilation, i am only gettinh the output as:- Mining 1...

after that it doesn't display anything. What could be the reason?? Please help me out to get the desired output.

@subhutrivedi https://github.com/subhutrivedi, have you ever tried to change the _nDifficulty = 6; from the blockchain constructor to a lower value?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/teaandcode/TestChain/pull/5?email_source=notifications&email_token=AJ6AYLERAXZCYOJDTGWKU6LP7A6NJA5CNFSM4F7MMGOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZZDG3Y#issuecomment-510800751, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ6AYLDDQWGC76ONO2PZNXLP7A6NJANCNFSM4F7MMGOA .