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

Commit 6e025f2

Browse files
committed
Pylint fixes
1 parent 39d1885 commit 6e025f2

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

market/network.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -954,13 +954,6 @@ def release_funds(self, order_id):
954954
This function should be called to release funds from a disputed contract after
955955
the moderator has resolved the dispute and provided his signature.
956956
"""
957-
def sort_outpoints():
958-
o = []
959-
for s in contract["dispute_resolution"]["resolution"]["tx_signatures"]:
960-
for outpoint in outpoints:
961-
if COutPoint(lx(outpoint["txid"]), outpoint["vout"]).encode("hex") == s["outpoint"]:
962-
o.append(outpoint)
963-
outpoints = o
964957

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

988+
# version 0.2.1 and above ensure same sort order as moderator.
989+
o = []
995990
for s in contract["dispute_resolution"]["resolution"]["tx_signatures"]:
996991
if "outpoint" in s:
997-
sort_outpoints()
998-
break
992+
for outpoint in outpoints:
993+
if COutPoint(lx(outpoint["txid"]), outpoint["vout"]).encode("hex") == s["outpoint"]:
994+
o.append(outpoint)
995+
if len(o) != 0:
996+
outpoints = o
999997
tx = BitcoinTransaction.make_unsigned(outpoints, outputs, testnet=self.protocol.multiplexer.testnet)
1000998
chaincode = contract["buyer_order"]["order"]["payment"]["chaincode"]
1001999
redeem_script = str(contract["buyer_order"]["order"]["payment"]["redeem_script"])

openbazaard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class Parser(object):
213213
def __init__(self, daemon):
214214
self.daemon = daemon
215215
parser = argparse.ArgumentParser(
216-
description='OpenBazaar-Server v0.2.0',
216+
description='OpenBazaar-Server v0.2.1',
217217
usage='''
218218
python openbazaard.py <command> [<args>]
219219
python openbazaard.py <command> --help
@@ -302,6 +302,6 @@ def print_splash_screen():
302302
print "\_______ / __/ \___ >___| /" + OKBLUE + "______ /(____ /_____ \(____ (____ /__|" + ENDC
303303
print " \/|__| \/ \/ " + OKBLUE + " \/ \/ \/ \/ \/" + ENDC
304304
print
305-
print "OpenBazaar Server v0.1 starting..."
305+
print "OpenBazaar Server v0.2.1 starting..."
306306

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

0 commit comments

Comments
 (0)