From 4b220cbfb44077b7b3f6b4375465c996f879d2dd Mon Sep 17 00:00:00 2001 From: Intel Date: Mon, 12 May 2014 09:44:55 -0400 Subject: [PATCH] Fixed Merkle Tree Rebuild --- src/server/shared/Bitcoin/Block.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/shared/Bitcoin/Block.cpp b/src/server/shared/Bitcoin/Block.cpp index 6f24892..ed8cfbf 100644 --- a/src/server/shared/Bitcoin/Block.cpp +++ b/src/server/shared/Bitcoin/Block.cpp @@ -1,5 +1,4 @@ #include "Block.h" -#include "Log.h" namespace Bitcoin { @@ -36,7 +35,7 @@ namespace Bitcoin uint32 j = 0; for (uint32 size = tx.size(); size > 1; size = (size+1)/2) { - merkleTree[size] = Crypto::SHA256D(Util::Join(merkleTree[j], merkleTree[j+1])); + merkleTree[j+size] = Crypto::SHA256D(Util::Join(merkleTree[j], merkleTree[j+1])); j += size; }