Skip to content

Commit

Permalink
Merge pull request #961 from MonsieurNicolas/filterQSetFix
Browse files Browse the repository at this point in the history
filtering fix: use companion quorum set from statements

Reviewed-by: graydon
  • Loading branch information
latobarita committed Dec 22, 2015
2 parents 953fdb2 + 3f81369 commit 8377d76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/scp/Slot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,15 @@ Slot::isNodeInQuorum(NodeID const& node)
n.emplace_back(&e.first);
}
return mSCP.getLocalNode()->isNodeInQuorum(
node, std::bind(&Slot::getQuorumSetFromStatement, this, _1), m);
node,
[this](SCPStatement const& st)
{
// uses the companion set here as we want to consider
// nodes that were used up to EXTERNALIZE
Hash h = getCompanionQuorumSetHashFromStatement(st);
return getSCPDriver().getQSet(h);
},
m);
}

SCPEnvelope
Expand Down
2 changes: 1 addition & 1 deletion src/scp/Slot.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class Slot : public std::enable_shared_from_this<Slot>
static std::vector<Value> getStatementValues(SCPStatement const& st);

// returns the QuorumSet that should be used for a node given the
// statement
// statement (singleton for externalize)
SCPQuorumSetPtr getQuorumSetFromStatement(SCPStatement const& st);

// wraps a statement in an envelope (sign it, etc)
Expand Down

0 comments on commit 8377d76

Please sign in to comment.