update channel_to_claim and claim_to_channel at the same time

This commit is contained in:
Jack Robison 2021-07-05 13:07:54 -04:00 committed by Victor Shyba
parent 287ff0a557
commit e67152ec14

View file

@ -179,24 +179,21 @@ class StagedClaimtrieItem(typing.NamedTuple):
)
]
if self.signing_hash:
ops.append(
if self.signing_hash and self.channel_signature_is_valid:
ops.extend([
# channel by stream
op(
*Prefixes.claim_to_channel.pack_item(
self.claim_hash, self.tx_num, self.position, self.signing_hash
)
)
)
if self.channel_signature_is_valid:
ops.append(
),
# stream by channel
op(
*Prefixes.channel_to_claim.pack_item(
self.signing_hash, self.name, self.tx_num, self.position, self.claim_hash
)
)
)
])
if self.reposted_claim_hash:
ops.extend([
op(