fix removing unactivated support
This commit is contained in:
parent
69ed47fc22
commit
ad1d25d945
1 changed files with 2 additions and 2 deletions
|
@ -724,13 +724,13 @@ class BlockProcessor:
|
||||||
if supported_name is not None:
|
if supported_name is not None:
|
||||||
self.pending_removed_support[supported_name][spent_support].append((txin_num, txin.prev_idx))
|
self.pending_removed_support[supported_name][spent_support].append((txin_num, txin.prev_idx))
|
||||||
activation = self.db.get_activation(txin_num, txin.prev_idx, is_support=True)
|
activation = self.db.get_activation(txin_num, txin.prev_idx, is_support=True)
|
||||||
if activation <= self.height + 1:
|
if 0 < activation <= self.height + 1:
|
||||||
self.removed_active_support[spent_support].append(support_amount)
|
self.removed_active_support[spent_support].append(support_amount)
|
||||||
# print(f"\tspent support for {spent_support.hex()} activation:{activation} {support_amount}")
|
# print(f"\tspent support for {spent_support.hex()} activation:{activation} {support_amount}")
|
||||||
ops = StagedClaimtrieSupport(
|
ops = StagedClaimtrieSupport(
|
||||||
spent_support, txin_num, txin.prev_idx, support_amount
|
spent_support, txin_num, txin.prev_idx, support_amount
|
||||||
).get_spend_support_txo_ops()
|
).get_spend_support_txo_ops()
|
||||||
if supported_name is not None:
|
if supported_name is not None and activation > 0:
|
||||||
ops.extend(StagedActivation(
|
ops.extend(StagedActivation(
|
||||||
ACTIVATED_SUPPORT_TXO_TYPE, spent_support, txin_num, txin.prev_idx, activation, supported_name,
|
ACTIVATED_SUPPORT_TXO_TYPE, spent_support, txin_num, txin.prev_idx, activation, supported_name,
|
||||||
support_amount
|
support_amount
|
||||||
|
|
Loading…
Reference in a new issue