diff --git a/jmclient/jmclient/taker.py b/jmclient/jmclient/taker.py index a460e38..46f4b08 100644 --- a/jmclient/jmclient/taker.py +++ b/jmclient/jmclient/taker.py @@ -355,7 +355,8 @@ class Taker(object): if self.my_change_addr: #Estimate fee per choice of next/3/6 blocks targetting. estimated_fee = estimate_tx_fee( - len(sum(self.utxos.values(), [])), len(self.outputs) + 2) + len(sum(self.utxos.values(), [])), len(self.outputs) + 2, + txtype=self.wallet.get_txtype()) jlog.info("Based on initial guess: " + str(self.total_txfee) + ", we estimated a miner fee of: " + str(estimated_fee)) #reset total diff --git a/scripts/sendpayment.py b/scripts/sendpayment.py index 9850669..b352ec8 100644 --- a/scripts/sendpayment.py +++ b/scripts/sendpayment.py @@ -114,9 +114,10 @@ def main(): # Dynamically estimate a realistic fee if it currently is the default value. # At this point we do not know even the number of our own inputs, so - # we guess conservatively with 2 inputs and 2 outputs each + # we guess conservatively with 2 inputs and 2 outputs each. if options.txfee == -1: - options.txfee = max(options.txfee, estimate_tx_fee(2, 2)) + options.txfee = max(options.txfee, estimate_tx_fee(2, 2, + txtype="p2sh-p2wpkh")) log.debug("Estimated miner/tx fee for each cj participant: " + str( options.txfee)) assert (options.txfee >= 0)