From 585b9c28187e389c84929d58cf9f7eee0c3fcf8e Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 4 Apr 2019 08:03:21 +0200 Subject: [PATCH] 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. --- qa/rpc-tests/test_framework/mininode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 5c67d70ca0325..6da6bcbd63100 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -549,7 +549,8 @@ def serialize(self): 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):