network: process incoming p2p transactions

It's the same relaying as for RPC, but we don't need to return any result for
it.
This commit is contained in:
Roman Khimov 2019-11-29 11:09:54 +03:00
parent 9f9cf4ae3f
commit a730529b0c

View file

@ -462,6 +462,9 @@ func (s *Server) handleConsensusCmd(cp *consensus.Payload) error {
// It never returns an error. // It never returns an error.
func (s *Server) handleTxCmd(tx *transaction.Transaction) error { func (s *Server) handleTxCmd(tx *transaction.Transaction) error {
s.consensus.OnTransaction(tx) s.consensus.OnTransaction(tx)
// It's OK for it to fail for various reasons like tx already existing
// in the pool.
_ = s.RelayTxn(tx)
return nil return nil
} }