Skip to content

Commit fdcc1b7

Browse files
knstPastaPastaPasta
authored andcommitted
refactor: moved net Object's helpers from net_processing to net.h
These functions: - EraseObjectRequest - RequestObject - GetRequestedObjectCount
1 parent 08d1b35 commit fdcc1b7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/net.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,4 +1586,9 @@ inline std::chrono::microseconds PoissonNextSend(std::chrono::microseconds now,
15861586
return std::chrono::microseconds{PoissonNextSend(now.count(), average_interval.count())};
15871587
}
15881588

1589+
extern RecursiveMutex cs_main;
1590+
void EraseObjectRequest(NodeId nodeId, const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
1591+
void RequestObject(NodeId nodeId, const CInv& inv, std::chrono::microseconds current_time, bool fForce=false) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
1592+
size_t GetRequestedObjectCount(NodeId nodeId) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
1593+
15891594
#endif // BITCOIN_NET_H

src/net_processing.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,4 @@ class PeerManager : public CValidationInterface, public NetEventsInterface
7777
virtual bool IsBanned(NodeId pnode) = 0;
7878
};
7979

80-
void EraseObjectRequest(NodeId nodeId, const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
81-
void RequestObject(NodeId nodeId, const CInv& inv, std::chrono::microseconds current_time, bool fForce=false) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
82-
size_t GetRequestedObjectCount(NodeId nodeId) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
83-
84-
8580
#endif // BITCOIN_NET_PROCESSING_H

0 commit comments

Comments
 (0)