test_framework: fix AttributeError in sapling_spends_compact_digest

Without this fix we will get:
AttributeError: 'SpendDescriptionV5' object has no attribute 'anchor'
On certain V5 transactions rehash / calc_sha256, for example:
ca6abd8ef7d6ef158a4a35ea2c2c0cf122f2f664a88f8fa5b6fd79e48c5bed59
This commit is contained in:
DeckerSU 2022-10-04 01:54:34 +02:00
parent 6c392dbb0b
commit 225c8b8a03
No known key found for this signature in database
GPG Key ID: FE50480862E6451C
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ def sapling_spends_noncompact_digest(saplingBundle):
digest = blake2b(digest_size=32, person=b'ZTxIdSSpendNHash')
for desc in saplingBundle.spends:
digest.update(ser_uint256(desc.cv))
digest.update(ser_uint256(desc.anchor))
digest.update(ser_uint256(saplingBundle.anchor))
digest.update(ser_uint256(desc.rk))
return digest.digest()