Make dummy block have consistent block hash at a certain height
@@ -106,7 +106,10 @@ func (b *Block) ByteStreamHeader() []byte {
tmp8B := make([]byte, 8)
enc.MachineEndian.PutUint64(tmp8B, uint64(b.Header.height))
stream = append(stream, tmp8B...)
- enc.MachineEndian.PutUint64(tmp8B, b.Header.timestamp)
+ // TODO: exclude timestamp from block hash because dummy block needs to have a consistent hash no matter which
+ // node produces it at a given height. Once we get rid of the dummy block concept, we need to include it into
+ // the hash block hash again
+ //enc.MachineEndian.PutUint64(tmp8B, b.Header.timestamp)
stream = append(stream, tmp8B...)
stream = append(stream, b.Header.prevBlockHash[:]...)
stream = append(stream, b.Header.txRoot[:]...)
