ThomasV
3ee61c4c6e
define wallet.dummy_address method
2016-02-02 19:56:34 +01:00
ThomasV
eb36884c66
move estimate_fee back to wallet
2016-02-02 12:26:28 +01:00
ThomasV
fe9ec6de06
reformatting
2016-01-26 13:51:47 +01:00
ThomasV
9b09c55356
dynamic fees: use hardcoded value as upper bound
2016-01-25 16:46:50 +01:00
Neil Booth
a0ef42d572
Fix typo causing change address reuse
2016-01-24 11:16:05 +09:00
Neil Booth
efa1efedca
Hardware wallets: limit change outputs to 1
2016-01-23 22:05:08 +09:00
Neil Booth
9729f5b6d3
get_account_addresses: None->all user-visible a/cs
...
Otherwise we can end up sweeping to a non-visible address.
2016-01-23 18:07:02 +09:00
Neil Booth
83a531b3e4
Revert "Sweep keys: don't default to hidden address"
...
This reverts commit 605cc47a3d
.
2016-01-23 17:32:43 +09:00
Neil Booth
605cc47a3d
Sweep keys: don't default to hidden address
...
The issue is electrum uses None as the current account
to mean the default account. This just gave rise to
all addresses being listed including in hidden accounts.
Really "None" as used in main_window.py and history_widget.py
means "a single unspecified account" not "all accounts".
So implement the idea of a default account, and don't let
a hidden account be the default one.
2016-01-23 17:17:10 +09:00
ThomasV
d200b236ae
replace tx.input, tx.output by methods, so that deserialize calls are encapsulated
2016-01-17 15:04:11 +01:00
ThomasV
4f0631d78d
don't use assert is is_xprv (weird kivy bug)
2016-01-16 15:05:29 +01:00
Neil Booth
15707b5590
Coin chooser: use deterministic randomness
2016-01-16 18:55:50 +09:00
ThomasV
3b10bd8307
follow up eb085c2e23
2016-01-15 09:10:04 +01:00
Neil Booth
641f23229d
Add multiple change output preference
...
Limit to 3 if enabled.
2016-01-15 14:54:26 +09:00
ThomasV
0d52911561
define constants for tx output types
2016-01-14 17:15:50 +01:00
ThomasV
da8fce1914
if available, use relayfee from server instead of hard coded value
2016-01-14 16:06:22 +01:00
ThomasV
58fe42cea2
revert commit 4ba4611599
for relicencing
2016-01-12 09:35:45 +01:00
Neil Booth
b120dd8849
Fix root derivation changes for BIP44_Wallets
...
Wallet keys use root_name
Also typo xub -> xpub
2016-01-11 11:39:56 +09:00
ThomasV
c47e3499ce
rename wallet methods
2016-01-10 12:56:15 +01:00
Neil Booth
cda92cd12c
Move cosigner methods to BIP32_RD_Wallet
2016-01-10 20:37:22 +09:00
Neil Booth
637164d335
Introduce BIP32_RD_Wallet
...
Represents a BIP_32 wallet with a root derivation.
This permits us to see address derivation for NewWallet types
in the QT Gui.
2016-01-10 20:20:04 +09:00
Neil Booth
3d781a2d1b
BIP32_HD_Wallet: Fix address derivation
...
Unfortunately there was root_name and root_derivation confusion
in the past for classes derived from BIP_32_HD_Wallet.
Address derivation used root_name and so would begin with 'x/'
whereas it should have begun with root_derivation, and so started
with 'm/'.
This fixes that old wart and removes some fudges from the trezor
code that used to work around it.
2016-01-10 20:06:13 +09:00
Neil Booth
4743f033b4
Fix the backwards-compat 'next_account2' code
2016-01-10 19:26:17 +09:00
Neil Booth
5baa5feb11
Put restore_wallet_class back in the derived classes
2016-01-10 18:41:20 +09:00
Neil Booth
9946feb352
Have BTChipWallet derive from BIP44_Wallet
...
Narrowing the gap with the Trezor code a bit
2016-01-10 17:38:39 +09:00
Neil Booth
81d641a13f
Show BIP32 path for BIP32_HD_Wallet classes
...
from right-click Show Public Keys menu.
Fixes #1598
2016-01-10 14:53:00 +09:00
ThomasV
5915b9b7e1
restore action-driven wizard logic
2016-01-07 00:55:23 +01:00
ThomasV
90a2fc1379
Revert "Fix MultiSig wallet creation."
...
This reverts commit 21038843ea
.
2016-01-07 00:46:34 +01:00
ThomasV
bdb4782b36
Revert "Install wizard multisig improvement"
...
This reverts commit 4e7c6e5d16
.
That commit breaks the separation between make_seed and add_cosigners
2016-01-06 12:01:25 +01:00
Neil Booth
4e7c6e5d16
Install wizard multisig improvement
...
Preserves independence of wizard.py from wallet type;
the dependence is expressed entirely through actions
Fixes #1611
2016-01-06 19:31:12 +09:00
Neil Booth
21038843ea
Fix MultiSig wallet creation.
...
Fixes #1603
2016-01-05 21:22:43 +09:00
ThomasV
bd309cff49
restore default labels
2016-01-04 15:40:57 +01:00
Neil Booth
f3e6bf0280
Passphrase-related fixes
...
Move normalize code to one place on the wallet
Passphrases don't have password strength meter
2016-01-03 09:03:07 +09:00
Neil Booth
21bf5a8a84
Better support for USB devices
...
Benefits of this rewrite include:
- support of disconnecting / reconnecting a device without having
to close the wallet, even in a different USB socket
- support of multiple keepkey / trezor devices, both during wallet
creation and general use
- wallet is watching-only dynamically according to whether the
associated device is currently plugged in or not
2016-01-02 20:39:29 +09:00
Neil Booth
dbf154d5f2
Finish moving the multisig regex to one place
2016-01-02 00:39:44 +09:00
Neil Booth
1d07960290
Remove constructor method of plugins
...
Clean up wallet class loading.
2016-01-02 00:16:15 +09:00
Neil Booth
11d135b32d
Better install wizard
...
Break out the workflow logic of the install wizard
into a base class. This means reimplementing with
full support in a new GUI is now easy; you just provide
ways to request passwords, show messages etc. The API
is fully documented in the base class.
There are a couple of minor outstanding issues, including that
the old messages shown when recovering a wallet are missing.
I will come back to that. Ledger wallet might be broken.
Other improvements:
The install wizard code is now easy to follow and understand.
Hardware wallets can now be restored without any need for their
accompanying libraries.
Various bits of trustedcoin were broken and have been fixed.
Many plugin hooks can be removed. I have only started on this.
2016-01-01 16:48:18 +09:00
Neil Booth
e6dbe621c6
Make class methods static on Wallet
2015-12-31 16:05:05 +09:00
Neil Booth
f263f8b0fd
Convert legacy restored hardware wallets
...
Hardware wallets do not have a seed and hardware wallet
code should not have to worry about that case.
2015-12-31 09:51:27 +09:00
Neil Booth
84450b9189
Revert mistaken commit
2015-12-29 23:16:53 +09:00
Neil Booth
0f70d0b8a5
The constructor() concept doesn't exist
...
Did it ever?
2015-12-29 22:59:25 +09:00
Neil Booth
9d9fcbde64
Proper treatment of restored hardware wallets
...
They have a different wallet type; they require no plugin nor
plugin libraries to use.
Remove pointless public key code that was implemented in the
base classes already.
Partial fix for #1592 . Unfortunately the plugin and library
are still required to actually restore the wallet, but for
no reason that isn't fixable.
2015-12-28 20:24:15 +09:00
Neil Booth
11e1c62f28
Move hardware wallet to trezor/
...
On second thoughts it does go better there.
2015-12-27 18:23:46 +09:00
Neil Booth
669cf74789
Fix trezor restore
...
Broken by my recent changes
2015-12-27 15:38:52 +09:00
Neil Booth
3a1bb5b61a
Combine keepkey and trezor wallet code
...
Essentially identical so silly to have two copies.
Also fix a double-dialog during sign bug that caused one to not
disappear (on MacOSX at least).
2015-12-26 16:25:10 +09:00
Neil Booth
c298860e11
A fix and cleanups for hardware wallets
2015-12-26 12:02:19 +09:00
Neil Booth
a58c19d7c0
Clean up and fix account adding
...
As per BIP44, 20 addresses are checked for transactions, not just the
first one.
Show the last account only if used or named.
If all accounts are used, prompt for password to create new one.
Fixes #1128
2015-12-25 23:34:04 +09:00
Neil Booth
72fdf0cd21
Better error when opening a non-wallet file
...
Also window modality fixes for __init__.py
2015-12-23 13:54:43 +09:00
Neil Booth
e1c0298fc2
Write the wallet less often
...
This should speed up synchronization / restoration of large wallets.
Wallets are written only when they switch to up_to_date state, or
when stop_threads() is called when closing the daemon, or when
a command line command finishes.
2015-12-20 15:47:46 +09:00
Neil Booth
0a3d74de8f
Avoid index-out-of-range
...
Also add sanity assertion
2015-12-20 12:19:44 +09:00
ThomasV
9d3162b1a1
simplify get_label
2015-12-15 12:52:30 +01:00
Neil Booth
06eb3142c4
Oldest First
2015-12-12 19:01:14 +09:00
Neil Booth
52fc739052
Update default chooser name too.
2015-12-12 18:39:03 +09:00
Neil Booth
75b3ecee49
Add coin chooser to try and minimize loss of privacy.
2015-12-09 22:20:23 +09:00
ThomasV
4682d95a76
merge jsonrpc gui and daemon
2015-11-30 10:09:54 +01:00
Neil Booth
9a6dcf7b1e
Use bucketing to choose coins
...
Bucketing is generalization of coin chooser logic that makes it easy
to implement other algorithms.
- Put core coin chooser functionality in base class.
- Specialize derived class to implement classic electrum algorithm of
oldest coins first. One bucket per output.
No intended change in behaviour.
Coin chooser now sorts the coins as it wants; remove redundant sorting
from get_spendable_coins().
2015-11-29 17:59:36 +09:00
Neil Booth
93bb09230c
Track tx size directly; calculate fees from that
...
This has several advantages. Fee calculation is now very fast,
as we don't need to keep reserializing the tx. Another is that
we can reason about the fees after adding a change output without
having to add it, recalculate the tx fee, and remove it again.
2015-11-29 15:40:11 +09:00
Neil Booth
a4dd5acc48
Prepare to calculate tx fee given a tx size
2015-11-29 12:41:54 +09:00
Neil Booth
d97106f17d
Don't keep dust change in any case
2015-11-28 22:27:01 +09:00
Neil Booth
8785b65a1f
Remove need for coin chooser to take a wallet
2015-11-28 22:12:20 +09:00
Neil Booth
a6ea9a0c71
Simplify interface to make_tx in coin chooser
...
Makes the coin chooser code simpler and easier to understand.
2015-11-28 22:08:00 +09:00
Neil Booth
90dee43998
Move estimated_fee to Transaction class
...
It's not a function of the wallet but of the transaction
so it more naturally belongs there.
2015-11-28 21:28:54 +09:00
Neil Booth
e9061ea371
Move coin choosing logic to own class
...
This contains no change in logic, but is preparation for cleanup
and possible alternative strategies.
2015-11-28 14:49:10 +09:00
ThomasV
175fdbcac6
Disentangle plugins and window management; use Qt signals
2015-11-23 09:05:34 +01:00
Neil Booth
0dcaa13d31
Show the wallet path in -v output
2015-11-14 16:14:00 +09:00
ThomasV
ae42576423
Merge branch 'master' of git://github.com/spesmilo/electrum
2015-11-12 14:32:19 +01:00
ThomasV
86a0103a7f
increase min_relay_tx_fee, and make dust_threshold a function
2015-11-12 14:31:17 +01:00
Neil Booth
206e38fb7c
Make use of trigger_callback easier to understand
2015-11-12 16:08:37 +09:00
Neil Booth
8cc3b58364
Allow syncronizer to be GC-ed
...
Proper fix for #1525 .
Using python's GC module, I've verified that the daemon, when running,
now releases all verifiers, synchronizers and wallets - all the resources
we care about releasing.
2015-11-12 08:40:58 +09:00
Neil Booth
d612684196
Attempt at fixing issue 1525
...
The main problem is, I think, that the synchronizer and wallet
still exist in the daemon process, and updates to things like
TXI and TXO are made but never saved (as client exit is what
saves the wallet).
I suspect fixing the lingering objects is hard; this is a short
term fix to ensure that when internal wallet state is updated,
the wallet is written to disk, so later daemon clients pick up
the correct state.
2015-11-11 16:38:28 +09:00
ThomasV
2a3c97813d
wallet.get_max_amount method, used by qt and kivy
2015-10-30 14:10:41 +01:00
ThomasV
079cb311ec
call wallet.wait_until_synchronized before commands
2015-10-29 05:01:06 +01:00
ThomasV
052d8b236e
fix #1494
2015-10-28 10:36:44 +01:00
ThomasV
2a23aab24b
workaround #1513
2015-10-28 07:32:29 +01:00
ThomasV
26682491b2
generic restore from command line
2015-10-27 14:33:41 +01:00
Neil Booth
97568bedf5
Default to unused address for privkey sweeps
...
Fixes #1506
- New function wallet.get_unused_addresses
- Have wallet.get_unused_address use it
- Use it for the sweep key dialog
2015-10-26 20:33:35 +09:00
ThomasV
171363aa86
minor fix (import stat)
2015-10-20 13:57:43 +02:00
ThomasV
a9f451decd
preserve file permissions when saving wallet
2015-10-20 13:52:38 +02:00
Chris Beaven
fc141cba28
Fix KeyErrror typo
2015-10-19 10:42:46 +13:00
ThomasV
fbda9dac79
fix #1479
2015-10-18 12:36:04 +02:00
ThomasV
0fe410d7e6
restore lock in storage.write (follow up to b5e0363f
)
2015-10-01 13:26:22 +02:00
Neil Booth
b5e0363f85
Only save wallet if modified
2015-09-11 14:02:01 +09:00
Neil Booth
f710d872c7
When using labels plugin write wallet once
...
Poor hook coupling would cause the wallet to be written
twice unnecessarily when using the labels plugin and changing
a label
2015-09-10 22:29:25 +09:00
Neil Booth
886192aba7
Make trustedcoin.py multi-window compatible
2015-09-09 17:27:58 +09:00
Neil Booth
39615333c0
Attribute more diagnostic messages
2015-09-06 22:04:44 +09:00
Neil Booth
1171a25815
Genericize plugin handling of thread jobs
...
Move it to the Plugins class so all plugins get it for
free.
2015-09-05 17:21:28 +09:00
Neil Booth
89fbda30e0
Labels plugin now working for multiple windows
2015-09-04 17:38:14 +09:00
ThomasV
9d76bf6828
temporary fix wallet constructors
2015-09-02 14:37:40 +02:00
Neil Booth
7a55d02654
Fix 992c70a688
...
This works for ordinary wallets at least; cannot test hardware.
But after staring for ages I think it's right.
2015-09-02 21:27:12 +09:00
ThomasV
992c70a688
detect available hardware wallets before listing them in wizard
2015-09-02 13:08:06 +02:00
Neil Booth
351272f0b6
Small optimization for large wallets
...
Previously the verifier job would scan all transactions in
unverified_tx each time it ran.
Nothing was ever removed from this map; it would essentially
be the full set of transactions.
As the job runs about 10 times a second, for a wallet with 500 txs
this would be 5,000 useless loops a second.
This patch makes unverified_tx be simply the set of confirmed
transactions that haven't yet been verified. txs are added once
confirmed, and removed once verified. Hence it will almost always be
empty.
2015-08-28 12:39:19 +09:00
Neil Booth
478bde8afa
Access to unverified_tx no longer needs a lock
...
Once the proxy thread jobs are created only they access this,
and they all run under the proxy thread, so there is no contention.
2015-08-28 11:10:50 +09:00
ThomasV
578a83fa30
show error message raised during sign_transaction. see issue #1422
2015-08-27 08:22:02 +02:00
Neil Booth
b64c42b1eb
Make the verifier a thread job instead of a thread
...
The verifier, like the synchronizer, now runs as part of the
network proxy thread.
2015-08-26 17:07:36 +09:00
Neil Booth
01491dd1d0
Have network_proxy use ThreadJob framework
...
Rename WalletSynchronizer to Synchronizer so that diagnostic messages,
which are based on class name, still refer to Synchronizer.
2015-08-26 16:50:40 +09:00
ThomasV
bfae04e6f0
Improved in network callbacks:
...
* Pass arguments
* Don't redraw history when a tx is verified.
* Fix new tx notifications.
2015-08-16 11:36:23 +02:00
ThomasV
e0939348c3
minimize calls to estimated_fee
2015-08-15 12:31:57 +02:00
ThomasV
6232a0b76c
speedup fee computation when collecting small inputs
2015-08-15 10:02:47 +02:00
ThomasV
d69da1ef43
add/remove transaction: remove unused tx_height parameter
2015-08-14 15:30:00 +02:00
ThomasV
6b87256795
sign tx with empty scriptSig inputs
2015-08-07 17:11:42 +02:00
ThomasV
714445aba8
fix: wallet.is_used
2015-08-06 19:19:25 +02:00
ThomasV
43880d452e
dynamic fees
2015-08-05 15:45:28 +02:00
ThomasV
e9f5e6866d
check www dir on daemon start
2015-07-25 12:25:47 +02:00
ThomasV
3da148f406
use local copy of javascript files
2015-07-24 12:36:08 +02:00
ThomasV
41d9c94821
don't add bip70 suffixes
2015-07-22 16:00:08 +02:00
ThomasV
8960b16e09
more sanitization
2015-07-22 15:28:43 +02:00
ThomasV
acbd434f76
cleanup request signing
2015-07-22 09:06:03 +02:00
ThomasV
a6c65b8997
change internal format of requests
2015-07-21 12:26:37 +02:00
ThomasV
380e072842
fix bug with import_key
2015-07-18 11:00:41 +02:00
ThomasV
da55d9ed6e
payment requests: cmdline fixes
2015-07-11 21:09:56 +02:00
ThomasV
cb2bc54f96
store and display signatures of own requests
2015-07-09 14:15:30 +02:00
ThomasV
0368a2cd5e
fix bug from #1281
2015-07-05 18:16:33 +02:00
ThomasV
b0f7411a0a
check and fix history on startup
2015-07-05 17:29:41 +02:00
ThomasV
e2c19ff871
fix #1344
2015-07-05 16:19:44 +02:00
Neil Booth
930304e46b
Remove apparently dead code.
2015-07-03 13:57:42 +09:00
ThomasV
65e7667eba
build reverse history index, to know when a transaction can be removed
2015-07-02 16:07:04 +02:00
ThomasV
ccd07c6a80
Merge branch 'synchronizer-unthread' of https://github.com/kyuupichan/electrum into kyuupichan-synchronizer-unthread
2015-07-02 09:20:51 +02:00
ThomasV
0c37009cdb
fix is_address (forgot p2sh)
2015-07-02 08:53:17 +02:00
Michael Wozniak
523aa7c380
update restore multisig to add type
2015-06-27 16:12:15 -04:00
ThomasV
765ef338ec
fix multisig seed detection
2015-06-27 21:53:55 +02:00
ThomasV
56b3c98332
generic m of n multisig
2015-06-27 12:43:29 +02:00
ThomasV
74d26f5bdc
better error message
2015-06-15 10:52:03 +02:00
ThomasV
00af3b394b
Merge pull request #1280 from kyuupichan/BIP-LI01
...
Implement BIP-LI01.
2015-06-14 08:08:55 +02:00
ThomasV
d09a10e0f7
fix is_used for unmatured tx
2015-06-13 16:40:50 +02:00
ThomasV
10740470cc
fix requests_dir bug
2015-06-12 20:18:06 +02:00
ThomasV
1fbbd5d65d
require network to show request status
2015-06-12 09:58:29 +02:00
ThomasV
317a9de71d
check amount before calling make_payment_request
2015-06-11 12:32:52 +02:00
Neil Booth
e8db8983ec
Make the synchronizer not a thread.
...
The synchronizer's work is done from the network proxy's main loop.
A minor problem with the old synchronizer was that it considered itself
out of date if the network was out of date. This was too generic: the
network can have pending requests unrelated to the synchronizer. This
resulted in the synchronizer often unnecessarily flipping the wallet
between up-to-date and not-up-to-date, and causing unnecessary calls
to wallet.save_transactions(). This was observable when opening the
network dialog box: frequently just opening it would cause a wallet
status change and transaction flush, simply because the network dialog
sends a get_parameters() request. This rework of the synchronizer does
not have that issue.
2015-06-09 08:41:31 +09:00
ThomasV
8995cdbf14
rename fields: 'time' -> 'timestamp', payment_requests
2015-06-08 13:36:35 +02:00
ThomasV
357c405ac6
fix publish_request
2015-06-08 13:21:13 +02:00
ThomasV
9bd94e5062
refactor payment requests
2015-06-08 12:51:45 +02:00
ThomasV
48e53498db
improve requests
2015-06-07 18:44:33 +02:00
Neil Booth
98bea614d8
Implement BIP-LI01.
...
No more need to randomly place change.
2015-06-06 22:25:40 +09:00
ThomasV
ab60da89ac
Add a help group for config variables. Change name of ssl variables
2015-06-03 11:34:52 +02:00
ThomasV
fb6a74e034
fix typo
2015-06-02 16:49:21 +02:00
ThomasV
3188ff05a3
fix is_watching_only
2015-06-02 16:41:32 +02:00
ThomasV
088d8e8415
show request status
2015-06-02 11:36:06 +02:00
ThomasV
2727df962e
requests: store path not url
2015-06-02 09:56:10 +02:00
ThomasV
b9e4825422
fix request_dir variable
2015-06-02 09:37:54 +02:00
ThomasV
d41785c783
save payment requests in requests_dir
2015-06-02 09:18:39 +02:00
ThomasV
0938299e9b
move payment requests logic to wallet, add basic commands
2015-06-01 13:02:09 +02:00
ThomasV
5cd3bfedb6
always pass coins to wallet.make_unsigned_transactions. fix \! shortcut in commands
2015-05-31 11:31:41 +02:00
Neil Booth
320f9a3790
get_spendable_coins and frozen addrs
...
Two callers of get_spendable_coins were removing frozen addrs
before calling. Put that functionality in the function.
We shouldn't be able to send_from a frozen address. This was
possible in the current release because logic assumed a two-element
tuple was returned when it is now three-element. Fix that too.
Command line options listunspent and createrawtransaction currently
ignore frozen addresses. I'm not sure that's right but I've preserved
that behaviour.
With this patch only the wallet class refers to self.frozen_addresses;
other clients use is_frozen() now.
2015-05-31 14:07:50 +09:00
Neil Booth
0f29984f07
Speed up freezing and unfreezing of many addresses
...
Speedup mainly from writing to storage only once.
Make frozen_addresses a set in memory, as sets give cleaner
code and are more efficient.
Minor change in behaviour: command line freezing used to return
False if the address isn't in the wallet OR the address was already
frozen. Now it returns more like a success code: it returns False
only if the address isn't in the wallet regardless of frozen state.
Similarly for unfreezing.
2015-05-31 11:54:21 +09:00
ThomasV
92a158b910
proper handling of arg_types. add more options for listaddresses
2015-05-30 18:49:58 +02:00
Neil Booth
4eaff5678d
Avoid change address reuse if possible
...
As discussed on #electrum yesterday.
Increase change gap limit to 6.
Choose the next unused change address, if any, otherwise pick
one at random from the gap limit.
2015-05-30 17:07:29 +09:00
ThomasV
3195b94f28
Merge pull request #1257 from kyuupichan/update_fee
...
Fix calls to update_fee
2015-05-28 19:34:04 +02:00
ThomasV
9dc8393cf6
move import test to wallet.py
2015-05-28 15:39:26 +02:00
Neil Booth
05cb9975cb
Fix calls to update_fee
...
Fees should be recalculated when send_from changes.
Fees should be recalculated when editing fee preference, but
only save to storage when leaving the fee per kb widget.
No need to emit a textEdited signal; the widget does that already
(with the effect that we used to call update_fee() twice).
2015-05-28 15:52:31 +09:00
ThomasV
dd8493f97e
make coin selection a bit faster
2015-05-27 11:07:57 +02:00
ThomasV
ae957f3736
make_transaction: remove unneeded inputs
2015-05-26 09:09:07 +02:00
ThomasV
89c277de9d
fix pruning error in #1223
2015-05-23 08:45:27 +02:00
ThomasV
4aaa9e24f2
Merge pull request #1234 from kyuupichan/storage-tmpfile
...
Prevent race with two electrum instances on same wallet.
2015-05-23 07:22:12 +02:00
Neil Booth
77490e4764
Flush wallet storage once for a sequence of puts.
...
This speeds up save_transactions by 2 to 3 times for me.
2015-05-23 10:52:10 +09:00
Neil Booth
33a8348d48
Prevent race with two electrum instances on same wallet.
...
Whilst it's not a good idea to have two electrum instances
open on the same wallet, we should avoid throwing an
exception. Also note how the old code's handling of the
exception (caused by both renaming the file almost at the
same time, rather than a non-POSIX system not supporting
the atomic rename) can lead to the wallet file being lost
enirely because os.remove(self.path) succeeds and the
rename of the temporary no-longer-existing file then fails.
2015-05-23 10:24:10 +09:00
ThomasV
7b27f01e07
call fsync before rename
2015-05-19 11:56:33 +02:00
ThomasV
7e9153aaa4
test if labels exist before loop. don't raise if a label cannot be converted
2015-05-11 11:55:26 +02:00
Azelphur
fe5be618db
Convert old latin1 labels, Raise exception if json conversion fails.
...
A couple of changes
1) Old electrum wallets seemed to save labels in latin1, when you call json.dumps on line 83/84 it fails silently, which causes the label import to fail. Whenever electrum saves, it then overwrites your default wallet with no labels - essentially deleting all your labels. The solution to this is iterating over all the labels for old wallets decoding anything that fails to unicode() as latin1, and then unicoding it :)
2) Failing to import data and then deleting it is bad. So I'm raising an exception to avoid data being lost.
2015-05-10 20:28:42 +01:00
ThomasV
59a9e4f710
fix new_wallet and seed language
2015-05-10 08:31:31 +02:00
ThomasV
233fd8ed77
revert 175bfae9e6
. store last known height in wallet instead
2015-05-08 13:43:42 +02:00
ThomasV
c2a4252065
do not pass config to storage. request height from network_proxy if connected
2015-05-08 10:58:54 +02:00
Neil Booth
13b9b577a4
Don't use self.network to get the local height.
...
This restores a working offline mode.
2015-05-08 14:45:23 +09:00
Neil Booth
37c3cce329
Remove wallet.get_transactions()
...
Because references are returned, it's not threadsafe as ThomasV
pointed out.
2015-05-08 09:31:45 +09:00
Neil Booth
a47881d72b
Move the verified and unverified txs to the wallet.
2015-05-07 23:54:39 +09:00
ThomasV
656560be72
show many address labels in tx default label. fixes #1200
2015-05-07 16:09:39 +02:00
Neil Booth
79de458101
Preparation for moving the set of verified and unverified txs to the wallet.
...
The verifier will retain responsibility for verification, but will no longer
hold the transaction sets itself.
Change requires_fee to take a wallet.
Add new function add_unverified_tx()
Move get_confirmations() to the wallet from the verifier.
2015-05-07 09:21:08 +09:00
ThomasV
687cc7783f
show unmatured coins in status bar. fixes #1163
2015-05-05 20:52:14 +02:00
ThomasV
25c6a78ae0
fix missing immport
2015-05-02 16:29:41 +02:00
Neil Booth
2fc38332e7
Make it 3-step instead of four. Avoid quadratic insertions.
...
This is preparation to hopefully fix #1163
2015-05-02 23:17:50 +09:00
ThomasV
75ddc066bb
fix #1181
2015-05-02 11:05:38 +02:00
Neil Booth
db2517b901
Shrink size of changes; functionality unchanged.
2015-04-30 13:32:01 +09:00
Neil Booth
f56413d602
Put title() member func, with localization, in main_window.py
2015-04-28 21:12:25 +09:00
Neil Booth
889174ae19
Show wallet basename in tray tooltip for those of us using multiple wallets
...
Move basename (and title) logic to the wallet and use those member functions.
2015-04-28 19:32:56 +09:00
ThomasV
cb09d88322
fix bug introduced in 21673c95f4
2015-04-24 21:01:34 +02:00
Maran
21673c95f4
Fix wallet write to support windows
2015-04-24 13:14:17 +02:00
ThomasV
4a28c88946
atomic write wallet file
2015-04-23 17:12:02 +02:00
ThomasV
e8189490e9
store contacts in a separate file, shared between wallets
2015-04-23 12:16:46 +02:00
ThomasV
065145e557
get_history: return empty history if balance check fails
2015-04-23 09:49:24 +02:00
ThomasV
524db55b90
don't display hashes or addresses as default labels
2015-04-19 14:30:44 +02:00
ThomasV
eac3129cba
Merge pull request #1135 from Kausheel/get_addr_received
...
Add wallet function get_addr_received()
2015-04-19 13:38:45 +02:00
ThomasV
036f96cf35
store invoices in a separate file, with their status
2015-04-13 14:19:59 +02:00
ThomasV
eb9802356a
fix variable name in from_seed
2015-04-09 18:59:51 +02:00
Kausheel Kumar
8cf793ab98
Add wallet function get_addr_received()
2015-04-09 01:44:44 +10:00
ThomasV
b8a72180c7
HistoryWidget class; address history window
2015-04-04 18:26:52 +02:00
ThomasV
0a7b585b6c
redo default labels with incoming tx outputs
2015-04-04 15:55:28 +02:00
ThomasV
75cf142be0
fix typo
2015-04-03 11:30:36 +02:00
ThomasV
a3422d3fae
generic multisig wallet constructor. fixes #1129
2015-04-03 11:27:57 +02:00
ThomasV
e3e5d95794
fix account key bug
2015-03-31 22:44:00 +02:00
ThomasV
a44f1bc4d3
Merge pull request #1115 from romanz/offline-mode-fix
...
Offline mode fixes
2015-03-31 13:57:27 +02:00
ThomasV
f77311328a
add get_completions to wallet
2015-03-31 12:01:42 +02:00
ThomasV
4d7b68658b
fix delete_contact
2015-03-31 11:29:18 +02:00
Roman Zeyde
a7440fc89c
wallet: skip history sort when verifier is not set
2015-03-31 09:32:21 +03:00
ThomasV
da502076bd
fix get_history
2015-03-30 20:39:06 +02:00
ThomasV
2d84deeaad
sanity check history
2015-03-30 14:10:46 +02:00
ThomasV
ec11e58add
handle pruning in wallet.txi/txo
2015-03-30 14:10:46 +02:00
ThomasV
3d1fa1e27f
find_pay_to_pubkey_address
2015-03-30 14:10:46 +02:00
ThomasV
bc3ed470e1
use hash as default label
2015-03-30 14:10:46 +02:00
ThomasV
e3de121be9
store deserialized tx in/out in wallet file for fast computation
2015-03-30 14:10:46 +02:00
ThomasV
973f7f9fe5
mpk window: detect self and cosigner keys
2015-03-24 17:33:08 +01:00
ThomasV
1369c02011
safeguard: do not let daemon treads write wallet file
2015-03-24 12:23:11 +01:00
ThomasV
a5a7a34c2d
IOError: add file path to exception message
2015-03-15 08:04:02 +01:00
ThomasV
5b8588ee90
rename spv class, use own print_error
2015-03-14 09:20:27 +01:00
ThomasV
72688a5cfa
clean implementation of daemon threads
2015-03-13 23:04:29 +01:00
ThomasV
58f9ab3492
add a lock to wallet.synchronize() and fix #1049
2015-03-13 16:51:31 +01:00
Christopher Gurnee
4ba4611599
check arg type in change_gap_limit()
2015-03-07 12:51:35 -05:00
ThomasV
15636282e4
fix issue #1061 : normalize trezor passphrases. Add passphrases to restore from seed with trezor.
2015-03-05 17:09:39 +01:00
ThomasV
490de0d8ce
fix password bug with xprv wallet
2015-03-04 18:57:28 +01:00
ThomasV
78573e202d
add try..except arount get_next_account
2015-02-27 21:35:50 +01:00
ThomasV
52b43c57b8
android create and restore
2015-02-25 22:48:47 +01:00
ThomasV
18d16ba82c
bugfix: add pubkey to PendingAccount, to be able to spend from it
2015-02-23 19:33:31 +01:00
ThomasV
0934976f3a
fix #1011
2015-02-17 10:30:10 +01:00
ThomasV
76cbafe754
fix Master Public Keys dialog
2015-02-05 13:29:18 +01:00
ThomasV
8982a463a4
allow change_gap_limit in bip32 wallets
2015-02-03 16:26:00 +01:00
ThomasV
036147db44
fix: change_gap_limit
2015-02-03 16:18:42 +01:00
ThomasV
2f7b8ce864
fix wallet.can_sign: use isinstance with BIP32 class
2015-02-03 13:14:35 +01:00
ThomasV
ca01e1d7be
handle 1.9.8 bug that created seed_v6 wallets
2015-02-03 12:20:03 +01:00
ThomasV
0b674eb35d
fix can_sign: detect if OldWallet is used
2015-02-02 16:06:29 +01:00
ThomasV
395312e70f
fix: add wallet types only if available
2015-02-01 10:44:29 +01:00
ThomasV
4ce699bf25
disable key import in all bip32 wallet classes; users should create an ImportedWallet
2015-01-23 13:54:33 +01:00
ThomasV
84fc4574d6
add password when creating imported wallet
2015-01-23 00:06:17 +01:00
ThomasV
8863b6f294
remove remaining instances of op_return type
2015-01-18 17:23:21 +01:00
Charles Lehner
6d2d53b43f
Move root_name to parent class
2015-01-11 13:58:03 -05:00
ThomasV
da968b60e4
drop support for multiple accounts (bip44) in standard wallets
2015-01-05 00:33:10 +01:00
ThomasV
9f9bab6cf0
fix issue #968
2014-12-31 19:21:54 +01:00
ThomasV
63c7a27d7e
add InvalidPassword exception
2014-12-03 22:35:05 +01:00
ThomasV
7ca3ba4e80
various fixes for reveive_requests
2014-11-24 12:28:11 +01:00
ThomasV
f2988b657b
Merge branch 'contacts' of github.com:Tafelpoot/electrum into Tafelpoot-contacts
2014-11-24 11:55:57 +01:00
ThomasV
01cf04079f
add NotEnoughFunds exception
2014-11-20 19:10:43 +01:00
ThomasV
6d8eebe2db
raise exception when seed version does not match
2014-11-15 14:42:35 +01:00
Tafelpoot
218a1ee2f7
Updated Requests
...
- added Date and Account field to Saved Requests
- requests are now saved as dict()
old requests will be deleted!!
- Account field is hidden when only 1 account is available
- address line now follows the current_account
- saved requests is sortable, default sorted by date
- saved requests only shows request for current_account
2014-11-14 19:47:34 +01:00
ThomasV
9b28ed9ba0
do not require name to create an account
2014-11-14 14:08:28 +01:00
ThomasV
c5b47bd513
always store next_account a PendinfAccount is created
2014-11-14 13:48:15 +01:00
Tafelpoot
b6f0f8c02c
Merge branch 'master' of https://github.com/spesmilo/electrum into showaccount
2014-11-05 00:38:02 +01:00
Tafelpoot
5c12c2bc2f
optimized, cleaned up, commented
2014-11-05 00:37:43 +01:00
ThomasV
fb75e2e53d
fix get_private_key_from_xpubkey
2014-11-04 10:50:28 +01:00
ThomasV
e6317ceca1
Merge pull request #909 from Tafelpoot/showaccount
...
add account info for internal transfer description
2014-10-31 15:01:22 +01:00
ThomasV
16f36ee6e2
Extend transaction serialization, format to handle unsigned inputs where only the address is known, the public key is unknown.
2014-10-31 13:01:16 +01:00
Tafelpoot
b3684ad40a
add account info for internal transfer description
2014-10-30 17:56:36 +01:00
ThomasV
581ed1ed26
separate signtxwithkey and signtxwithwallet, and simplify sign_transaction
2014-10-30 16:36:29 +01:00
ThomasV
cf1fbbf3ad
fix is_watching_only for imported wallets
2014-10-27 15:47:10 +01:00
ThomasV
063fc4bb2e
fix #895
2014-10-24 18:50:57 +02:00
Tafelpoot
d9c5250a6f
removed trailing whitespace and fixed indentation in history widget
2014-10-21 19:05:51 +02:00
ThomasV
590659ff4d
get_tx_fee
2014-09-15 12:57:56 +02:00
ThomasV
bde0ca3ea1
set default fee to 0.5mBTC/kb
2014-09-15 07:35:05 +02:00
ThomasV
8d396997dc
fee estimate: kilobyte
2014-09-14 21:58:13 +02:00
ThomasV
ad4449dc38
add v9 to list of tagged versions
2014-09-13 19:37:42 +02:00
ThomasV
1df007483e
check seed_version first
2014-09-13 19:28:09 +02:00
ThomasV
5c5bb6ae3a
make estimated fee higher than MIN_RELAY
2014-09-13 15:25:26 +02:00
ThomasV
5f4bcb420b
param to addresses is optional
2014-09-13 14:54:02 +02:00
ThomasV
b22048fdfb
fix wallet constructor
2014-09-13 10:16:09 +02:00