-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.
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 }
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 }