mirror of
https://github.com/tendermint/tendermint.git
synced 2026-05-29 10:30:20 +00:00
Cleanup canonical json
This commit is contained in:
@@ -420,7 +420,7 @@ func (data *Data) StringIndented(indent string) string {
|
||||
|
||||
// BlockID defines the unique ID of a block as its Hash and its PartSetHeader
|
||||
type BlockID struct {
|
||||
Hash data.Bytes `json:"hash,omitempty"`
|
||||
Hash data.Bytes `json:"hash"`
|
||||
PartsHeader PartSetHeader `json:"parts"`
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,14 @@ package types
|
||||
import (
|
||||
"time"
|
||||
|
||||
wire "github.com/tendermint/go-wire"
|
||||
"github.com/tendermint/go-wire/data"
|
||||
)
|
||||
|
||||
// canonical json is go-wire's json for structs with fields in alphabetical order
|
||||
|
||||
// timeFormat is RFC3339Millis, used for generating the sigs
|
||||
const timeFormat = "2006-01-02T15:04:05.999Z07:00"
|
||||
// timeFormat is used for generating the sigs
|
||||
const timeFormat = wire.RFC3339Millis
|
||||
|
||||
type CanonicalJSONBlockID struct {
|
||||
Hash data.Bytes `json:"hash,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user