mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
network: deduplicate a part of RelayTxn()
We already have relayInventory() for this.
This commit is contained in:
parent
2c0ed62680
commit
b4d9935bda
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue