Skip to content

Commit 585b9c2

Browse files
committed
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.
1 parent 1e0bdbc commit 585b9c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

qa/rpc-tests/test_framework/mininode.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ def serialize(self):
549549
return r
550550

551551
# Calculate the merkle root given a vector of transaction hashes
552-
def get_merkle_root(self, hashes):
552+
@staticmethod
553+
def get_merkle_root(hashes):
553554
while len(hashes) > 1:
554555
newhashes = []
555556
for i in range(0, len(hashes), 2):

0 commit comments

Comments
 (0)