Skip to content

Commit

Permalink
feat: update ReferKeInfo struct
Browse files Browse the repository at this point in the history
  • Loading branch information
RainFallsSilent committed Aug 30, 2024
1 parent 811d036 commit 7e15987
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions servers/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,21 +694,21 @@ func GetReferKeyInfo(params Params) map[string]interface{} {
}

type VotesWithLockTime struct {
Candidate string
Votes int64
LockTime uint32
Candidate string `json:"candiate"`
Votes int64 `json:"votes"`
LockTime uint32 `json:"lockTime"`
}

type referKeyInfo struct {
Hash string
TransactionHash string
BlockHeight uint32
PayloadVersion byte
VoteType byte
Info []VotesWithLockTime
type ReferKeyInfo struct {
Hash string `json:"hash"`
TransactionHash string `json:"transactionHash"`
BlockHeight uint32 `json:"blockHeight"`
PayloadVersion byte `json:"payloadVersion"`
VoteType byte `json:"voteType"`
Info []VotesWithLockTime `json:"info"`
}

fillReferKeyINFO := func(detailVoteInfo payload.DetailedVoteInfo) (info referKeyInfo) {
fillReferKeyINFO := func(detailVoteInfo payload.DetailedVoteInfo) (info ReferKeyInfo) {
info.TransactionHash = detailVoteInfo.TransactionHash.ReversedString()
info.BlockHeight = detailVoteInfo.BlockHeight
info.PayloadVersion = detailVoteInfo.PayloadVersion
Expand Down

0 comments on commit 7e15987

Please sign in to comment.