diff options
Diffstat (limited to 'pkg/types')
-rw-r--r-- | pkg/types/leaf.go | 16 | ||||
-rw-r--r-- | pkg/types/proof.go | 2 | ||||
-rw-r--r-- | pkg/types/tree_head.go | 10 |
3 files changed, 14 insertions, 14 deletions
diff --git a/pkg/types/leaf.go b/pkg/types/leaf.go index 9e8d445..99cf08a 100644 --- a/pkg/types/leaf.go +++ b/pkg/types/leaf.go @@ -12,14 +12,14 @@ import ( ) type Statement struct { - ShardHint uint64 `ascii:"shard_hint"` - Checksum merkle.Hash `ascii:"checksum"` + ShardHint uint64 `ascii:"shard_hint"` + Checksum merkle.Hash `ascii:"checksum"` } type Leaf struct { Statement - Signature Signature `ascii:"signature"` - KeyHash merkle.Hash `ascii:"key_hash"` + Signature Signature `ascii:"signature"` + KeyHash merkle.Hash `ascii:"key_hash"` } type Leaves []Leaf @@ -84,10 +84,10 @@ func (l *Leaf) FromASCII(r io.Reader) error { func (l *Leaves) FromASCII(r io.Reader) error { leaves := &struct { - ShardHint []uint64 `ascii:"shard_hint"` - Checksum []merkle.Hash `ascii:"checksum"` - Signature []Signature `ascii:"signature"` - KeyHash []merkle.Hash `ascii:"key_hash"` + ShardHint []uint64 `ascii:"shard_hint"` + Checksum []merkle.Hash `ascii:"checksum"` + Signature []Signature `ascii:"signature"` + KeyHash []merkle.Hash `ascii:"key_hash"` }{} if err := ascii.StdEncoding.Deserialize(r, leaves); err != nil { diff --git a/pkg/types/proof.go b/pkg/types/proof.go index f2df332..dd136d6 100644 --- a/pkg/types/proof.go +++ b/pkg/types/proof.go @@ -9,7 +9,7 @@ import ( type InclusionProof struct { TreeSize uint64 - LeafIndex uint64 `ascii:"leaf_index"` + LeafIndex uint64 `ascii:"leaf_index"` Path []merkle.Hash `ascii:"inclusion_path"` } diff --git a/pkg/types/tree_head.go b/pkg/types/tree_head.go index 04b3b10..baedf08 100644 --- a/pkg/types/tree_head.go +++ b/pkg/types/tree_head.go @@ -13,9 +13,9 @@ import ( ) type TreeHead struct { - Timestamp uint64 `ascii:"timestamp"` - TreeSize uint64 `ascii:"tree_size"` - RootHash merkle.Hash `ascii:"root_hash"` + Timestamp uint64 `ascii:"timestamp"` + TreeSize uint64 `ascii:"tree_size"` + RootHash merkle.Hash `ascii:"root_hash"` } type SignedTreeHead struct { @@ -25,8 +25,8 @@ type SignedTreeHead struct { type CosignedTreeHead struct { SignedTreeHead - Cosignature []Signature `ascii:"cosignature"` - KeyHash []merkle.Hash `ascii:"key_hash"` + Cosignature []Signature `ascii:"cosignature"` + KeyHash []merkle.Hash `ascii:"key_hash"` } func (th *TreeHead) toBinary() []byte { |