Skip to content

Commit

Permalink
no sampling of accusations
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Jun 18, 2024
1 parent a82a337 commit b63093d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,6 @@ private AccusationGossip.Builder processAccusations(BloomFilter<Digest> bff) {
.flatMap(m -> m.getAccusations())
.filter(m -> current.equals(m.currentView()))
.filter(a -> !bff.contains(a.getHash()))
// .limit(params.maximumTxfr())
.collect(new ReservoirSampler<>(params.maximumTxfr(), Entropy.bitsStream()))
.forEach(a -> builder.addUpdates(a.getWrapped()));
return builder;
}
Expand Down Expand Up @@ -1355,7 +1353,6 @@ private Update updatesForDigests(Gossip gossip) {
.flatMap(m -> m.getAccusations())
.filter(a -> a.currentView().equals(current))
.filter(a -> !accBff.contains(a.getHash()))
.collect(new ReservoirSampler<>(params.maximumTxfr(), Entropy.bitsStream()))
.forEach(a -> builder.addAccusations(a.getWrapped()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,8 @@ private void initiateViewChange() {
.setObserver(node.getId().toDigeste())
.setCurrent(currentView().toDigeste())
.setAttempt(attempt.getAndIncrement())
.addAllLeaves(
view.streamShunned().map(Digest::toDigeste).collect(Collectors.toSet()))
.addAllJoins(joins.keySet().stream().map(Digest::toDigeste).toList());
view.streamShunned().map(Digest::toDigeste).forEach(builder::addLeaves);
ViewChange change = builder.build();
vote.set(change);
var signature = node.sign(change.toByteString());
Expand Down

0 comments on commit b63093d

Please sign in to comment.