Skip to content

Commit

Permalink
Attempt to add P2P BTC block from geth P2P if TBC query for determini…
Browse files Browse the repository at this point in the history
…ng full block fails with error
  • Loading branch information
max-sanchez committed Jan 15, 2025
1 parent 7343ab8 commit b8261b4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions eth/protocols/eth/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,8 @@ func handleBTCBlocks(backend Backend, msg Decoder, peer *Peer) error {
exists, err := vm.TBCFullNode.FullBlockAvailable(context.Background(), &hash)
if err != nil {
log.Error("Unable to check whether TBC has BTC block received over P2P", "badIndex", i, "block", hash.String(), "err", err)
continue
}

if exists {
// Still attempt to add block if unable to determine
} else if exists {
log.Info("Received BTC block over P2P which TBC already has, ignoring", "block", hash.String())
continue
}
Expand Down

0 comments on commit b8261b4

Please sign in to comment.