Skip to content

Commit

Permalink
fix: remove duplicate merge logs block
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkanani committed Nov 20, 2020
1 parent b395595 commit 7a3036c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2164,20 +2164,6 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Block) error {
}
return ret
}
// mergeLogs returns a merged log slice with specified sort order.
mergeLogs = func(logs [][]*types.Log, reverse bool) []*types.Log {
var ret []*types.Log
if reverse {
for i := len(logs) - 1; i >= 0; i-- {
ret = append(ret, logs[i]...)
}
} else {
for i := 0; i < len(logs); i++ {
ret = append(ret, logs[i]...)
}
}
return ret
}
)
// Reduce the longer chain to the same number as the shorter one
if oldBlock.NumberU64() > newBlock.NumberU64() {
Expand Down

0 comments on commit 7a3036c

Please sign in to comment.