def calculate_witness_commitment
      witness_hashes = [COINBASE_WTXID]
      witness_hashes += (transactions[1..-1].map(&:witness_hash))
      reserved_value = transactions[0].inputs[0].script_witness.stack.map(&:bth).join
      root_hash = Bitcoin::MerkleTree.build_from_leaf(witness_hashes).merkle_root
      Bitcoin.double_sha256([root_hash + reserved_value].pack('H*')).bth
    end
def calculate_witness_commitment
      witness_hashes = [COINBASE_WTXID]
      witness_hashes += (transactions[1..-1].map(&:witness_hash))
      reserved_value = transactions[0].inputs[0].script_witness.stack.map(&:bth).join
      root_hash = Bitcoin::MerkleTree.build_from_leaf(witness_hashes).merkle_root
      Bitcoin.double_sha256([root_hash + reserved_value].pack('H*')).bth
    end
calculate witness commitment from tx list.