refactor, staking uses addresses instead of pubkey

staking refactoring working

working
This commit is contained in:
rigelrozanski
2018-03-28 19:01:50 +02:00
parent 292e156872
commit dc8636390c
12 changed files with 451 additions and 383 deletions
+9 -9
View File
@@ -34,6 +34,15 @@ func (msg SetTrendMsg) String() string {
return fmt.Sprintf("SetTrendMsg{Sender: %v, Cool: %v}", msg.Sender, msg.Cool)
}
// Get the bytes for the message signer to sign on
func (msg SetTrendMsg) GetSignBytes() []byte {
b, err := json.Marshal(msg)
if err != nil {
panic(err)
}
return b
}
// Validate Basic is used to quickly disqualify obviously invalid messages quickly
func (msg SetTrendMsg) ValidateBasic() sdk.Error {
if len(msg.Sender) == 0 {
@@ -48,15 +57,6 @@ func (msg SetTrendMsg) ValidateBasic() sdk.Error {
return nil
}
// Get the bytes for the message signer to sign on
func (msg SetTrendMsg) GetSignBytes() []byte {
b, err := json.Marshal(msg)
if err != nil {
panic(err)
}
return b
}
//_______________________________________________________________________
// A message type to quiz how cool you are. these fields are can be entirely