From c93100ccd08390858b25765309050190a4857ef0 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Wed, 23 Apr 2025 16:24:35 +0200 Subject: [PATCH] getPayloadHash returns not zero when payload included (#2305) --- .../utils/consensushashing/calculate_signature_hash.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain/consensus/utils/consensushashing/calculate_signature_hash.go b/domain/consensus/utils/consensushashing/calculate_signature_hash.go index a90dda5db..9e3de2603 100644 --- a/domain/consensus/utils/consensushashing/calculate_signature_hash.go +++ b/domain/consensus/utils/consensushashing/calculate_signature_hash.go @@ -210,7 +210,7 @@ func getOutputsHash(tx *externalapi.DomainTransaction, inputIndex int, hashType } func getPayloadHash(tx *externalapi.DomainTransaction, reusedValues *SighashReusedValues) *externalapi.DomainHash { - if tx.SubnetworkID.Equal(&subnetworks.SubnetworkIDNative) { + if tx.SubnetworkID.Equal(&subnetworks.SubnetworkIDNative) && len(tx.Payload) == 0 { return externalapi.NewZeroHash() }