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
|
return RelayOutOfMemory
|
||||||
}
|
}
|
||||||
|
|
||||||
for p := range s.Peers() {
|
s.relayInventory(payload.TXType, t.Hash())
|
||||||
payload := payload.NewInventory(payload.TXType, []util.Uint256{t.Hash()})
|
|
||||||
s.RelayDirectly(p, payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
return RelaySucceed
|
return RelaySucceed
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue