Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacia committed Jun 4, 2016
1 parent 39d1885 commit 6e025f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions market/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,13 +954,6 @@ def release_funds(self, order_id):
This function should be called to release funds from a disputed contract after
the moderator has resolved the dispute and provided his signature.
"""
def sort_outpoints():
o = []
for s in contract["dispute_resolution"]["resolution"]["tx_signatures"]:
for outpoint in outpoints:
if COutPoint(lx(outpoint["txid"]), outpoint["vout"]).encode("hex") == s["outpoint"]:
o.append(outpoint)
outpoints = o

if os.path.exists(os.path.join(DATA_FOLDER, "purchases", "in progress", order_id + ".json")):
file_path = os.path.join(DATA_FOLDER, "purchases", "in progress", order_id + ".json")
Expand Down Expand Up @@ -992,10 +985,15 @@ def sort_outpoints():
["resolution"]["vendor_payout"]) * 100000000)),
'address': vendor_address})

# version 0.2.1 and above ensure same sort order as moderator.
o = []
for s in contract["dispute_resolution"]["resolution"]["tx_signatures"]:
if "outpoint" in s:
sort_outpoints()
break
for outpoint in outpoints:
if COutPoint(lx(outpoint["txid"]), outpoint["vout"]).encode("hex") == s["outpoint"]:
o.append(outpoint)
if len(o) != 0:
outpoints = o
tx = BitcoinTransaction.make_unsigned(outpoints, outputs, testnet=self.protocol.multiplexer.testnet)
chaincode = contract["buyer_order"]["order"]["payment"]["chaincode"]
redeem_script = str(contract["buyer_order"]["order"]["payment"]["redeem_script"])
Expand Down
4 changes: 2 additions & 2 deletions openbazaard.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class Parser(object):
def __init__(self, daemon):
self.daemon = daemon
parser = argparse.ArgumentParser(
description='OpenBazaar-Server v0.2.0',
description='OpenBazaar-Server v0.2.1',
usage='''
python openbazaard.py <command> [<args>]
python openbazaard.py <command> --help
Expand Down Expand Up @@ -302,6 +302,6 @@ def print_splash_screen():
print "\_______ / __/ \___ >___| /" + OKBLUE + "______ /(____ /_____ \(____ (____ /__|" + ENDC
print " \/|__| \/ \/ " + OKBLUE + " \/ \/ \/ \/ \/" + ENDC
print
print "OpenBazaar Server v0.1 starting..."
print "OpenBazaar Server v0.2.1 starting..."

Parser(OpenBazaard('/tmp/openbazaard.pid'))

0 comments on commit 6e025f2

Please sign in to comment.