Skip to content

Commit

Permalink
DRY up recording a change
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Dec 15, 2015
1 parent b95b02f commit 922a0f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/gossip/dissemination.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ Dissemination.prototype.onRingChanged = function onRingChanged() {
};

Dissemination.prototype.recordChange = function recordChange(change) {
// TODO This should not mutate the input. But it does and will
// until we can refactor.
change.piggybackCount = 0;
this.changes[change.address] = change;
this.changes[change.address].piggybackCount = 0;
};

Dissemination.prototype.resetMaxPiggybackCount = function resetMaxPiggybackCount() {
Expand Down

0 comments on commit 922a0f7

Please sign in to comment.