Commit Graph

4760 Commits

Author SHA1 Message Date
ThomasV 7b27f01e07 call fsync before rename 2015-05-19 11:56:33 +02:00
ThomasV 5c73bc5bc7 interface: init ping_time with 0 so that the client sends version message 2015-05-19 11:28:30 +02:00
ThomasV 2104e96a66 network: use get_nowait on one of the two queues 2015-05-19 10:22:25 +02:00
ThomasV 107cfc058d Merge pull request #1216 from kyuupichan/network-unthread
No need for thread to handle requests
2015-05-19 10:18:08 +02:00
Neil Booth 63733ccd2a No need for thread to handle requests
Handle requests in the main loop.
Remove unused lock.
interface.py was reworked and send_request() no longer throws.
2015-05-19 14:29:10 +09:00
ThomasV 18032fc4f6 treewidget: keep default label when editing 2015-05-17 12:48:17 +02:00
ThomasV 9bb44e4db3 change mouse cursor over qr code 2015-05-17 09:55:41 +02:00
ThomasV a0e9046c2c prepare for 2.2 release 2015-05-17 09:17:52 +02:00
ThomasV e33bc2473b network: don't store unanswered request if result is in cache 2015-05-17 09:00:36 +02:00
ThomasV 6d0bc5d9b3 fix: nodes retry 2015-05-17 08:41:01 +02:00
ThomasV 44f06de796 network: when interface is disconnected, clear cache and resend unanswered requests 2015-05-15 14:47:59 +02:00
ThomasV e927766698 Merge pull request #1211 from mikeland86/master
Fix createrawtransaction and add missing deserialize() calls
2015-05-13 15:18:03 +02:00
mikeland86 b80205e546 Merge pull request #1 from mikeland86/fix_-createrawtransaction
Fix createrawtransaction and missing deserialize() calls
2015-05-13 14:59:03 +02:00
mikeland86 0ec62c8f36 Fix createrawtransaction and missing deserialize()
Found these issues while trying to create, sign, and broadcast a raw transaction. 

* createrawtransaction was using old signature for Transaction constructor
* Signwithwallet and decoderawtransaction need to call deserialize on tx before they can access inputs and outputs. (Maybe adding getInputs() and getOutputs() which deserializes if needed might be nicer)
2015-05-13 14:57:34 +02:00
ThomasV 5fa2a48343 add getmerkle command 2015-05-12 12:30:26 +02:00
ThomasV 81be685644 remove tests broken after WalletStorage update 2015-05-11 11:59:39 +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
ThomasV 5160f46ca1 fix proxy value in text gui 2015-05-11 08:19:19 +02:00
ThomasV 824e16e0b3 Merge pull request #1210 from venzen/master
gui/text.py curses GUI bug fixes
2015-05-10 22:47:52 +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
venzen 9658ba137f replaced renamed network and wallet attributes self.network.default_server and self.wallet.fee (fixed indentation) 2015-05-10 17:28:02 +07:00
venzen 367315a4de replaced renamed network and wallet attributes self.network.default_server and self.wallet.fee 2015-05-10 17:20:56 +07:00
ThomasV 59a9e4f710 fix new_wallet and seed language 2015-05-10 08:31:31 +02:00
ThomasV a1d1999545 move interfaces maintenance to its own function 2015-05-08 20:13:18 +02:00
ThomasV 30519e7024 fix typo 2015-05-08 20:00:13 +02:00
ThomasV 1cb6c08a13 use get_config instead of passing window to ScanQRTextEdit 2015-05-08 19:58:29 +02:00
ThomasV f2c2f9d738 network: fix confusion between addresses and cached responses 2015-05-08 17:59:33 +02:00
ThomasV 2a92a310ba typo 2015-05-08 17:47:04 +02:00
ThomasV 8c07bdc3bc do not timeout if interface is receiving data 2015-05-08 17:45:59 +02:00
ThomasV 233fd8ed77 revert 175bfae9e6. store last known height in wallet instead 2015-05-08 13:43:42 +02:00
ThomasV 1d517abf39 restore network_proxy.get_local_height 2015-05-08 11:12:19 +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
ThomasV 6035fe974c Merge pull request #1207 from kyuupichan/offline-final
Don't use self.network to get the local height.
2015-05-08 08:09:18 +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
ThomasV 56f855b7ef Merge branch 'kyuupichan-offline-2' 2015-05-08 07:39:24 +02:00
ThomasV e06b3ba3ce Merge branch 'offline-2' of https://github.com/kyuupichan/electrum into kyuupichan-offline-2 2015-05-08 07:32:48 +02:00
ThomasV 60be02dace Merge pull request #1205 from kyuupichan/if-cleanup-final
Fix two races in interface.py.
2015-05-08 07:01:27 +02: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 97b5f6d6a3 Fix two races in interface.py.
First, close the socket from the thread itself rather than from
the stop() function.  This prevents another thread closing the
socket that the interface thread is simultaneously using.

Second, it occasionally would happen that the parent thread such as
network.py start() an interface, do a send_request() and timeout
waiting for a response (timeouts are 0.1s).  It would check
is_connected(), get False, and assume the connection has failed.
In fact the thread hadn't even been scheduled or gotten around to
completing the socket connection.  Fix by having self.connected
start out True.  If the connection fails or times out, we set
connected to False soon enough.

Finally for correctness we need to deepcopy a send_request() rather
than take a reference to it.
2015-05-08 07:32:31 +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
ThomasV 414d0e1fa1 Merge pull request #1202 from kyuupichan/offline-1
Preparation for moving the set of verified and unverified txs to the wallet
2015-05-07 15:25:09 +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 ffda5cd866 Merge pull request #1187 from kyuupichan/local_height
Move away from requiring network and blockchain objects to be able to re...
2015-05-06 17:45:42 +02:00
ThomasV 8656785aa7 fix: use request_time for interface timeout 2015-05-06 17:25:29 +02:00
ThomasV 45fd3ef343 interface: send from same thread and simplify timeouts 2015-05-06 16:42:18 +02:00
ThomasV 78f5dbb72e revert c64e0c0e64 2015-05-06 12:13:21 +02:00
ThomasV 241b3b073f Merge pull request #1198 from kyuupichan/if-cleanup7b
Move response getting to its own function.
2015-05-06 11:28:03 +02:00
Neil Booth 6171779442 Move response getting to its own function.
This makes the operation of run() more clear.
No essential change in functionality.
2015-05-06 14:35:55 +09:00
ThomasV 43b8e202fd replace instances of get_unspent_coins 2015-05-06 07:25:50 +02:00