mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Make CBlock.get_merkle_root static
We'll later need this method to calculate merkle roots outside of CBlock. I'd like to avoid moving this code outside of CBlock as it might later conflict with Bitcoin backports.
This commit is contained in:
parent
1e0bdbc9b7
commit
585b9c2818
@ -549,7 +549,8 @@ class CBlock(CBlockHeader):
|
||||
return r
|
||||
|
||||
# Calculate the merkle root given a vector of transaction hashes
|
||||
def get_merkle_root(self, hashes):
|
||||
@staticmethod
|
||||
def get_merkle_root(hashes):
|
||||
while len(hashes) > 1:
|
||||
newhashes = []
|
||||
for i in range(0, len(hashes), 2):
|
||||
|
Loading…
Reference in New Issue
Block a user