diff --git a/MANIFEST.in b/MANIFEST.in index d1d93bb12..4fa5491a6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ -include README LICENCE RELEASE-NOTES AUTHORS +include LICENCE RELEASE-NOTES AUTHORS +include README.rst include electrum.conf.sample include electrum.desktop include *.py @@ -12,4 +13,4 @@ include app.fil include icons.qrc recursive-include icons * recursive-include scripts * -recursive-include docs * + diff --git a/RELEASE-NOTES b/RELEASE-NOTES index cfa6f5870..0d7b9b1f8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,3 +1,10 @@ +# Release 2.5.1 (bugfixes) + * signatures in transactions were still using the old class + * make sure that setup.py uses python2 + * fix wizard crash with trustedcoin plugin + * fix socket infinite loop + * fix history bug #1479 + # Release 2.5 * Low-S values are used in signatures (BIP 62). * The Kivy GUI has been merged into master. diff --git a/gui/qt/themes/README b/gui/qt/themes/README deleted file mode 100644 index 03254ac68..000000000 --- a/gui/qt/themes/README +++ /dev/null @@ -1,12 +0,0 @@ -To add a new theme, simply create a new directory in the electrum data directory (either ./data or your system wide local data). - -Inside your directory create a file called name.cfg with the name of that theme. - -Create another file called style.css - this will be your CSS for the theme (see other themes for reference). - -Documentation on Qt's stylesheets (used by Electrum): - -Overview: http://qt-project.org/doc/qt-4.8/stylesheet.html -Examples: http://qt-project.org/doc/qt-4.8/stylesheet-examples.html -Reference manual: http://doc.qt.nokia.com/4.7-snapshot/stylesheet-reference.html - diff --git a/gui/qt/themes/cleanlook/name.cfg b/gui/qt/themes/cleanlook/name.cfg deleted file mode 100644 index 475ba47b4..000000000 --- a/gui/qt/themes/cleanlook/name.cfg +++ /dev/null @@ -1 +0,0 @@ -Cleanlook diff --git a/gui/qt/themes/cleanlook/style.css b/gui/qt/themes/cleanlook/style.css deleted file mode 100644 index 888cbcf95..000000000 --- a/gui/qt/themes/cleanlook/style.css +++ /dev/null @@ -1,62 +0,0 @@ -#main_window -{ - background: qlineargradient(x1: 0, y1: 0, x2:0,y2:1, stop: 0 white , stop: 1 #E8E8E8); -} - -MiniWindow QPushButton { - color: #777; - border: 1px solid #CCC; - border-radius: 0px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 white, stop: 1 #E6E6E6); - min-height: 30px; - min-width: 30px; -} - -#send_button{ - color: #FFF; - border: 1px solid #3786E6; - border-radius: 4px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #72B2F8, stop: 1 #3484E6); - padding: 2px; - width: 20px; -} - -#send_button:disabled{ - color: #D3E8FE; - border: 1px solid #6DAEF7; - border-radius: 4px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #A5CFFA, stop: 1 #72B2F8); -} -#address_input, #amount_input, #label_input -{ - color: #000; - padding: 5px; - border-radius: 5px; - min-height: 23px; - border: 1px solid #AAA9A9; - width: 200px; -} - -#address_input[isValid=true] -{ - color: #4D9948; -} - -#address_input[isValid=false] -{ - color: #CE4141; -} - -#balance_label -{ - color: #333; -} - -#history -{ - color: #888; -} - diff --git a/gui/qt/themes/dark/name.cfg b/gui/qt/themes/dark/name.cfg deleted file mode 100644 index 4030549b1..000000000 --- a/gui/qt/themes/dark/name.cfg +++ /dev/null @@ -1 +0,0 @@ -Dark diff --git a/gui/qt/themes/dark/style.css b/gui/qt/themes/dark/style.css deleted file mode 100644 index c4554e637..000000000 --- a/gui/qt/themes/dark/style.css +++ /dev/null @@ -1,35 +0,0 @@ -#main_window -{ - background-image: url(:/icons/dark_background.png); -} - -#address_input[readOnly=true], #amount_input[readOnly=true] -{ - font: italic; - color: gray; -} -#address_input[readOnly=false], #amount_input[readOnly=false] -{ - font: normal; - color: black; -} - -#valid_address::indicator -{ - width: 24px; - height: 24px; -} -#valid_address::indicator:checked -{ - image: url(confirmed.png); -} -#valid_address::indicator:unchecked -{ - image: url(unconfirmed.png); -} - -#balance_label -{ - color: white; -} - diff --git a/gui/qt/themes/sahara/name.cfg b/gui/qt/themes/sahara/name.cfg deleted file mode 100644 index da4844db7..000000000 --- a/gui/qt/themes/sahara/name.cfg +++ /dev/null @@ -1 +0,0 @@ -Sahara diff --git a/gui/qt/themes/sahara/style.css b/gui/qt/themes/sahara/style.css deleted file mode 100644 index cd8d72728..000000000 --- a/gui/qt/themes/sahara/style.css +++ /dev/null @@ -1,102 +0,0 @@ -#main_window -{ - background: qlineargradient(x1: 0, y1: 0, x2:0,y2:1, stop: 0 white , stop: 1 #F2E3BE); -} - -MiniWindow QPushButton { - color: #C1A76D; - border: 1px solid #A7811C; - border-radius: 0px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 white, stop: 1 #F2E3BE); - min-height: 25px; - min-width: 30px; -} - -#send_button{ - color: #FEEBA7; - border: 1px solid #AD8B35; - border-radius: 4px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #E0A035, stop: 1 #AD8B35); - min-width: 80px; - min-height: 23px; - padding: 2px; -} - -#send_button:disabled{ - color: #FEEDD3; - border: 1px solid #F7D46D; - border-radius: 4px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #FAEEA5, stop: 1 #DBC050); - min-width: 80px; - min-height: 23px; - padding: 2px; -} - -#receive_button -{ - color: #FEEBA7; - border: 1px solid #AD8B35; - border-radius: 4px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #E0A035, stop: 1 #AD8B35); - min-height: 25px; - min-width: 30px; -} -#receive_button[isActive=true] -{ - color: #FEEBA7; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #E0A035, stop: 1 #987620); -} - -#address_input, #amount_input -{ - color: #000; - padding: 5px; - border-radius: 4px; - border: 1px solid #CBAE69; - width: 225px; -} - -#address_input[isValid=true] -{ - color: #4D9948; - padding: 5px; - border-radius: 4px; - border: 1px solid #CBAE69; - width: 225px; - margin-top: 4px; -} - -#address_input[isValid=false] -{ - color: #CE4141; - padding: 5px; - border-radius: 4px; - border: 1px solid #CBAE69; - width: 225px; - margin-top: 4px; -} - -#address_input[isValid=placeholder] -{ - color: #DEC58D; - padding: 5px; - border-radius: 4px; - border: 1px solid #CBAE69; - width: 225px; - margin-top: 4px; -} -#balance_label -{ - color: #7E5907; -} - -#history -{ - color: #8B6914; -} - diff --git a/lib/transaction.py b/lib/transaction.py index 42b51f2f0..fa4636f84 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -745,7 +745,7 @@ class Transaction: for_sig = Hash(self.tx_for_sig(i).decode('hex')) pkey = regenerate_key(sec) secexp = pkey.secret - private_key = ecdsa.SigningKey.from_secret_exponent( secexp, curve = SECP256k1 ) + private_key = bitcoin.MySigningKey.from_secret_exponent( secexp, curve = SECP256k1 ) public_key = private_key.get_verifying_key() sig = private_key.sign_digest_deterministic( for_sig, hashfunc=hashlib.sha256, sigencode = ecdsa.util.sigencode_der ) assert public_key.verify_digest( sig, for_sig, sigdecode = ecdsa.util.sigdecode_der) diff --git a/lib/version.py b/lib/version.py index c72e156a5..887effa59 100644 --- a/lib/version.py +++ b/lib/version.py @@ -1,4 +1,4 @@ -ELECTRUM_VERSION = '2.5' # version of the client package +ELECTRUM_VERSION = '2.5.1' # version of the client package PROTOCOL_VERSION = '0.10' # protocol version requested NEW_SEED_VERSION = 11 # electrum versions >= 2.0 OLD_SEED_VERSION = 4 # electrum versions < 2.0 diff --git a/lib/wallet.py b/lib/wallet.py index 096bf2584..88a83ede9 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -769,9 +769,11 @@ class Abstract_Wallet(PrintError): dd.pop(addr) else: dd[addr] = l - self.txi.pop(tx_hash) - self.txo.pop(tx_hash) - + try: + self.txi.pop(tx_hash) + self.txo.pop(tx_hash) + except KeyError: + self.print_error("tx was not in history", tx_hash) def receive_tx_callback(self, tx_hash, tx, tx_height): self.add_transaction(tx_hash, tx) diff --git a/lib/websockets.py b/lib/websockets.py index 8014ef25c..65c9ded9b 100644 --- a/lib/websockets.py +++ b/lib/websockets.py @@ -21,8 +21,8 @@ from collections import defaultdict try: from SimpleWebSocketServer import WebSocket, SimpleSSLWebSocketServer except ImportError: - print "install SimpleWebSocketServer" - sys.exit() + import sys + sys.exit("install SimpleWebSocketServer") import util @@ -93,7 +93,7 @@ class WsClientThread(util.DaemonThread): except Queue.Empty: continue id = r.get('id') - if id is None: + if id is None: method = r.get('method') params = r.get('params') else: diff --git a/setup.py b/setup.py index 8ad670c35..7e0021732 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # python setup.py sdist --format=zip,gztar @@ -8,23 +8,20 @@ import sys import platform import imp - version = imp.load_source('version', 'lib/version.py') if sys.version_info[:3] < (2, 7, 0): sys.exit("Error: Electrum requires Python version >= 2.7.0...") - - data_files = [] -if platform.system() in [ 'Linux', 'FreeBSD', 'DragonFly']: + +if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']: usr_share = os.path.join(sys.prefix, "share") data_files += [ (os.path.join(usr_share, 'applications/'), ['electrum.desktop']), (os.path.join(usr_share, 'pixmaps/'), ['icons/electrum.png']) ] - setup( name="Electrum", version=version.ELECTRUM_VERSION, @@ -48,14 +45,6 @@ setup( 'www/index.html', 'wordlist/*.txt', 'locale/*/LC_MESSAGES/electrum.mo', - ], - 'electrum_gui': [ - "qt/themes/cleanlook/name.cfg", - "qt/themes/cleanlook/style.css", - "qt/themes/sahara/name.cfg", - "qt/themes/sahara/style.css", - "qt/themes/dark/name.cfg", - "qt/themes/dark/style.css", ] }, scripts=['electrum'],