URI: 
       tMerge pull request #3259 from SomberNight/remove_requires_fee - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit d0cb19a0b2375dbb2a24e0a9c63ec44e2e1c4ff8
   DIR parent ce4be1f8f236cf1ad33ee1aae2c4599bcb8e8e5a
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Thu,  9 Nov 2017 22:19:56 +0100
       
       Merge pull request #3259 from SomberNight/remove_requires_fee
       
       remove Transaction.requires_fee()
       Diffstat:
         M gui/qt/main_window.py               |       2 +-
         M lib/transaction.py                  |      23 -----------------------
       
       2 files changed, 1 insertion(+), 24 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -1354,7 +1354,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
                if use_rbf:
                    tx.set_rbf(True)
        
       -        if fee < self.wallet.relayfee() * tx.estimated_size() / 1000 and tx.requires_fee(self.wallet):
       +        if fee < self.wallet.relayfee() * tx.estimated_size() / 1000:
                    self.show_error(_("This transaction requires a higher fee, or it will not be propagated by the network"))
                    return
        
   DIR diff --git a/lib/transaction.py b/lib/transaction.py
       t@@ -941,29 +941,6 @@ class Transaction:
                }
                return out
        
       -    def requires_fee(self, wallet):
       -        # see https://en.bitcoin.it/wiki/Transaction_fees
       -        #
       -        # size must be smaller than 1 kbyte for free tx
       -        size = len(self.serialize(-1))/2
       -        if size >= 10000:
       -            return True
       -        # all outputs must be 0.01 BTC or larger for free tx
       -        for addr, value in self.get_outputs():
       -            if value < 1000000:
       -                return True
       -        # priority must be large enough for free tx
       -        threshold = 57600000
       -        weight = 0
       -        for txin in self.inputs():
       -            height, conf, timestamp = wallet.get_tx_height(txin["prevout_hash"])
       -            weight += txin["value"] * conf
       -        priority = weight / size
       -        print_error(priority, threshold)
       -
       -        return priority < threshold
       -
       -
        
        def tx_from_str(txt):
            "json or raw hexadecimal"