Bitcoin Forum
July 03, 2024, 08:40:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need a help: -- warning: large integer implicitly truncated to unsigned type  (Read 123 times)
Many Coins (OP)
Member
**
Offline Offline

Activity: 266
Merit: 11

Lord Shiva


View Profile
March 02, 2018, 04:38:42 PM
 #1

Hello.

I change a genesis block in Bitcoin Core 0.8.

All is working. But when I compile it, have warning:

Code:
src/main.cpp:2755:24: warning: large integer implicitly truncated to unsigned type [-Woverflow]
         block.nNonce   = 24923453120;

Is block.nNonce too big for it?

What can I do with it?

Thank you!
Many Coins (OP)
Member
**
Offline Offline

Activity: 266
Merit: 11

Lord Shiva


View Profile
March 02, 2018, 10:50:06 PM
 #2

Assuming the warning message is right, the block.nNonce number is larger than the biggest number possible in unsigned integer which is about 4.2 billion while your number is bigger than it.

While i never experiment with Bitcoin Core, i think simply modify the block.nNonce number to less than 4.2 billion should fix the problem. But if i'm right, you need to rework the Proof-of-Work since nonce change also change the block hash. CMIIW.

Its too hard Smiley

Can I change variables type instead?   
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!