minor linting

This commit is contained in:
James Prestwich 2017-09-13 09:35:31 -06:00
parent 4cf2a6b393
commit f65641a2c7
No known key found for this signature in database
GPG Key ID: 519E010A79028CCC
3 changed files with 9 additions and 9 deletions

View File

@ -21,7 +21,7 @@ if sys.version_info.major < 3:
sys.stderr.write('Sorry, Python 3.x required by this example.\n')
sys.exit(1)
FEE = 0.001*COIN
FEE = 0.001 * COIN
class bitcoinProxy():
@ -117,13 +117,13 @@ class bitcoinProxy():
self.bitcoind.importaddress(p2sh, "", False)
# Get amount in address
amount = self.bitcoind.getreceivedbyaddress(p2sh, 0)
amount = amount/COIN
amount = amount / COIN
return amount
def get_fund_status(self, p2sh):
self.bitcoind.importaddress(p2sh, "", False)
amount = self.bitcoind.getreceivedbyaddress(p2sh, 0)
amount = amount/COIN
amount = amount / COIN
print("Amount in bitcoin p2sh: ", amount, p2sh)
if amount > 0:
return 'funded'

View File

@ -87,8 +87,8 @@ def authorize_buyer_fulfill(sell_p2sh_balance, sell_currency,
"in {1}.".format(sell_p2sh_balance, sell_currency))
input("You have not send funds to the contract to buy {1} "
"(requested amount: {0}), type 'enter' to allow this program "
"to send the agreed upon funds on your behalf.".format(
buy_p2sh_balance, buy_currency))
"to send the agreed upon funds on your behalf"
".".format(buy_p2sh_balance, buy_currency))
def authorize_seller_redeem(buy):

View File

@ -21,7 +21,7 @@ if sys.version_info.major < 3:
sys.stderr.write('Sorry, Python 3.x required by this example.\n')
sys.exit(1)
FEE = 0.001*COIN
FEE = 0.001 * COIN
class zcashProxy():
@ -80,7 +80,7 @@ class zcashProxy():
'locktime': locktime}
def fund_htlc(self, p2sh, amount):
send_amount = float(amount)*COIN
send_amount = float(amount) * COIN
# Import addr at same time as you fund
self.zcashd.importaddress(p2sh, "", False)
fund_txid = self.zcashd.sendtoaddress(p2sh, send_amount)
@ -92,13 +92,13 @@ class zcashProxy():
self.zcashd.importaddress(p2sh, "", False)
# Get amount in address
amount = self.zcashd.getreceivedbyaddress(p2sh, 0)
amount = amount/COIN
amount = amount / COIN
return amount
def get_fund_status(self, p2sh):
self.zcashd.importaddress(p2sh, "", False)
amount = self.zcashd.getreceivedbyaddress(p2sh, 0)
amount = amount/COIN
amount = amount / COIN
print("Amount in zcash p2sh: ", amount, p2sh)
if amount > 0:
return 'funded'