mirror of
https://github.com/GOSTSec/poolserver
synced 2025-01-15 01:00:10 +00:00
Fixed Merkle Tree Rebuild
This commit is contained in:
parent
8659d15b9a
commit
4b220cbfb4
@ -1,5 +1,4 @@
|
|||||||
#include "Block.h"
|
#include "Block.h"
|
||||||
#include "Log.h"
|
|
||||||
|
|
||||||
namespace Bitcoin
|
namespace Bitcoin
|
||||||
{
|
{
|
||||||
@ -36,7 +35,7 @@ namespace Bitcoin
|
|||||||
uint32 j = 0;
|
uint32 j = 0;
|
||||||
for (uint32 size = tx.size(); size > 1; size = (size+1)/2)
|
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;
|
j += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user