Open weijia-yu opened 6 years ago
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 SetGenesis
. If the crypto currency in question has the same format as bitcoin it should work.
@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.