Skip to content

Commit

Permalink
core/blockchain.go: reorgTwistToCommonAncestor removed reorg on first…
Browse files Browse the repository at this point in the history
… nil check and added print statements
  • Loading branch information
kiltsonfire committed Jul 7, 2022
1 parent 97a9edb commit db3f059
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3188,13 +3188,14 @@ func (bc *BlockChain) reorgTwistToCommonAncestor(subHead *types.Header, slice []

if num != nil {
// Remove non-cononical blocks from subordinate chains.
bc.chainUncleFeed.Send(subHead)
fmt.Println("the first sub shared block is in dom chain")
return nil
}

prev := subHead
for {
prevHeader, err := bc.Engine().PreviousCoincidentOnPath(bc, prev, slice, order, path)
fmt.Println("finding previous conincident on path looking for common block, current hash:", prevHeader.Hash())
if err != nil {
return err
}
Expand Down

0 comments on commit db3f059

Please sign in to comment.