Skip to content

Commit

Permalink
Missing json Field Tags in Marshalled Struct (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Mar 8, 2024
1 parent 75c8d40 commit 910d415
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions core/types/consensus_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ type Signature []byte

// Block Info struct in XDPoS 2.0, used for vote message, etc.
type BlockInfo struct {
Hash common.Hash
Round Round
Number *big.Int
Hash common.Hash `json:"hash"`
Round Round `json:"round"`
Number *big.Int `json:"number"`
}

// Vote message in XDPoS 2.0
type Vote struct {
signer common.Address
ProposedBlockInfo *BlockInfo
Signature Signature
GapNumber uint64
signer common.Address //field not exported
ProposedBlockInfo *BlockInfo `json:"proposedBlockInfo"`
Signature Signature `json:"signature"`
GapNumber uint64 `json:"gapNumber"`
}

func (v *Vote) Hash() common.Hash {
Expand Down Expand Up @@ -81,9 +81,9 @@ func (s *SyncInfo) Hash() common.Hash {

// Quorum Certificate struct in XDPoS 2.0
type QuorumCert struct {
ProposedBlockInfo *BlockInfo
Signatures []Signature
GapNumber uint64
ProposedBlockInfo *BlockInfo `json:"proposedBlockInfo"`
Signatures []Signature `json:"signatures"`
GapNumber uint64 `json:"gapNumber"`
}

// Timeout Certificate struct in XDPoS 2.0
Expand Down

0 comments on commit 910d415

Please sign in to comment.