From a730529b0c768eb7f39b53c809ea6eff24b32c43 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 29 Nov 2019 11:09:54 +0300 Subject: [PATCH] network: process incoming p2p transactions It's the same relaying as for RPC, but we don't need to return any result for it. --- pkg/network/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/network/server.go b/pkg/network/server.go index 2cf5d00f3..3220b8934 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -462,6 +462,9 @@ func (s *Server) handleConsensusCmd(cp *consensus.Payload) error { // It never returns an error. func (s *Server) handleTxCmd(tx *transaction.Transaction) error { 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 }