aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/crypto.go4
-rw-r--r--core/types/block.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/crypto.go b/core/crypto.go
index 62c095d..f3870a5 100644
--- a/core/crypto.go
+++ b/core/crypto.go
@@ -26,7 +26,7 @@ import (
)
func hashWitness(witness *types.Witness) (common.Hash, error) {
- binaryTimestamp, err := witness.Timestamp.MarshalBinary()
+ binaryTimestamp, err := witness.Timestamp.UTC().MarshalBinary()
if err != nil {
return common.Hash{}, err
}
@@ -46,7 +46,7 @@ func hashBlock(block *types.Block) (common.Hash, error) {
binaryAcks[idx] = ack[:]
}
hashAcks := crypto.Keccak256Hash(binaryAcks...)
- binaryTimestamp, err := block.Timestamp.MarshalBinary()
+ binaryTimestamp, err := block.Timestamp.UTC().MarshalBinary()
if err != nil {
return common.Hash{}, err
}
diff --git a/core/types/block.go b/core/types/block.go
index 5996acf..710da9b 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -72,7 +72,7 @@ type Block struct {
ParentHash common.Hash `json:"parent_hash"`
Hash common.Hash `json:"hash"`
Position Position `json:"position"`
- Timestamp time.Time `json:"timestamps"`
+ Timestamp time.Time `json:"timestamp"`
Acks common.SortedHashes `json:"acks"`
Payload []byte `json:"payload"`
Witness Witness `json:"witness"`