Fix proposal relaying (RIPD-1057):

Stash the signature so we can relay a proposal later
This commit is contained in:
JoelKatz
2015-12-07 12:06:19 -08:00
committed by Nik Bougalis
parent bb944466f2
commit 4f40e94c99
4 changed files with 52 additions and 13 deletions

View File

@@ -1289,6 +1289,7 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMProposeSet> const& m)
NetClock::time_point{NetClock::duration{set.closetime()}},
signerPublic, PublicKey(makeSlice(set.nodepubkey())),
suppression);
proposal->setSignature (Blob (set.signature().begin(), set.signature().end()));
std::weak_ptr<PeerImp> weak = shared_from_this();
app_.getJobQueue ().addJob (
@@ -1902,7 +1903,7 @@ PeerImp::checkPropose (Job& job,
assert (packet);
protocol::TMProposeSet& set = *packet;
if (! cluster() && ! proposal->checkSign (set.signature ()))
if (! cluster() && ! proposal->checkSign ())
{
p_journal_.warning <<
"Proposal fails sig check";