-
Notifications
You must be signed in to change notification settings - Fork 24
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
Invalid Hex String when SetGenesis #4
Comments
What is your code and which line the error? |
@NicolasDorier line 186, when .SetGenesis(new Block(Encoders.Hex.DecodeData("data"))), We generate the data with the header. which headers should we use to generate the byte data? Should we include HashGenesisBlock ? |
I don't understand, just serialize your block in byte array and call |
@NicolasDorier does the error relate to other parameters I set? For example, if i set the wrong magic number, will it produce invalid hex string? |
please copy paste your code here. |
I am having this error when decoding genesis block data:
rror when CreateAndStorePrivateKey System.FormatException: Invalid Hex String
at NBitcoin.DataEncoders.HexEncoder.DecodeData (System.String encoded) [0x00019] in <10b18eedccec443eb5e12121cb174cf4>:0
We are using bitcoin-like blockchain and trying to modify the Network.cs,
also, weirdly the SetGenesis() does not reply on magic number? Even I set Genesis using litecoin test net data, and use our blockchain's magic number, it still successfully registeres.
The text was updated successfully, but these errors were encountered: