truechain / truechain-engineering-code

Go implementation of TrueChain
GNU Lesser General Public License v3.0
99 stars 81 forks source link

election.genesisCommittee: slice bounds out of range #40

Closed hyangl closed 5 years ago

hyangl commented 5 years ago
INFO [12-15|16:43:08.807] TableInit is start,:blockNum is:         ------=1
INFO [12-15|16:43:08.811] Initialising Truechain protocol          versions="[63 62]" network=1
INFO [12-15|16:43:08.812] Loaded most recent local header          number=0 hash=5b445e…3fa0e2 td=256
INFO [12-15|16:43:08.812] Loaded most recent local full block      number=0 hash=5b445e…3fa0e2 td=256
INFO [12-15|16:43:08.812] Loaded most recent local fast block      number=0 hash=5b445e…3fa0e2 td=256
INFO [12-15|16:43:08.813] Loaded most recent local Fastheader      number=6 hash=0b0a07…dce5e7
INFO [12-15|16:43:08.813] Loaded most recent local full Fastblock  number=6 hash=0b0a07…dce5e7
INFO [12-15|16:43:08.813] Loaded most recent local fast Fastblock  number=6 hash=0b0a07…dce5e7
INFO [12-15|16:43:08.813] Loaded local transaction journal         transactions=0 dropped=0
INFO [12-15|16:43:08.814] Regenerated local transaction journal    transactions=0 accounts=0
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/truechain/truechain-engineering-code/consensus/election.NewElction(0xc044401000, 0x11c0ba0, 0xc0443fe000, 0x11b0380, 0xc042207680, 0x11c3360)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/consensus/election/election.go:176 +0x3c2
github.com/truechain/truechain-engineering-code/etrue.New(0xc0421c1380, 0xc042207680, 0xff1560, 0xc0442f1418, 0x412a5f)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/etrue/backend.go:213 +0xa30
github.com/truechain/truechain-engineering-code/cmd/utils.RegisterEthService.func2(0xc0421c1380, 0xc044447e30, 0xc0442f1708, 0xc0421c1340, 0x2)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/cmd/utils/flags.go:1213 +0x44
github.com/truechain/truechain-engineering-code/node.(*Node).Start(0xc0443dd680, 0x0, 0x0)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/node/node.go:182 +0x433
github.com/truechain/truechain-engineering-code/cmd/utils.StartNode(0xc0443dd680)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/cmd/utils/cmd.go:67 +0x36
main.startNode(0xc0421c66e0, 0xc0443dd680)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/cmd/getrue/main.go:253 +0x88
main.localConsole(0xc0421c66e0, 0x0, 0x0)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/cmd/getrue/consolecmd.go:67 +0x73
github.com/truechain/truechain-engineering-code/cmd/utils.MigrateFlags.func1(0xc0421c66e0, 0x0, 0xc0421c66e0)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/cmd/utils/flags.go:1398 +0x10a
github.com/truechain/truechain-engineering-code/vendor/gopkg.in/urfave/cli%2ev1.HandleAction(0xe9ff20, 0xc0420522a0, 0xc0421c66e0, 0xc0420d9500, 0x0)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/vendor/gopkg.in/urfave/cli.v1/app.go:490 +0xcf
github.com/truechain/truechain-engineering-code/vendor/gopkg.in/urfave/cli%2ev1.Command.Run(0x1048631, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10748b4, 0x2b, 0x0, ...)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/vendor/gopkg.in/urfave/cli.v1/command.go:210 +0xa3d
github.com/truechain/truechain-engineering-code/vendor/gopkg.in/urfave/cli%2ev1.(*App).Run(0xc0420b5a00, 0xc0420a8000, 0xa, 0x10, 0x0, 0x0)
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/vendor/gopkg.in/urfave/cli.v1/app.go:255 +0x6a7
main.main()
    F:/Projects/TrueChain/dev/src/github.com/truechain/truechain-engineering-code/cmd/getrue/main.go:230 +0x5c
synote commented 5 years ago

Election may get empty genesis committee members which result in out of bound for default members.