Skip to content

Commit

Permalink
Merge pull request algorand#2082 from onetechnical/onetechnical/relst…
Browse files Browse the repository at this point in the history
…able2.5.5

go-algorand 2.5.5-stable
  • Loading branch information
algojohnlee authored Apr 17, 2021
2 parents 7cd7aef + 14dd3bf commit 304815d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
28 changes: 10 additions & 18 deletions agreement/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,29 +555,21 @@ func (p *player) handleMessageEvent(r routerHandle, e messageEvent) (actions []a
case payloadPipelined:
ep := ef.(payloadProcessedEvent)
if ep.Round == p.Round {
up := e.Input.UnauthenticatedProposal
uv := ef.(payloadProcessedEvent).Vote.u()

a := relayAction(e, protocol.ProposalPayloadTag, compoundMessage{Proposal: up, Vote: uv})
actions = append(actions, a)
return append(actions, verifyPayloadAction(e, ep.Round, ep.Period, ep.Pinned))
}
}

// relay as the proposer
if e.Input.MessageHandle == nil {
var uv unauthenticatedVote
switch ef.t() {
case payloadPipelined, payloadAccepted:
uv = ef.(payloadProcessedEvent).Vote.u()
case proposalCommittable:
uv = ef.(committableEvent).Vote.u()
}
up := e.Input.UnauthenticatedProposal

a := relayAction(e, protocol.ProposalPayloadTag, compoundMessage{Proposal: up, Vote: uv})
actions = append(actions, a)
var uv unauthenticatedVote
switch ef.t() {
case payloadPipelined, payloadAccepted:
uv = ef.(payloadProcessedEvent).Vote.u()
case proposalCommittable:
uv = ef.(committableEvent).Vote.u()
}
up := e.Input.UnauthenticatedProposal

a := relayAction(e, protocol.ProposalPayloadTag, compoundMessage{Proposal: up, Vote: uv})
actions = append(actions, a)

// If the payload is valid, check it against any received cert threshold.
// Of course, this should only trigger for payloadVerified case.
Expand Down
2 changes: 1 addition & 1 deletion buildnumber.dat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4
5

0 comments on commit 304815d

Please sign in to comment.