stream_update --replace also clears the channel
This commit is contained in:
parent
c5ae59bff7
commit
d98162a118
2 changed files with 6 additions and 2 deletions
|
@ -2454,7 +2454,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
channel = None
|
channel = None
|
||||||
if channel_id or channel_name:
|
if channel_id or channel_name:
|
||||||
channel = await self.get_channel_or_error(channel_account_id, channel_id, channel_name, for_signing=True)
|
channel = await self.get_channel_or_error(channel_account_id, channel_id, channel_name, for_signing=True)
|
||||||
elif old_txo.claim.is_signed and not clear_channel:
|
elif old_txo.claim.is_signed and not clear_channel and not replace:
|
||||||
channel = old_txo.channel
|
channel = old_txo.channel
|
||||||
|
|
||||||
if 'fee_address' in kwargs:
|
if 'fee_address' in kwargs:
|
||||||
|
|
|
@ -536,14 +536,17 @@ class StreamCommands(CommandTestCase):
|
||||||
'duration': 15
|
'duration': 15
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
channel = await self.channel_create('@chan')
|
||||||
tx = await self.out(self.daemon.jsonrpc_stream_create(
|
tx = await self.out(self.daemon.jsonrpc_stream_create(
|
||||||
'chrome', '1.0', file_path=self.video_file_name,
|
'chrome', '1.0', file_path=self.video_file_name,
|
||||||
tags='blah', languages='uk', locations='UA::Kyiv'
|
tags='blah', languages='uk', locations='UA::Kyiv',
|
||||||
|
channel_id=channel['outputs'][0]['claim_id']
|
||||||
))
|
))
|
||||||
await self.on_transaction_dict(tx)
|
await self.on_transaction_dict(tx)
|
||||||
txo = tx['outputs'][0]
|
txo = tx['outputs'][0]
|
||||||
expected['source']['sd_hash'] = txo['value']['source']['sd_hash']
|
expected['source']['sd_hash'] = txo['value']['source']['sd_hash']
|
||||||
self.assertEqual(txo['value'], expected)
|
self.assertEqual(txo['value'], expected)
|
||||||
|
self.assertEqual(txo['signing_channel']['name'], '@chan')
|
||||||
tx = await self.out(self.daemon.jsonrpc_stream_update(
|
tx = await self.out(self.daemon.jsonrpc_stream_update(
|
||||||
txo['claim_id'], title='new title', replace=True
|
txo['claim_id'], title='new title', replace=True
|
||||||
))
|
))
|
||||||
|
@ -553,6 +556,7 @@ class StreamCommands(CommandTestCase):
|
||||||
del expected['languages']
|
del expected['languages']
|
||||||
del expected['locations']
|
del expected['locations']
|
||||||
self.assertEqual(txo['value'], expected)
|
self.assertEqual(txo['value'], expected)
|
||||||
|
self.assertNotIn('signing_channel', txo)
|
||||||
|
|
||||||
async def test_create_update_and_abandon_stream(self):
|
async def test_create_update_and_abandon_stream(self):
|
||||||
await self.assertBalance(self.account, '10.0')
|
await self.assertBalance(self.account, '10.0')
|
||||||
|
|
Loading…
Reference in a new issue