test: verify offline matchmaking pipeline

This commit is contained in:
Josh Creek
2026-08-31 21:04:22 +01:00
parent c0d1c33f54
commit 723f8aea5d
4 changed files with 96 additions and 2 deletions
+9 -1
View File
@@ -147,7 +147,15 @@ func (p *Proposal) allAccepted() bool {
func (p *Proposal) copy() Proposal {
clone := *p
clone.Participants = append([]ProposalParticipant(nil), p.Participants...)
clone.idempotent = nil
if p.idempotent != nil {
clone.idempotent = make(map[string]proposalMutation, len(p.idempotent))
for key, mutation := range p.idempotent {
prior := mutation.proposal
prior.Participants = append([]ProposalParticipant(nil), prior.Participants...)
prior.idempotent = nil
clone.idempotent[key] = proposalMutation{digest: mutation.digest, proposal: prior}
}
}
return clone
}