forked from LBRYCommunity/lbry-sdk
tests: find_claim_txo for reliability in some places
This commit is contained in:
parent
4783e6da1f
commit
fdac6416a1
1 changed files with 2 additions and 6 deletions
|
@ -401,11 +401,7 @@ class TestMultiBlockFileSyncing(BasicBlockchainTestCase):
|
||||||
signed = await self.chain.sign_raw_transaction_with_wallet(funded['hex'])
|
signed = await self.chain.sign_raw_transaction_with_wallet(funded['hex'])
|
||||||
await self.chain.send_raw_transaction(signed['hex'])
|
await self.chain.send_raw_transaction(signed['hex'])
|
||||||
tx = Transaction(unhexlify(signed['hex']))
|
tx = Transaction(unhexlify(signed['hex']))
|
||||||
claim = None
|
claim = self.find_claim_txo(tx)
|
||||||
for txo in tx.outputs:
|
|
||||||
if txo.is_claim:
|
|
||||||
claim = txo
|
|
||||||
break
|
|
||||||
support_tx = Transaction().add_outputs([
|
support_tx = Transaction().add_outputs([
|
||||||
Output.pay_support_pubkey_hash(CENT, claim.claim_name, claim.claim_id, address),
|
Output.pay_support_pubkey_hash(CENT, claim.claim_name, claim.claim_id, address),
|
||||||
])
|
])
|
||||||
|
@ -416,7 +412,7 @@ class TestMultiBlockFileSyncing(BasicBlockchainTestCase):
|
||||||
|
|
||||||
# supports \w data aren't supported until block 350, fast forward a little
|
# supports \w data aren't supported until block 350, fast forward a little
|
||||||
await self.chain.generate(60)
|
await self.chain.generate(60)
|
||||||
claim = tx.outputs[0]
|
claim = self.find_claim_txo(tx)
|
||||||
tx = Transaction().add_outputs([
|
tx = Transaction().add_outputs([
|
||||||
Output.pay_support_pubkey_hash(CENT, claim.claim_name, claim.claim_id, address),
|
Output.pay_support_pubkey_hash(CENT, claim.claim_name, claim.claim_id, address),
|
||||||
Output.pay_support_data_pubkey_hash(
|
Output.pay_support_data_pubkey_hash(
|
||||||
|
|
Loading…
Reference in a new issue