From ed9fa658ed27a382e34047679d3d06202ee88a68 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Tue, 20 Jul 2021 01:38:55 +0300 Subject: [PATCH] Make block hash more random --- blockchain/types/block.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockchain/types/block.go b/blockchain/types/block.go index bb0d6ad..ce99ec2 100644 --- a/blockchain/types/block.go +++ b/blockchain/types/block.go @@ -46,7 +46,7 @@ func GenesisBlock() *Block { } func CreateBlock(lastBlockHeader *BlockHeader, txs []*Transaction, minerEth common.Address, privateKey crypto.PrivKey, eproof *types.ElectionProof) (*Block, error) { - timestamp := time.Now().Unix() + timestamp := time.Now().UnixNano() // extract hashes from transactions var merkleHashes [][]byte