Skip to content

Commit

Permalink
Merge branch 'master' into jupyterCalc
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsieurNicolas authored Sep 9, 2024
2 parents 574a6ae + d95bf47 commit 85d7bd3
Show file tree
Hide file tree
Showing 8 changed files with 624 additions and 680 deletions.
6 changes: 3 additions & 3 deletions lib/binaryfusefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ template <typename T> class binary_fuse_t
uint64_t h = binary_fuse_mulhi(hash, SegmentCountLength);
h += index * SegmentLength;
// keep the lower 36 bits
uint64_t hh = hash & ((1UL << 36) - 1);
uint64_t hh = hash & ((1ULL << 36) - 1);
// index 0: right shift by 36; index 1: right shift by 18; index 2: no
// shift
h ^= (size_t)((hh >> (36 - 18 * index)) & SegmentLengthMask);
Expand Down Expand Up @@ -289,9 +289,9 @@ template <typename T> class binary_fuse_t
{
blockBits += 1;
}
uint32_t block = ((uint32_t)1 << blockBits);
uint32_t block = (1ul << blockBits);

std::vector<uint32_t> startPos(1 << blockBits);
std::vector<uint32_t> startPos(block);
uint32_t h012[5];

reverseOrder[size] = 1;
Expand Down
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
4 changes: 2 additions & 2 deletions src/bucket/BucketSnapshotManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ BucketSnapshotManager::maybeUpdateSnapshot(
{
// Copy current snapshot map into historicalSnapshots
historicalSnapshots.clear();
for (auto const& [ledgerSeq, snapshot] : mHistoricalSnapshots)
for (auto const& [ledgerSeq, snap] : mHistoricalSnapshots)
{
historicalSnapshots.emplace(
ledgerSeq, std::make_unique<BucketListSnapshot>(*snapshot));
ledgerSeq, std::make_unique<BucketListSnapshot>(*snap));
}
}
}
Expand Down
Loading

0 comments on commit 85d7bd3

Please sign in to comment.