1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +00:00

chore(core): Reject replacement transactions which involve negative

fees.
This commit is contained in:
Andrew Kozlik 2020-12-01 10:08:38 +01:00 committed by Andrew Kozlik
parent 3be0138aae
commit 06ce14096c

View File

@ -151,6 +151,11 @@ class BasicApprover(Approver):
)
orig_fee = self.orig_total_in - self.orig_total_out
if fee < 0 or orig_fee < 0:
raise wire.ProcessError(
"Negative fees not supported in transaction replacement."
)
# Replacement transactions are only allowed to make amendments which
# do not increase the amount that we are spending on external outputs.
# In other words, the total amount being sent out of the wallet must