network: deduplicate a part of RelayTxn()

We already have relayInventory() for this.
This commit is contained in:
Roman Khimov 2019-11-29 16:25:37 +03:00
parent 2c0ed62680
commit b4d9935bda

View file

@ -639,10 +639,7 @@ func (s *Server) RelayTxn(t *transaction.Transaction) RelayReason {
return RelayOutOfMemory
}
for p := range s.Peers() {
payload := payload.NewInventory(payload.TXType, []util.Uint256{t.Hash()})
s.RelayDirectly(p, payload)
}
s.relayInventory(payload.TXType, t.Hash())
return RelaySucceed
}