Skip to content

Commit

Permalink
Merge pull request bitcoinsv#3 from deepthawtz/master
Browse files Browse the repository at this point in the history
ignore ABC and BUCash peers
  • Loading branch information
shilch authored Jun 9, 2019
2 parents c276bf4 + 90c26fa commit 4c29707
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,13 @@ func (sp *serverPeer) OnVersion(_ *peer.Peer, msg *wire.MsgVersion) *wire.MsgRej
return nil
}

// Ignore peers that aren't running Bitcoin
if strings.Contains(msg.UserAgent, "ABC") || strings.Contains(msg.UserAgent, "BUCash") {
srvrLog.Debugf("Rejecting peer %s for not running Bitcoin", sp.Peer)
reason := fmt.Sprint("Sorry, you are not running Bitcoin")
return wire.NewMsgReject(msg.Command(), wire.RejectNonstandard, reason)
}

// Reject outbound peers that are not full nodes.
wantServices := wire.SFNodeNetwork
if !isInbound && !hasServices(msg.Services, wantServices) {
Expand Down

0 comments on commit 4c29707

Please sign in to comment.