diff --git a/qa/rpc-tests/test_framework/blocktools.py b/qa/rpc-tests/test_framework/blocktools.py index 123ef5bdf..d3f06f479 100644 --- a/qa/rpc-tests/test_framework/blocktools.py +++ b/qa/rpc-tests/test_framework/blocktools.py @@ -16,8 +16,10 @@ def create_block(hashprev, coinbase, nTime=None, nBits=None, hashFinalSaplingRoo else: block.nTime = nTime block.hashPrevBlock = hashprev - if hashFinalSaplingRoot is not None: - block.hashFinalSaplingRoot = hashFinalSaplingRoot + if hashFinalSaplingRoot is None: + # By default NUs up to Sapling are active from block 1, so we set this to the empty root. + hashFinalSaplingRoot = 0x3e49b5f954aa9d3545bc6c37744661eea48d7c34e3000d82b7f0010c30f4c2fb + block.hashFinalSaplingRoot = hashFinalSaplingRoot if nBits is None: block.nBits = 0x200f0f0f # difficulty retargeting is disabled in REGTEST chainparams else: