Skip to content

Commit ee6a12e

Browse files
committed
Merge petertodd#89: Adds sendtoaddress options comments, subtractfeefromamount
bd200a0 Adds subtractfeefromamount to sendmany and sendtoaddress calls (ddrager)
2 parents 23a7de3 + bd200a0 commit ee6a12e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bitcoin/rpc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,18 +545,18 @@ def sendrawtransaction(self, tx, allowhighfees=False):
545545
r = self._call('sendrawtransaction', hextx)
546546
return lx(r)
547547

548-
def sendmany(self, fromaccount, payments, minconf=1, comment=''):
548+
def sendmany(self, fromaccount, payments, minconf=1, comment='', subtractfeefromamount=False):
549549
"""Sent amount to a given address"""
550550
json_payments = {str(addr):float(amount)/COIN
551551
for addr, amount in payments.items()}
552-
r = self._call('sendmany', fromaccount, json_payments, minconf, comment)
552+
r = self._call('sendmany', fromaccount, json_payments, minconf, comment, subtractfeefromamount)
553553
return lx(r)
554554

555-
def sendtoaddress(self, addr, amount):
555+
def sendtoaddress(self, addr, amount, comment='', commentto='', subtractfeefromamount=False):
556556
"""Sent amount to a given address"""
557557
addr = str(addr)
558558
amount = float(amount)/COIN
559-
r = self._call('sendtoaddress', addr, amount)
559+
r = self._call('sendtoaddress', addr, amount, comment, commentto, subtractfeefromamount)
560560
return lx(r)
561561

562562
def signrawtransaction(self, tx, *args):

0 commit comments

Comments
 (0)