X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=consensus%2Fconsensus%2Fdpos%2Fvote_type.go;fp=consensus%2Fconsensus%2Fvote_type.go;h=1dec1fbde4477b317d3ffc8603c7b3987295a34e;hp=d25a0aaa00b77ff603b68dc92408e1fce6c35ee8;hb=e57f41f037f3f37fd7253e34f8a04e60a125e634;hpb=620deabb3a00c7995b190b5ed47a224826165ecf diff --git a/consensus/consensus/vote_type.go b/consensus/consensus/dpos/vote_type.go similarity index 71% rename from consensus/consensus/vote_type.go rename to consensus/consensus/dpos/vote_type.go index d25a0aaa..1dec1fbd 100644 --- a/consensus/consensus/vote_type.go +++ b/consensus/consensus/dpos/vote_type.go @@ -1,8 +1,9 @@ -package consensus +package dpos import ( "github.com/vapor/crypto/ed25519/chainkd" chainjson "github.com/vapor/encoding/json" + "github.com/vapor/protocol/vm" ) // serflag variables for input types. @@ -17,11 +18,16 @@ type TypedData interface { DataType() uint8 } +type DposMsg struct { + Type vm.Op + Data []byte +} + // DELEGATE_IDS PUBKEY SIG(block.time) type DelegateInfoList struct { - Delegate DelegateInfo - Xpub chainkd.XPub - SigTime []chainjson.HexBytes `json:"sig_time"` + Delegate DelegateInfo `json:"delegate"` + Xpub chainkd.XPub `json:"xpub"` + SigTime chainjson.HexBytes `json:"sig_time"` } func (d *DelegateInfoList) DataType() uint8 { return DelegateInfoType } @@ -33,13 +39,13 @@ type RegisterForgerData struct { func (d *RegisterForgerData) DataType() uint8 { return RegisterType } type VoteForgerData struct { - Forgers []string `json:"Forgers"` + Forgers []string `json:"forgers"` } func (d *VoteForgerData) DataType() uint8 { return VoteType } type CancelVoteForgerData struct { - Forgers []string `json:"Forgers"` + Forgers []string `json:"forgers"` } func (d *CancelVoteForgerData) DataType() uint8 { return CancelVoteType }