Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
pooler committed Dec 7, 2017
2 parents ca328d0 + 2951ed5 commit 0330501
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
20 changes: 15 additions & 5 deletions contrib/build-wine/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
Windows Binary Builds
=====================


These scripts can be used for cross-compilation of Windows Electrum executables from Linux/Wine.
Produced binaries are deterministic so you should be able to generate binaries that match the official releases.


Usage:
1. Install Wine 2, e.g.


1. Install the following dependencies:

- dirmngr
- gpg
- Wine (>= v2)


For example:


```
$ sudo apt-get install wine-development
$ sudo apt-get install wine-development dirmngr gnupg2
$ sudo ln -sf /usr/bin/wine-development /usr/local/bin/wine
$ wine --version
wine-2.0 (Debian 2.0-3+b2)
Expand All @@ -18,11 +28,11 @@ $ wine --version
or

```
$ pacman -S wine
$ pacman -S wine gnupg
$ wine --version
wine-2.21
```

2. Make sure `/opt` is writable by the current user.
3. Run `build.sh`.
4. The generated binaries are in `dist`.
4. The generated binaries are in `./dist`.
4 changes: 2 additions & 2 deletions lib/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from .import bitcoin
from .bitcoin import is_address, hash_160, COIN, TYPE_ADDRESS
from .i18n import _
from .transaction import Transaction
from .transaction import Transaction, multisig_script
from .paymentrequest import PR_PAID, PR_UNPAID, PR_UNKNOWN, PR_EXPIRED
from .plugins import run_hook

Expand Down Expand Up @@ -256,7 +256,7 @@ def broadcast(self, tx, timeout=30):
def createmultisig(self, num, pubkeys):
"""Create multisig address"""
assert isinstance(pubkeys, list), (type(num), type(pubkeys))
redeem_script = Transaction.multisig_script(pubkeys, num)
redeem_script = multisig_script(pubkeys, num)
address = bitcoin.hash160_to_p2sh(hash_160(bfh(redeem_script)))
return {'address':address, 'redeemScript':redeem_script}

Expand Down
4 changes: 2 additions & 2 deletions lib/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,9 +631,9 @@ def estimate_pubkey_size_from_x_pubkey(cls, x_pubkey):
def estimate_pubkey_size_for_txin(cls, txin):
pubkeys = txin.get('pubkeys', [])
x_pubkeys = txin.get('x_pubkeys', [])
if len(pubkeys) > 0:
if pubkeys and len(pubkeys) > 0:
return cls.estimate_pubkey_size_from_x_pubkey(pubkeys[0])
elif len(x_pubkeys) > 0:
elif x_pubkeys and len(x_pubkeys) > 0:
return cls.estimate_pubkey_size_from_x_pubkey(x_pubkeys[0])
else:
return 0x21 # just guess it is compressed
Expand Down
1 change: 1 addition & 0 deletions plugins/digitalbitbox/cmdline.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from electrum_ltc.plugins import hook
from .digitalbitbox import DigitalBitboxPlugin
from ..hw_wallet import CmdLineHandler

Expand Down
2 changes: 1 addition & 1 deletion plugins/hw_wallet/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def yes_no_question(self, msg):
def stop(self):
pass

def show_message(self, msg, on_cancel):
def show_message(self, msg, on_cancel=None):
print_msg(msg)

def update_status(self, b):
Expand Down

0 comments on commit 0330501

Please sign in to comment.