From a3bb804b7f78570bf04cc58cb1f010da09268879 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 6 Nov 2016 13:46:26 -0300 Subject: [PATCH] test --- src/komodo_bitcoind.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 9713b065a..31df8b64c 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -364,11 +364,13 @@ uint32_t komodo_txtime(uint256 hash) uint64_t komodo_seed(int32_t height) { - uint256 hash; uint64_t seed = 0; CBlockIndex *pindex = chainActive[height]; + uint256 hash; uint8_t *ptr; uint64_t seed = 0; CBlockIndex *pindex = chainActive[height]; if ( pindex != 0 ) { hash = pindex->GetBlockHash(); - seed = (uint64_t)hash; + ptr = (uint8_t *)&hash; + for (i=0; i<8; i++) + seed = (seed << 8) | ptr[i]; } return(seed); }