Page MenuHomePhabricator

log: Properly log txs rejected from mempool
ClosedPublic

Authored by PiRK on Aug 31 2021, 13:48.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC6866e3936867: log: Properly log txs rejected from mempool
Summary

Currently CheckTxInputs rejections from the mempool are the only rejections that log directly and unconditionally to debug.log instead of leaving it to the caller. This has multiple issues:

  • A rejected RPC transaction will log a redundant failure reason to debug log. All other failures are merely reported to the RPC user.
  • A rejected p2p transaction will log the failure twice. Once with the MEMPOOLREJ flag, and once unconditionally.
  • A rejected orphan transaction will log no failure.

Fix all issues by simply returning the state to the caller, like it is done for all other rejections.

This is a backport of core#18990

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable