pchain-org / pchain

Pchain client-in-Go
https://plian.org
GNU General Public License v3.0
24 stars 12 forks source link

non-validator panic after join child chain #25

Closed liaoyd closed 5 years ago

liaoyd commented 5 years ago

`panic: interface conversion: consensus.PeerState is nil, not *consensus.PeerState

goroutine 527 [running]: github.com/pchain/vendor/github.com/ethereum/go-ethereum/consensus/tendermint/consensus.(ConsensusReactor).Receive(0xc42169e200, 0x20, 0x1334260, 0xc438588a80, 0xc421cd05c0, 0xe, 0xe) /home/ubuntu/pchain/src/github.com/pchain/vendor/github.com/ethereum/go-ethereum/consensus/tendermint/consensus/reactor.go:170 +0x1a97 github.com/pchain/vendor/github.com/ethereum/go-ethereum/consensus/tendermint.(backend).HandleMsg(0xc42047e5a0, 0x20, 0x1334260, 0xc438588a80, 0xc421cd05c0, 0xe, 0xe, 0xe65600, 0x0, 0x0) /home/ubuntu/pchain/src/github.com/pchain/vendor/github.com/ethereum/go-ethereum/consensus/tendermint/handler.go:56 +0xce github.com/pchain/vendor/github.com/ethereum/go-ethereum/eth.(ProtocolManager).handleMsg(0xc4201def00, 0xc438588a80, 0x0, 0x0) /home/ubuntu/pchain/src/github.com/pchain/vendor/github.com/ethereum/go-ethereum/eth/handler.go:359 +0x4f1f github.com/pchain/vendor/github.com/ethereum/go-ethereum/eth.(ProtocolManager).handle(0xc4201def00, 0xc438588a80, 0x0, 0x0) /home/ubuntu/pchain/src/github.com/pchain/vendor/github.com/ethereum/go-ethereum/eth/handler.go:330 +0x88d github.com/pchain/vendor/github.com/ethereum/go-ethereum/eth.NewProtocolManager.func1(0xc4215c97a0, 0x132a360, 0xc4201d08c0, 0x0, 0x0) /home/ubuntu/pchain/src/github.com/pchain/vendor/github.com/ethereum/go-ethereum/eth/handler.go:158 +0x1ed github.com/pchain/vendor/github.com/ethereum/go-ethereum/p2p.(Peer).startChildChainProtocol.func1(0xc4201d08c0, 0xc4215c97a0, 0x132a360, 0xc4201d08c0) /home/ubuntu/pchain/src/github.com/pchain/vendor/github.com/ethereum/go-ethereum/p2p/peer.go:455 +0x66 created by github.com/pchain/vendor/github.com/ethereum/go-ethereum/p2p.(Peer).startChildChainProtocol /home/ubuntu/pchain/src/github.com/pchain/vendor/github.com/ethereum/go-ethereum/p2p/peer.go:454 +0x2a5 `

fanbsb commented 5 years ago

Fixed in commit https://github.com/pchain-org/pchain/commit/7fdc676f015cc7ddce160d8d0e2d29e9a9197862