I forked litecoin code just for fun/studing. I'm trying to create a new chain generating a different genesis block but my daemon crashes.
modified chainparams.cpp
https://pastebin.com/JPwy7ShD
debug output:
2017-03-29 10:49:24 LoadBlockIndexDB: last block file = 0
2017-03-29 10:49:24 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2017-03-29 10:49:24 Checking all blk files are present...
2017-03-29 10:49:24 LoadBlockIndexDB: transaction index disabled
2017-03-29 10:49:24 Initializing databases...
2017-03-29 10:49:24 Pre-allocating up to position 0x1000000 in blk00000.dat
2017-03-29 10:49:24 init message: Verifying blocks...
2017-03-29 10:49:24 block index 303ms
2017-03-29 10:49:24 init message: Loading wallet...
2017-03-29 10:49:24 nFileVersion = 130200
2017-03-29 10:49:24 Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total
2017-03-29 10:49:24 Performing wallet upgrade to 60000
2017-03-29 10:49:24 keypool added key 1, size=1
2017-03-29 10:49:24 keypool added key 2, size=2
2017-03-29 10:49:24 keypool added key 3, size=3
2017-03-29 10:49:24 keypool added key 4, size=4
2017-03-29 10:49:24 keypool added key 5, size=5
2017-03-29 10:49:24 keypool added key 6, size=6
2017-03-29 10:49:24 keypool added key 7, size=7
2017-03-29 10:49:24 keypool added key 8, size=8
2017-03-29 10:49:24 keypool added key 9, size=9
2017-03-29 10:49:24 keypool added key 10, size=10
2017-03-29 10:49:25 keypool added key 11, size=11
2017-03-29 10:49:25 keypool added key 12, size=12
2017-03-29 10:49:25 keypool added key 13, size=13
2017-03-29 10:49:25 keypool added key 14, size=14
2017-03-29 10:49:25 keypool added key 15, size=15
2017-03-29 10:49:25 keypool added key 16, size=16
2017-03-29 10:49:25 keypool added key 17, size=17
2017-03-29 10:49:25 keypool added key 18, size=18
2017-03-29 10:49:25 keypool added key 19, size=19
2017-03-29 10:49:25 keypool added key 20, size=20
2017-03-29 10:49:25 keypool added key 21, size=21
2017-03-29 10:49:25 keypool added key 22, size=22
2017-03-29 10:49:25 keypool added key 23, size=23
2017-03-29 10:49:25 keypool added key 24, size=24
2017-03-29 10:49:25 keypool added key 25, size=25
2017-03-29 10:49:25 keypool added key 26, size=26
2017-03-29 10:49:25 keypool added key 27, size=27
2017-03-29 10:49:25 keypool added key 28, size=28
2017-03-29 10:49:25 keypool added key 29, size=29
2017-03-29 10:49:25 keypool added key 30, size=30
2017-03-29 10:49:25 keypool added key 31, size=31
2017-03-29 10:49:26 keypool added key 32, size=32
2017-03-29 10:49:26 keypool added key 33, size=33
2017-03-29 10:49:26 keypool added key 34, size=34
2017-03-29 10:49:26 keypool added key 35, size=35
2017-03-29 10:49:26 keypool added key 36, size=36
2017-03-29 10:49:26 keypool added key 37, size=37
2017-03-29 10:49:26 keypool added key 38, size=38
2017-03-29 10:49:26 keypool added key 39, size=39
2017-03-29 10:49:26 keypool added key 40, size=40
2017-03-29 10:49:26 keypool added key 41, size=41
2017-03-29 10:49:26 keypool added key 42, size=42
2017-03-29 10:49:26 keypool added key 43, size=43
2017-03-29 10:49:26 keypool added key 44, size=44
2017-03-29 10:49:26 keypool added key 45, size=45
2017-03-29 10:49:26 keypool added key 46, size=46
2017-03-29 10:49:26 keypool added key 47, size=47
2017-03-29 10:49:26 keypool added key 48, size=48
2017-03-29 10:49:26 keypool added key 49, size=49
2017-03-29 10:49:26 keypool added key 50, size=50
2017-03-29 10:49:26 keypool added key 51, size=51
2017-03-29 10:49:26 keypool added key 52, size=52
2017-03-29 10:49:26 keypool added key 53, size=53
2017-03-29 10:49:26 keypool added key 54, size=54
2017-03-29 10:49:26 keypool added key 55, size=55
2017-03-29 10:49:26 keypool added key 56, size=56
2017-03-29 10:49:26 keypool added key 57, size=57
2017-03-29 10:49:26 keypool added key 58, size=58
2017-03-29 10:49:26 keypool added key 59, size=59
2017-03-29 10:49:26 keypool added key 60, size=60
2017-03-29 10:49:26 keypool added key 61, size=61
2017-03-29 10:49:26 keypool added key 62, size=62
2017-03-29 10:49:27 keypool added key 63, size=63
2017-03-29 10:49:27 keypool added key 64, size=64
2017-03-29 10:49:27 keypool added key 65, size=65
2017-03-29 10:49:27 keypool added key 66, size=66
2017-03-29 10:49:27 keypool added key 67, size=67
2017-03-29 10:49:27 keypool added key 68, size=68
2017-03-29 10:49:27 keypool added key 69, size=69
2017-03-29 10:49:27 keypool added key 70, size=70
2017-03-29 10:49:27 keypool added key 71, size=71
2017-03-29 10:49:27 keypool added key 72, size=72
2017-03-29 10:49:27 keypool added key 73, size=73
2017-03-29 10:49:27 keypool added key 74, size=74
2017-03-29 10:49:27 keypool added key 75, size=75
2017-03-29 10:49:27 keypool added key 76, size=76
2017-03-29 10:49:27 keypool added key 77, size=77
2017-03-29 10:49:27 keypool added key 78, size=78
2017-03-29 10:49:27 keypool added key 79, size=79
2017-03-29 10:49:27 keypool added key 80, size=80
2017-03-29 10:49:27 keypool added key 81, size=81
2017-03-29 10:49:27 keypool added key 82, size=82
2017-03-29 10:49:27 keypool added key 83, size=83
2017-03-29 10:49:27 keypool added key 84, size=84
2017-03-29 10:49:27 keypool added key 85, size=85
2017-03-29 10:49:27 keypool added key 86, size=86
2017-03-29 10:49:27 keypool added key 87, size=87
2017-03-29 10:49:27 keypool added key 88, size=88
2017-03-29 10:49:27 keypool added key 89, size=89
2017-03-29 10:49:27 keypool added key 90, size=90
2017-03-29 10:49:27 keypool added key 91, size=91
2017-03-29 10:49:28 keypool added key 92, size=92
2017-03-29 10:49:28 keypool added key 93, size=93
2017-03-29 10:49:28 keypool added key 94, size=94
2017-03-29 10:49:28 keypool added key 95, size=95
2017-03-29 10:49:28 keypool added key 96, size=96
2017-03-29 10:49:28 keypool added key 97, size=97
2017-03-29 10:49:28 keypool added key 98, size=98
2017-03-29 10:49:28 keypool added key 99, size=99
2017-03-29 10:49:28 keypool added key 100, size=100
2017-03-29 10:49:28 keypool added key 101, size=101
2017-03-29 10:49:28 keypool reserve 1
2017-03-29 10:49:28 keypool keep 1
2017-03-29 10:49:28 wallet 4156ms
2017-03-29 10:49:28 ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)
2017-03-29 10:49:28 *** Failed to read block
I don't understand why I get this error..
The other point is: what's this part for?
const CScript genesisOutputScript = CScript() << ParseHex("040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9") << OP_CHECKSIG;
What pubkey should I enter? Who generates it?
thanks in advance