mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Tests: Refactor to create witness script creation function
* Refactor blocktools.py so that witness script creation is its own function * Changed p2p-segwit to use new function
This commit is contained in:
@@ -610,7 +610,8 @@ class CBlock(CBlockHeader):
|
||||
return r
|
||||
|
||||
# Calculate the merkle root given a vector of transaction hashes
|
||||
def get_merkle_root(self, hashes):
|
||||
@classmethod
|
||||
def get_merkle_root(cls, hashes):
|
||||
while len(hashes) > 1:
|
||||
newhashes = []
|
||||
for i in range(0, len(hashes), 2):
|
||||
|
||||
Reference in New Issue
Block a user