Пример #1
0
 private VoteMessage CreateVoteMessage(Vote vote)
 {
     return(new VoteMessage
     {
         ProposalId = vote.ProposalId.ToString(),
         Option = VoteMessage.ToOption(vote.Option),
         Voter = Wallet.Address
     });
 }
Пример #2
0
 private byte[] EncodeVoteMessage(VoteMessage voteMessage)
 {
     proto.Vote vote = new proto.Vote
     {
         Voter      = ByteString.CopyFrom(Wallet.AddressBytes),
         ProposalId = long.Parse(voteMessage.ProposalId),
         Option     = VoteMessage.ToOption(voteMessage.Option)
     };
     return(EncodeUtils.AminoWrap(vote.ToByteArray(), MessageType.GetTransactionType(EMessageType.Vote), false));
 }