Commit Graph

1032 Commits

Author SHA1 Message Date
Pieter Wuille f8dcd5ca6f Use scoped locks instead of CRITICAL_BLOCK 2012-04-09 01:59:46 +02:00
Luke Dashjr fa2544e79f Bugfix: Replace "URL" with "URI" where we aren't actually working with URLs 2012-04-06 12:53:37 -04:00
Wladimir J. van der Laan 3e34352222 Show error message instead of exception crash when unable to bind RPC port
Fixes issue #875
2012-04-06 18:41:23 +02:00
Philip Kaufmann 42c63d3ad2 fixed small error in bitcoinrpc.cpp 2012-04-06 15:31:28 +02:00
Philip Kaufmann 36949554ab updated util.cpp to use make_preferred() 2012-04-06 15:29:20 +02:00
Philip Kaufmann 93fb7489a7 updated bitcoinrpc.cpp to use make_preferred() and removed double inclusion of boost/filesystem.hpp 2012-04-06 15:29:19 +02:00
Philip Kaufmann 9c24588e73 updated db.cpp to use make_preferred() 2012-04-06 15:29:18 +02:00
Pieter Wuille 9362da78b0 Merge pull request #1033 from sipa/wait
Condition variables instead of polling
2012-04-06 04:11:14 -07:00
graingert f9781fc62e Change sign message bitcoin address tooltip to "The address to sign the message with" Closes #1050 2012-04-06 04:08:16 +02:00
Pieter Wuille e88ed65a39 Flush on log size instead of transaction count 2012-04-05 20:29:47 +02:00
Gavin Andresen 399ff1fe05 Merge pull request #1043 from Diapolo/misc
removed obsolete boost workaround (boost ticket #4258)
2012-04-05 07:36:23 -07:00
Gavin Andresen 895c12943b Merge pull request #1042 from gavinandresen/use_ssl_cleanup
Remove USE_SSL #define
2012-04-05 07:34:45 -07:00
Gavin Andresen ea2cc8fc4a Merge pull request #1037 from gavinandresen/addmultisigenable
Enable addmultisigaddress RPC call for main network
2012-04-05 07:34:19 -07:00
Gavin Andresen c7fa55bb87 Merge pull request #1036 from gavinandresen/pubsubcleanup
Remove half-implemented publish/subscribe system
2012-04-05 07:33:54 -07:00
Gavin Andresen 78494ffecc Merge pull request #1035 from gavinandresen/osxbuild
Add ifdef RELEASE to makefile.osx as the compile-for-older-macs flags
2012-04-05 07:33:00 -07:00
Gregory Maxwell 4a8d0f3b10 Merge pull request #1039 from sipa/fix_955
Fix #955: Verify status of encrypt/decrypt calls to detect failed padding
2012-04-05 06:17:05 -07:00
Philip Kaufmann 7f10522c43 removed obsolete boost workaround (boost ticket #4258) 2012-04-05 08:34:31 +02:00
Gavin Andresen 5ce4c2a23a Remove USE_SSL #define 2012-04-04 21:19:27 -04:00
Gavin Andresen 723cafcbcf Bug fix listtransactions from/count handling. 2012-04-04 20:56:13 -04:00
Pieter Wuille e5c027b49b Verify status of encrypt/decrypt calls to detect failed padding 2012-04-05 02:07:53 +02:00
Philip Kaufmann fc42e9fae2 removed an unused / obsolete tag from bitcoin.qrc 2012-04-05 00:11:22 +02:00
Gavin Andresen ea8c55cfd7 Enable addmultisigaddress RPC call for main network 2012-04-04 16:01:27 -04:00
Gavin Andresen f487746ded Remove half-implemented publish/subscribe system 2012-04-04 15:56:00 -04:00
Gavin Andresen 3a8ca61bd0 Add ifdef RELEASE to makefile.osx as the compile-for-older-macs flags 2012-04-04 15:45:31 -04:00
Pieter Wuille 092631f0ba Condition variable for outbound connection slots
Keep a global counter for nOutbound, protected with its own waitable
critical section, and wait when all outbound slots are filled, rather
than polling.

This removes the (on average) 1 second delay between a lost connection
and a new connection attempt, and may speed up shutdowns.
2012-04-04 17:24:13 +02:00
Pieter Wuille 712fd182b7 Locking system overhaul, add condition variables
This commit simplifies the locking system: CCriticalSection becomes a
simple typedef for boost::interprocess::interprocess_recursive_mutex,
and CCriticalBlock and CTryCriticalBlock are replaced by a templated
CMutexLock, which wraps boost::interprocess::scoped_lock.

By making the lock type a template parameter, some critical sections
can now be changed to non-recursive locks, which support waiting via
condition variables. These are implemented in CWaitableCriticalSection
and WAITABLE_CRITICAL_BLOCK.

CWaitableCriticalSection is a wrapper for a different Boost mutex,
which supports waiting/notification via condition variables. This
should enable us to remove much of the used polling code. Important
is that this mutex is not recursive, so functions that perform the
locking must not call eachother.

Because boost::interprocess::scoped_lock does not support assigning
and copying, I had to revert to the older CRITICAL_BLOCK macros that
use a nested for loop instead of a simple if.
2012-04-04 16:21:08 +02:00
Pieter Wuille b0a7e05a45 Merge pull request #1019 from laanwj/2012_03_uirefactor
Streamline UI ↔ Core interface
2012-04-04 05:03:07 -07:00
Wladimir J. van der Laan cadae3588c Merge pull request #1025 from Diapolo/GUI-BlockDL
modified block DL progressbar to be more informative and precise
2012-04-04 04:36:09 -07:00
Wladimir J. van der Laan 5cccb13dad Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon. 2012-04-04 13:19:30 +02:00
Wladimir J. van der Laan 5a60b66a9d Use a messagebox to display the error when -server is provided without providing a rpc password 2012-04-04 09:37:26 +02:00
Wladimir J. van der Laan 7cfbe1fee4 qtui.h/noui.h interface cleanup
- rename wxMessageBox, remove redundant arguments to noui/qtui calls
- also, add flag to force blocking, modal dialog box for disk space warning etc
- clarify function naming
- no more special MessageBox needed from AppInit2, as window object is created before calling AppInit2
2012-04-04 09:37:25 +02:00
Wladimir J. van der Laan 1a3f0da922 support RPC stop and encryptwallet with UI 2012-04-04 09:35:01 +02:00
Wladimir J. van der Laan 5d7cebdadc move translation function _ to qtui.h/noui.h instead of util.h 2012-04-04 09:35:01 +02:00
Wladimir J. van der Laan 6cb6d62347 remove dependency on serialize.h and util.h for SecureString 2012-04-04 09:35:01 +02:00
Wladimir J. van der Laan f0b5e9e116 remove unused CalledSetStatusBar and UIThreadCall notifications 2012-04-04 09:35:01 +02:00
Wladimir J. van der Laan 98e6175874 Update UI through async calls MainFrameRepaint and AddressBookRepaint instead of a timer.
- Overall, this is better design
- This fixes problems with the address book UI not updating when the address book is changed through RPC
- Move Statusbar change detection responsibility to ClientModel
2012-04-04 09:35:01 +02:00
Wladimir J. van der Laan 7e7bcce2d9 Code deduplication: make function in GUIUtil to get connection type to call object slot in GUI thread
with invokeMethod.
2012-04-04 08:46:12 +02:00
Wladimir J. van der Laan 55f69a4700 move QT_PLUGINS stuff to qt main file, where it belongs 2012-04-04 08:46:12 +02:00
Wladimir J. van der Laan 52d3a48128 VC2010 compile fixes 2012-04-03 20:22:41 +02:00
Philip Kaufmann 853a4a81b3 clarified comment why we use an own progressbar style / included "~" in the tr() call 2012-04-03 09:42:34 +02:00
Philip Kaufmann ec9a4904f3 changed percentage done in tooltip to float to be more precise / allowed plurals in translation for "x block(s) remaining" 2012-04-03 08:30:13 +02:00
Gregory Maxwell 3263a245bb Merge pull request #1026 from laanwj/2012_04_increase_up_to_date_time
Increase time ago of last block for "up to date" status from 30 to 90 minutes
2012-04-02 20:35:44 -07:00
Philip Kaufmann a7a69cd07a polished code and fixed progress display (was very jerky at the end of a sync) 2012-04-02 23:51:40 +02:00
Philip Kaufmann e9de46c436 color update for progress bar 2012-04-02 23:48:24 +02:00
Philip Kaufmann c7c0c93172 implemented OS independent progress bar style / moved one-time functions used on the bar to a better code location 2012-04-02 23:48:23 +02:00
Philip Kaufmann 5519660a0d changed progressbar text to "~n blocks remaining" 2012-04-02 23:48:22 +02:00
Philip Kaufmann 068ed1e838 removed relative progressbar display and moved re-worked network detection code to setNumBlocks() 2012-04-02 23:48:22 +02:00
Philip Kaufmann 9ceae8acea modified block DL progressbar to be dynamic and more precise 2012-04-02 23:48:21 +02:00
Wladimir J. van der Laan 2675fe6218 Increase time ago of last block for "up to date" status from 30 to 90 minutes
It was too hyperactive.
gmaxwell: I mean that right now when the block gap goes over an hour it starts showing synchronizing. Increasing that to 90 minutes or so would make it only happen about 6.4 times per year
2012-04-02 20:37:55 +02:00
Gavin Andresen 85ea8b4f43 Merge pull request #951 from TheBlueMatt/headerslimit
Limit getheaders to a hard 2000.
2012-04-02 11:22:11 -07:00
Pieter Wuille 91c5132ab5 Merge pull request #998 from Diapolo/transactiontable
removed an ugly line break in a transaction tooltip
2012-04-02 07:19:22 -07:00
Pieter Wuille d3f220b2c2 Merge pull request #1022 from Diapolo/fix#1020
fix for #1020
2012-04-02 07:08:14 -07:00
Pieter Wuille fdef04e77b Merge pull request #995 from Diapolo/master
fixed typo in comment in netbase.h and bignum.h
2012-04-02 07:07:48 -07:00
Pieter Wuille 542a1380aa Merge pull request #1006 from Diapolo/tr-tray
made tray icon tooltip translatable
2012-04-02 07:07:21 -07:00
Gavin Andresen f3da2a88c9 Bump version to 0.6.0.99 for 0.6.1 merge window 2012-04-02 10:03:26 -04:00
Philip Kaufmann b5271c8861 hide Delete button (only) on ReceivingTab / hide Sign message button (only) on SendingTab 2012-04-01 13:22:34 +02:00
Philip Kaufmann 7e05b97229 fixed typo in comment in netbase.h and bignum.h 2012-03-30 07:44:35 +02:00
Gavin Andresen a1c3d8f14d Merge branch 'master' of github.com:bitcoin/bitcoin 2012-03-29 15:11:04 -04:00
Gavin Andresen f146061d24 Merge pull request #1010 from sipa/fastblocks2
Use transactions-updated as flush condition
2012-03-29 12:10:30 -07:00
Pieter Wuille 25c5eca893 Use transactions-updated as flush condition
The normal checkpointing during the block chain download is reduced
to every five minutes only, but forced every 200000 updated transactions.
2012-03-29 21:00:31 +02:00
Gavin Andresen f3f9da868e Bump version to 0.6.0rc6 2012-03-29 13:58:22 -04:00
Gavin Andresen 6293a9f87f Workaround hangs when upgrading old addr.dat files 2012-03-29 13:34:07 -04:00
Gavin Andresen 83e914c1d5 Merge pull request #1007 from gavinandresen/log_auto_remove
Auto-remove logs, and decrease logfile size to 10M
2012-03-29 10:13:42 -07:00
Gavin Andresen 9f18347034 Auto-remove logs, and decrease logfile size to 10M 2012-03-29 09:03:11 -04:00
Philip Kaufmann 3d1d5fafc1 made tray icon tooltip translatable 2012-03-29 07:59:15 +02:00
Philip Kaufmann 0b637e0b86 removed an ugly line break in a transaction tooltip for case TransactionStatus::Mature 2012-03-27 23:20:09 +02:00
Philip Kaufmann 7b2eecd428 update translations from transifex 2012-03-27 10:13:38 +02:00
Gavin Andresen 8d29329f93 Update version to 60005 (0.6.0rc5) 2012-03-26 15:42:06 -04:00
Gavin Andresen c698633447 Merge branch 'master' of github.com:bitcoin/bitcoin 2012-03-26 15:31:32 -04:00
Gavin Andresen c289d95d6b Merge pull request #991 from gavinandresen/disableWinURI
Disable bitcoin: URI handling on Windows for the 0.6 release
2012-03-26 12:31:06 -07:00
Wladimir J. van der Laan 57de7cd603 Merge pull request #990 from sipa/doc
Begin doxygen-compatible comments
2012-03-26 12:27:49 -07:00
Gavin Andresen bf5b80a8ae Merge branch 'deladdr' of https://github.com/sipa/bitcoin 2012-03-26 14:32:26 -04:00
Pieter Wuille 53cb1a49e7 Use erase instead of rewrite to remove old addr entries 2012-03-26 20:22:38 +02:00
Gavin Andresen 7b90edb5a6 Disable bitcoin: URI handling on Windows for the 0.6 release 2012-03-26 12:18:24 -04:00
Pieter Wuille 6b8de05d0a Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
Philip Kaufmann 4004b9a40b make sure Window is shown when clicking bitcoin: Links to get user attention 2012-03-26 09:19:49 +02:00
Pieter Wuille 01a196e08d Merge pull request #974 from sipa/walletupgrade
Introduce explicit -walletupgrade option
2012-03-25 19:44:52 -07:00
Pieter Wuille 59e659fcc0 Merge pull request #983 from laanwj/2012_03_removeunusedutil
Remove unused functions from util.h/util.cpp (EOM)
2012-03-25 19:31:03 -07:00
Pieter Wuille bf1afb02ca Give DNS seeds a random age between 3 and 7 days old
This speeds up initial connections with an old/large addr.dat a lot.
2012-03-25 16:06:16 +02:00
Wladimir J. van der Laan a6aee96c7e remove unused functions from util.h/util.cpp 2012-03-25 12:33:30 +02:00
Pieter Wuille 439e1497e1 Introduce explicit -walletupgrade option
Do not automatically change the wallet format unless the user takes an
explicit action that implies an upgrade (encrypting, for now), or uses
-walletupgrade.

-walletupgrade optionally takes an integer argument: the client version
up to which upgrading is allowed. Without an argument, it is upgraded
to latest supported version. If an argument to -walletupgrade is
provided at the time the wallet is created, the new wallet will initially
not use features beyond that version.

Third, the current wallet version number is reported in getinfo.
2012-03-22 23:47:29 +01:00
Gavin Andresen 958fe01c32 Merge branch 'checklevel' of https://github.com/sipa/bitcoin 2012-03-22 12:18:56 -04:00
Gavin Andresen e12d131734 Merge pull request #975 from sipa/versioncheck
Check minversion before loading the rest of the wallet
2012-03-22 09:18:11 -07:00
Gavin Andresen a6b4a11385 Merge branch 'addrman' of https://github.com/sipa/bitcoin 2012-03-22 09:19:01 -04:00
Gavin Andresen 0e894be626 Merge pull request #964 from sipa/fastblocks
Speed up block downloading
2012-03-22 06:17:44 -07:00
Gavin Andresen e53f03172a Merge branch 'master' of github.com:bitcoin/bitcoin 2012-03-22 08:51:37 -04:00
Wladimir J. van der Laan 5cd806a03e Merge pull request #969 from laanwj/2012_03_printconsole_error
replace call to PrintConsole with call to error()
2012-03-21 23:42:20 -07:00
Pieter Wuille ef12c2184d Check minversion before loading the rest of the wallet
When a 0.6 wallet with compressed pubkeys is created, it writes a
minversion record to prevent older clients from reading it. If the 0.5
loading it sees a key record before seeing the minversion record however,
it will fail with DB_CORRUPT instead of DB_TOO_NEW.
2012-03-22 04:59:59 +01:00
Pieter Wuille 4538e45c46 Add -checklevel and improve -checkblocks
-checkblocks now takes a numeric argument: the number of blocks that must
be verified at the end of the chain. Default is 2500, and 0 means all
blocks.

-checklevel specifies how thorough the verification must be:
0: only check whether the block exists on disk
1: verify block validity (default)
2: verify transaction index validity
3: check transaction hashes
4: check whether spent txouts were spent within the main chain
5: check whether all prevouts are marked spent
6: check whether spent txouts were spent by a valid transaction that consumes them
2012-03-22 03:19:23 +01:00
Gavin Andresen 8f188ece3c Remove -bip16 and -paytoscripthashtime command-line arguments 2012-03-21 15:45:58 -04:00
Wladimir J. van der Laan 4a43dfbf3e replace call to PrintConsole with call to error()
As these are equivalent functions, this cleans up the source a bit.
Also remove PrintConsole() as this was the only use.
2012-03-21 20:33:53 +01:00
Gavin Andresen 2e2c04e250 Merge pull request #947 from ali1234/master
When disconnecting a node, the receive buffer should be cleared
2012-03-21 12:24:57 -07:00
Gavin Andresen b2fe3a5ca6 Merge pull request #948 from sipa/unstuck
Prevent stuck block download in large reorganisations
2012-03-21 12:16:28 -07:00
Gavin Andresen c2b1ab072c Merge pull request #965 from khorben/master
The generic UNIX Makefile builds with lots of warnings
2012-03-21 07:45:49 -07:00
Pieter Wuille a1a0469f91 More debug output for failed reorganizations 2012-03-21 13:15:27 +01:00
Michael 246c20e8a9 Correct date 2012-03-21 15:56:38 +08:00
Wladimir J. van der Laan 4046bdf18a Merge pull request #954 from Diapolo/master
language updates for source file bitcoin_en.ts + remove cs_CZ (issue #958)
2012-03-21 00:18:58 -07:00
Pieter Wuille 0aa89c08ff Prevent stuck block download in large reorganisations
In cases of very large reorganisations (hundreds of blocks), a situation
may appear where an 'inv' is sent as response to a 'getblocks', but the
last block mentioned in the inv is already known to the receiver node.
However, the supplying node uses a request for this last block as a
trigger to send the rest of the inv blocks. If it never comes, the block
chain download is stuck.

This commit makes the receiver node always request the last inv'ed block,
even if it is already known, to prevent this problem.
2012-03-21 05:09:02 +01:00
Pieter Wuille 89516bd4e0 Speed up block downloading 2012-03-21 01:32:00 +01:00
Pierre Pronchery 7868808b2f Avoid some pointless warnings while compiling 2012-03-21 00:08:19 +01:00