@@ -841,15 +841,6 @@ def updateTip(self):
841841 log .error ("failed to retrieve tip from blockchain: %s" % formatTraceback (e ))
842842 raise DecredError ("no tip data retrieved" )
843843
844- def relayFee (self ):
845- """
846- Return the current transaction fee.
847-
848- Returns:
849- int: Atoms per kB of encoded transaction.
850- """
851- return txscript .DefaultRelayFeePerKb
852-
853844 def saveBlockHeader (self , header ):
854845 """
855846 Save the block header to the database.
@@ -861,7 +852,7 @@ def saveBlockHeader(self, header):
861852 self .heightMap [header .height ] = bHash
862853 self .headerDB [bHash ] = header
863854
864- def sendToAddress (self , value , address , keysource , utxosource , feeRate = None ):
855+ def sendToAddress (self , value , address , keysource , utxosource , relayFee ):
865856 """
866857 Send the amount in atoms to the specified address.
867858
@@ -880,7 +871,7 @@ def sendToAddress(self, value, address, keysource, utxosource, feeRate=None):
880871 """
881872 self .updateTip ()
882873 outputs = makeOutputs ([(address , value )], self .netParams )
883- return self .sendOutputs (outputs , keysource , utxosource , feeRate )
874+ return self .sendOutputs (outputs , keysource , utxosource , relayFee )
884875
885876 def broadcast (self , txHex ):
886877 """
@@ -962,7 +953,7 @@ def confirmUTXO(self, utxo, block=None, tx=None):
962953 pass
963954 return False
964955
965- def sendOutputs (self , outputs , keysource , utxosource , feeRate = None ):
956+ def sendOutputs (self , outputs , keysource , utxosource , relayFee ):
966957 """
967958 Send the `TxOut`s to the address.
968959
@@ -998,7 +989,7 @@ def sendOutputs(self, outputs, keysource, utxosource, feeRate=None):
998989 changeScriptVersion = txscript .DefaultScriptVersion
999990 changeScriptSize = txscript .P2PKHPkScriptSize
1000991
1001- relayFeePerKb = feeRate * 1e3 if feeRate else self . relayFee ()
992+ relayFeePerKb = relayFee * 1e3
1002993 for (i , txout ) in enumerate (outputs ):
1003994 checkOutput (txout , relayFeePerKb )
1004995
@@ -1110,7 +1101,7 @@ def sendOutputs(self, outputs, keysource, utxosource, feeRate=None):
11101101
11111102 return newTx , utxos , newUTXOs
11121103
1113- def purchaseTickets (self , keysource , utxosource , req ):
1104+ def purchaseTickets (self , keysource , utxosource , req , relayFee ):
11141105 """
11151106 Based on dcrwallet (*Wallet).purchaseTickets.
11161107 purchaseTickets indicates to the wallet that a ticket should be
@@ -1207,7 +1198,7 @@ def purchaseTickets(self, keysource, utxosource, req):
12071198
12081199 ticketFeeIncrement = req .ticketFee
12091200 if ticketFeeIncrement == 0 :
1210- ticketFeeIncrement = self . relayFee ()
1201+ ticketFeeIncrement = relayFee
12111202
12121203 # Make sure that we have enough funds. Calculate different
12131204 # ticket required amounts depending on whether or not a
@@ -1272,7 +1263,7 @@ def purchaseTickets(self, keysource, utxosource, req):
12721263
12731264 txFeeIncrement = req .txFee
12741265 if txFeeIncrement == 0 :
1275- txFeeIncrement = self . relayFee ()
1266+ txFeeIncrement = relayFee
12761267
12771268 # Send the split transaction.
12781269 # sendOutputs takes the fee rate in atoms/byte
@@ -1373,7 +1364,7 @@ def purchaseTickets(self, keysource, utxosource, req):
13731364 )
13741365 return (splitTx , tickets ), splitSpent , internalOutputs
13751366
1376- def revokeTicket (self , tx , keysource , redeemScript ):
1367+ def revokeTicket (self , tx , keysource , redeemScript , relayFee ):
13771368 """
13781369 Revoke a ticket by signing the supplied redeem script and broadcasting
13791370 the raw transaction.
@@ -1389,7 +1380,7 @@ def revokeTicket(self, tx, keysource, redeemScript):
13891380 MsgTx: the signed revocation.
13901381 """
13911382
1392- revocation = txscript .makeRevocation (tx , self . relayFee () )
1383+ revocation = txscript .makeRevocation (tx , relayFee )
13931384
13941385 signedScript = txscript .signTxOutput (
13951386 self .netParams ,
0 commit comments