diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 0c6b897dd..e722d420c 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -2849,7 +2849,7 @@ func (bc *Blockchain) PoolTxWithData(t *transaction.Transaction, data any, mp *m if verificationFunction != nil { err := verificationFunction(t, data) if err != nil { - return err + return fmt.Errorf("data verification failed: %w", err) } } return bc.verifyAndPoolTx(t, mp, feer, data) diff --git a/pkg/network/server.go b/pkg/network/server.go index 848b4f0c7..bc7decb0c 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -1325,7 +1325,11 @@ func (s *Server) RelayP2PNotaryRequest(r *payload.P2PNotaryRequest) error { // verifyAndPoolNotaryRequest verifies NotaryRequest payload and adds it to the payload mempool. func (s *Server) verifyAndPoolNotaryRequest(r *payload.P2PNotaryRequest) error { - return s.chain.PoolTxWithData(r.FallbackTransaction, r, s.notaryRequestPool, s.notaryFeer, s.verifyNotaryRequest) + err := s.chain.PoolTxWithData(r.FallbackTransaction, r, s.notaryRequestPool, s.notaryFeer, s.verifyNotaryRequest) + if err != nil { + return fmt.Errorf("failed to add fallback transaction to the notary pool: %w", err) + } + return nil } // verifyNotaryRequest is a function for state-dependant P2PNotaryRequest payload verification which is executed before ordinary blockchain's verification.