tx._reset() the transaction after internal changes

This commit is contained in:
Lex Berezhny 2021-02-07 13:20:15 -05:00
parent b208cf6d32
commit f80dd2b307
2 changed files with 3 additions and 0 deletions

View file

@ -3343,6 +3343,7 @@ class Daemon(metaclass=JSONRPCServerType):
file_stream = await self.file_manager.create_stream(file_path)
claim.stream.source.sd_hash = file_stream.sd_hash
new_txo.script.generate()
tx._reset()
if channel:
new_txo.sign(channel)
@ -3562,6 +3563,7 @@ class Daemon(metaclass=JSONRPCServerType):
file_stream = await self.file_manager.create_stream(file_path)
new_txo.claim.stream.source.sd_hash = file_stream.sd_hash
new_txo.script.generate()
tx._reset()
stream_hash = file_stream.stream_hash
elif old_stream:
stream_hash = old_stream.stream_hash

View file

@ -450,6 +450,7 @@ class Output(InputOutput):
)
self.claim.channel.public_key_bytes = self.private_key.get_verifying_key().to_der()
self.script.generate()
self.tx_ref.tx._reset()
return self.private_key
def is_channel_private_key(self, private_key):