Fix a bug reloading the blockchain

A bug in the restoration of stake nodes from the disk would prevent the
blockchain from reloading if there was an immediate reorganization
required on start up.  This correctly disconnects the block.
This commit is contained in:
cjepson 2016-10-05 17:18:21 -04:00
parent 6ab614f158
commit 5a23b05852

View File

@ -167,8 +167,8 @@ func (b *BlockChain) fetchStakeNode(node *blockNode) (*stake.Node, error) {
var errLocal error
if current.parent.stakeNode == nil {
current.parent.stakeNode, errLocal =
current.stakeNode.DisconnectNode(current.header,
current.stakeUndoData, current.newTickets, dbTx)
current.stakeNode.DisconnectNode(current.parent.header,
current.parent.stakeUndoData, current.parent.newTickets, dbTx)
}
if errLocal != nil {
return errLocal