Skip to content

Commit 2ce3cd7

Browse files
alexlypjrick
authored andcommitted
rpc: Only set vote vsp choices for known tickets
1 parent 045ed0d commit 2ce3cd7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

internal/rpc/rpcserver/server.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4064,7 +4064,13 @@ func (s *walletServer) SetVspdVoteChoices(ctx context.Context, req *pb.SetVspdVo
40644064
if err != nil {
40654065
return nil
40664066
}
4067-
_ = vspClient.SetVoteChoice(ctx, hash, choices...)
4067+
ticketHost, err := s.wallet.VSPHostForTicket(ctx, hash)
4068+
if err != nil {
4069+
return err
4070+
}
4071+
if ticketHost == vspHost {
4072+
_ = vspClient.SetVoteChoice(ctx, hash, choices...)
4073+
}
40684074
return nil
40694075
})
40704076
if err != nil {

0 commit comments

Comments
 (0)