fix putting spent unactivated supports in removed_active_support
This commit is contained in:
parent
306efa17cc
commit
f4ca3ea66b
1 changed files with 9 additions and 6 deletions
|
@ -724,15 +724,18 @@ 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)
|
||||||
self.removed_active_support[spent_support].append(support_amount)
|
if activation <= self.height + 1:
|
||||||
# print(f"\tspent support for lbry://{supported_name}#{spent_support.hex()} activation:{activation} {support_amount}")
|
self.removed_active_support[spent_support].append(support_amount)
|
||||||
return StagedClaimtrieSupport(
|
print(f"\tspent support for lbry://{supported_name}#{spent_support.hex()} activation:{activation} {support_amount}")
|
||||||
|
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()
|
||||||
StagedActivation(
|
if supported_name is not None:
|
||||||
|
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
|
||||||
).get_remove_activate_ops()
|
).get_remove_activate_ops())
|
||||||
|
return ops
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def _spend_claim_txo(self, txin: TxInput, spent_claims: Dict[bytes, Tuple[int, int, str]]):
|
def _spend_claim_txo(self, txin: TxInput, spent_claims: Dict[bytes, Tuple[int, int, str]]):
|
||||||
|
|
Loading…
Reference in a new issue