diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 6930478421b..b870df66c1e 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -5557,7 +5557,7 @@ bool PeerManagerImpl::RejectIncomingTxs(const CNode& peer) const void PeerManagerImpl::ProcessPong(CNode& pfrom, Peer& peer, const NodeClock::time_point ping_end, DataStream& vRecv) { uint64_t nonce = 0; - size_t nAvail = vRecv.in_avail(); + const size_t nAvail{vRecv.size()}; bool bPingFinished = false; std::string sProblem; diff --git a/src/streams.h b/src/streams.h index 6ef9d164494..96cea55eb49 100644 --- a/src/streams.h +++ b/src/streams.h @@ -188,7 +188,6 @@ public: return std::string{UCharCast(data()), UCharCast(data() + size())}; } - // // Vector subset // @@ -209,8 +208,6 @@ public: // // Stream subset // - int in_avail() const { return size(); } - void read(std::span dst) { if (dst.size() == 0) return;