This commit is contained in:
Jack Robison 2022-10-16 14:56:19 -04:00
parent e61efcd00d
commit 586e9a613b

View file

@ -505,11 +505,14 @@ class BlockchainProcessorService(BlockchainService):
self.future_effective_amount_delta[supported_claim_hash] += txo.value self.future_effective_amount_delta[supported_claim_hash] += txo.value
def _add_claim_or_support(self, height: int, tx_hash: bytes, tx_num: int, nout: int, txo: 'TxOutput', def _add_claim_or_support(self, height: int, tx_hash: bytes, tx_num: int, nout: int, txo: 'TxOutput',
spent_claims: typing.Dict[bytes, Tuple[int, int, str]], first_input: 'TxInput'): spent_claims: typing.Dict[bytes, Tuple[int, int, str]], first_input: 'TxInput') -> int:
if txo.is_claim or txo.is_update: if txo.is_claim or txo.is_update:
self._add_claim_or_update(height, txo, tx_hash, tx_num, nout, spent_claims, first_input) self._add_claim_or_update(height, txo, tx_hash, tx_num, nout, spent_claims, first_input)
return 1
elif txo.is_support: elif txo.is_support:
self._add_support(height, txo, tx_num, nout) self._add_support(height, txo, tx_num, nout)
return 2
return 0
def _spend_claims_and_supports(self, txis: List[TxInput], spent_claims: Dict[bytes, Tuple[int, int, str]]): def _spend_claims_and_supports(self, txis: List[TxInput], spent_claims: Dict[bytes, Tuple[int, int, str]]):
tx_nums = self.db.get_tx_nums( tx_nums = self.db.get_tx_nums(