Skip to content

Commit

Permalink
Clarify contract in the comment, harden BucketApplicator
Browse files Browse the repository at this point in the history
  • Loading branch information
marta-lokhova committed Sep 5, 2024
1 parent a1497f9 commit b5d69a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bucket/BucketApplicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class BucketApplicator
size_t mCount{0};
std::function<bool(LedgerEntryType)> mEntryTypeFilter;
std::unordered_set<LedgerKey>& mSeenKeys;
std::streamoff mUpperBoundOffset;
std::streamoff mUpperBoundOffset{0};
bool mOffersRemaining{true};

public:
Expand Down
2 changes: 2 additions & 0 deletions src/overlay/Peer.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ class Peer : public std::enable_shared_from_this<Peer>,
// with methods running on background threads might access this
// unsynchronized state. All methods that access this private state should
// assert that they are running on the main
// IOW, all methods using these private variables and functions below must
// synchronize access manually
private:
PeerState mState;
NodeID mPeerID;
Expand Down

0 comments on commit b5d69a4

Please sign in to comment.