OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the implementation for dppos
[bytom/vapor.git]
/
consensus
/
consensus
/
dpos
/
vote_type.go
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
d25a0aa
..
1dec1fb
100644
(file)
--- a/
consensus/consensus/vote_type.go
+++ b/
consensus/consensus/dpos/vote_type.go
@@
-1,8
+1,9
@@
-package
consensu
s
+package
dpo
s
import (
"github.com/vapor/crypto/ed25519/chainkd"
chainjson "github.com/vapor/encoding/json"
import (
"github.com/vapor/crypto/ed25519/chainkd"
chainjson "github.com/vapor/encoding/json"
+ "github.com/vapor/protocol/vm"
)
// serflag variables for input types.
)
// serflag variables for input types.
@@
-17,11
+18,16
@@
type TypedData interface {
DataType() uint8
}
DataType() uint8
}
+type DposMsg struct {
+ Type vm.Op
+ Data []byte
+}
+
// DELEGATE_IDS PUBKEY SIG(block.time)
type DelegateInfoList struct {
// 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 *DelegateInfoList) DataType() uint8 { return DelegateInfoType }
@@
-33,13
+39,13
@@
type RegisterForgerData struct {
func (d *RegisterForgerData) DataType() uint8 { return RegisterType }
type VoteForgerData struct {
func (d *RegisterForgerData) DataType() uint8 { return RegisterType }
type VoteForgerData struct {
- Forgers []string `json:"
F
orgers"`
+ Forgers []string `json:"
f
orgers"`
}
func (d *VoteForgerData) DataType() uint8 { return VoteType }
type CancelVoteForgerData struct {
}
func (d *VoteForgerData) DataType() uint8 { return VoteType }
type CancelVoteForgerData struct {
- Forgers []string `json:"
F
orgers"`
+ Forgers []string `json:"
f
orgers"`
}
func (d *CancelVoteForgerData) DataType() uint8 { return CancelVoteType }
}
func (d *CancelVoteForgerData) DataType() uint8 { return CancelVoteType }