From f80dd2b307704610d6a73c1e5766cf7f378a56b1 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sun, 7 Feb 2021 13:20:15 -0500 Subject: [PATCH] tx._reset() the transaction after internal changes --- lbry/extras/daemon/daemon.py | 2 ++ lbry/wallet/transaction.py | 1 + 2 files changed, 3 insertions(+) diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py index 819f83c0d..c1a7e0fdb 100644 --- a/lbry/extras/daemon/daemon.py +++ b/lbry/extras/daemon/daemon.py @@ -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 diff --git a/lbry/wallet/transaction.py b/lbry/wallet/transaction.py index c05d7bc12..e1e4bbd55 100644 --- a/lbry/wallet/transaction.py +++ b/lbry/wallet/transaction.py @@ -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):