sort *all* GetSignBytes:

- call MustSortJSON before return JSON bytes to guarantee alphabetic
ordering

- moved SortJSON and MustSortJSON to types package to avoid cyclic
package dep
This commit is contained in:
Liamsi
2018-07-06 01:12:57 +01:00
parent 0f1ceb073e
commit b7f902fba5
20 changed files with 100 additions and 143 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ func (msg MsgSend) GetSignBytes() []byte {
if err != nil {
panic(err)
}
return bz
return sdk.MustSortJSON(bz)
}
// Implements Msg. Return the signer.
+1 -1
View File
@@ -100,7 +100,7 @@ func (msg MsgIssue) GetSignBytes() []byte {
if err != nil {
panic(err)
}
return bz
return sdk.MustSortJSON(bz)
}
// Implements Msg. Return the signer.