fix tx api tests
This commit is contained in:
parent
f2236eb7a4
commit
aa029955ee
1 changed files with 5 additions and 5 deletions
|
@ -32,6 +32,7 @@ class BasicTransactionTest(IntegrationTestCase):
|
||||||
l2d('1.0'), '@bar', channel, self.account.ledger.address_to_hash160(address1)
|
l2d('1.0'), '@bar', channel, self.account.ledger.address_to_hash160(address1)
|
||||||
)
|
)
|
||||||
channel_txo.generate_channel_private_key()
|
channel_txo.generate_channel_private_key()
|
||||||
|
channel_txo.script.generate()
|
||||||
channel_tx = await Transaction.create([], [channel_txo], [self.account], self.account)
|
channel_tx = await Transaction.create([], [channel_txo], [self.account], self.account)
|
||||||
|
|
||||||
stream = Claim()
|
stream = Claim()
|
||||||
|
@ -39,9 +40,8 @@ class BasicTransactionTest(IntegrationTestCase):
|
||||||
stream_txo = Output.pay_claim_name_pubkey_hash(
|
stream_txo = Output.pay_claim_name_pubkey_hash(
|
||||||
l2d('1.0'), 'foo', stream, self.account.ledger.address_to_hash160(address1)
|
l2d('1.0'), 'foo', stream, self.account.ledger.address_to_hash160(address1)
|
||||||
)
|
)
|
||||||
stream_tx = await Transaction.create([], [channel_txo], [self.account], self.account)
|
stream_tx = await Transaction.create([], [stream_txo], [self.account], self.account)
|
||||||
stream_tx._reset()
|
stream_txo.sign(channel_txo)
|
||||||
stream_txo.sign(channel_txo, b'placeholder')
|
|
||||||
await stream_tx.sign([self.account])
|
await stream_tx.sign([self.account])
|
||||||
|
|
||||||
await self.broadcast(channel_tx)
|
await self.broadcast(channel_tx)
|
||||||
|
@ -56,8 +56,8 @@ class BasicTransactionTest(IntegrationTestCase):
|
||||||
self.ledger.wait(stream_tx)
|
self.ledger.wait(stream_tx)
|
||||||
])
|
])
|
||||||
|
|
||||||
self.assertEqual(d2l(await self.account.get_balance()), '7.983786')
|
self.assertEqual(d2l(await self.account.get_balance()), '7.985786')
|
||||||
self.assertEqual(d2l(await self.account.get_balance(include_claims=True)), '9.983786')
|
self.assertEqual(d2l(await self.account.get_balance(include_claims=True)), '9.985786')
|
||||||
|
|
||||||
response = await self.ledger.resolve(0, 10, 'lbry://@bar/foo')
|
response = await self.ledger.resolve(0, 10, 'lbry://@bar/foo')
|
||||||
self.assertIn('lbry://@bar/foo', response)
|
self.assertIn('lbry://@bar/foo', response)
|
||||||
|
|
Loading…
Reference in a new issue