[bitcoin/bitcoin] [net] Tighten scope in net_processing (#13417)

jnewbery commented on this pull request.

> — template
— bool operator()(const I& a, const I& b) const
— {
— return &(*a) < &(*b); - } -}; +//============================================================================ +/* The below declarations are not translation unit static for unit test use */ + +bool AddOrphanTx(const CTransactionRef& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_orphans); +void EraseOrphansFor(NodeId peer); +unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); +/** Increase a node's misbehavior score. */ +void Misbehaving(NodeId nodeid, int howmuch, const std::string& message=""); +// This function is used for testing the stale tip eviction logic +void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds); I agree that it seems a bit strange to forward-declare these functions here.

Добавить комментарий