File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ XDR_FEATURE_FLAGS =
100100if CAP_0071
101101XDR_FEATURE_FLAGS += -DCAP_0071
102102endif
103+ if ENABLE_CAP_0083
104+ XDR_FEATURE_FLAGS += -DCAP_0083
105+ endif
103106
104107SUFFIXES = .x .h .rs
105108.x.h :
Original file line number Diff line number Diff line change @@ -260,13 +260,9 @@ HerderSCPDriver::isEnvelopeReady(SCPEnvelope const& env) const
260260bool
261261HerderSCPDriver::protocolAllowsEmptyTxSetValues () const
262262{
263- #ifdef CAP_0083
264263 auto const & lcl = mLedgerManager .getLastClosedLedgerHeader ();
265264 return protocolVersionStartsFrom (lcl.header .ledgerVersion ,
266265 EMPTY_TX_SET_PROTOCOL_VERSION );
267- #else
268- return false ;
269- #endif
270266}
271267
272268bool
Original file line number Diff line number Diff line change @@ -70,14 +70,9 @@ class ItemFetcher : private NonMovableOrCopyable
7070 std::vector<SCPEnvelope> fetchingFor (Hash const & itemHash) const ;
7171
7272 /* *
73- * Return how long the fetcher has been waiting for the item identified by
73+ * Returns the time since the fetch was started for the item identified by
7474 * @p hash. Returns nullopt if the item is not being fetched.
7575 */
76- // TODO: Maybe update the name of this function and doc comment. I don't
77- // like "waiting time" or "nulopt if the item is not being fetched".
78- // Technically this returns the time since the fetch was started, but if the
79- // fetch has completed it STILL returns the time since the fetch started,
80- // and so it's not necessarily all "waiting time".
8176 std::optional<std::chrono::milliseconds>
8277 getWaitingTime (Hash const & itemHash) const ;
8378
Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ constexpr ProtocolVersion FIRST_PROTOCOL_CAP71 = ProtocolVersion::V_27;
6868constexpr ProtocolVersion FIRST_PROTOCOL_CAP71 = ProtocolVersion::V_UINT32_MAX ;
6969#endif
7070
71- // TODO(rebase): Gate this behind CAP_0083 and remove ifdef in HerderSCP::protocolSupportsEmptyLedgers (or whatever it's called)?
71+ # ifdef CAP_0083
7272constexpr ProtocolVersion EMPTY_TX_SET_PROTOCOL_VERSION = ProtocolVersion::V_27 ;
73+ #else
74+ constexpr ProtocolVersion EMPTY_TX_SET_PROTOCOL_VERSION =
75+ ProtocolVersion::V_UINT32_MAX ;
76+ #endif
7377}
You can’t perform that action at this time.
0 commit comments