Commit Graph

2037 Commits

Author SHA1 Message Date
Pieter Wuille ee12c3d60c Use filesystem::path instead of manual string tinkering
Where possible, use boost::filesystem::path instead of std::string or
char* for filenames. This avoids a lot of manual string tinkering, in
favor of path::operator/.

GetDataDir is also reworked significantly, it now only keeps two cached
directory names (the network-specific data dir, and the root data dir),
which are decided through a parameter instead of pre-initialized global
variables.

Finally, remove the "upgrade from 0.1.5" case where a debug.log in the
current directory has to be removed.
2012-04-11 22:30:23 +02:00
Wladimir J. van der Laan bcaa5f1c04 Merge pull request #1083 from laanwj/2012_04_connectionicon
Make 4th bar of connection icon green
2012-04-11 11:06:26 -07:00
Gavin Andresen 2232717cba Remove path.make_preferred() calls, and fix compiler error in bitcoinrpc RE: boost::system 2012-04-11 14:00:48 -04:00
Wladimir J. van der Laan 5ca4f13b87 by popular request, make 4th bar of connection icon green 2012-04-11 19:59:15 +02:00
Gavin Andresen 37e7e72041 Merge pull request #1077 from sipa/buildinfo
Fix build.h dependencies
2012-04-11 10:35:44 -07:00
Pieter Wuille 4577167170 Fix build.h dependencies
For Qt builds, the build.h file is moved to build/build.h. For regular
builds, it is moved to obj/build.h. This allows the Qt build to be done
in a different directory than the source, and without interfering with
other builds.
2012-04-11 14:04:42 +02:00
Pieter Wuille 5d464a4a55 Force regeneration of build.h in qmake builds 2012-04-11 02:21:29 +02:00
Pieter Wuille 702764f53b Merge pull request #1054 from sipa/buildinfo
Build identification strings
2012-04-10 13:31:12 -07:00
Wladimir J. van der Laan b56772e5df Merge pull request #1046 from laanwj/2012_04_rpcporterror
Show error message instead of exception crash when unable to bind RPC port
2012-04-10 13:14:47 -07:00
Pieter Wuille a20c0d0f67 Build identification strings
All client version information is moved to version.cpp, which optionally
(-DHAVE_BUILD_INFO) includes build.h. build.h is automatically generated
on supporting platforms via contrib/genbuild.sh, using git describe.

The git export-subst attribute is used to put the commit id statically
in version.cpp inside generated archives, and this value is used if no
build.h is present.

The gitian descriptors are modified to use git archive instead of a
copy, to create the src/ directory in the output. This way,
src/src/version.cpp will contain the static commit id. To prevent
gitian builds from getting the "-dirty" marker in their git-describe
generated identifiers, no touching of files or running sed on the
makefile is performed anymore. This does not seem to influence
determinism.
2012-04-10 18:16:53 +02:00
Pieter Wuille 962e2fcdb6 Merge pull request #1070 from cardpuncher/patch-1
Trivial: added comment lines in French & Turkish
2012-04-10 03:41:09 -07:00
Pieter Wuille 1a275bac2b Merge pull request #1052 from sipa/scopedlocks
Use scoped locks instead of CRITICAL_BLOCK
2012-04-09 13:25:17 -07:00
cardpuncher 9c2c932f8c Added comment lines in French & Turkish which basically mean "Bitcoin, virtual P2P cryptocurrency". 2012-04-09 22:22:38 +03:00
Gavin Andresen 1044391135 Merge branch 'filesystem' of https://github.com/Diapolo/bitcoin 2012-04-09 10:41:59 -04:00
Pieter Wuille f342dac1cb Do not report spurious deadlocks caused by TRY_LOCK 2012-04-09 01:59:57 +02:00
Pieter Wuille 908037fe16 Support for parametrized locks in deadlock detector 2012-04-09 01:59:57 +02:00
Pieter Wuille f8dcd5ca6f Use scoped locks instead of CRITICAL_BLOCK 2012-04-09 01:59:46 +02:00
Gregory Maxwell 138d08c531 Merge pull request #987 from luke-jr/ipc_name_fix
Cleanup: Replace "URL" with "URI" where we aren't actually working with URLs
2012-04-06 11:22:24 -07: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
Gregory Maxwell 9682087b65 Merge pull request #1051 from graingert/patch-1
Change sign message bitcoin address tooltip to "The address to sign the ...
2012-04-05 19:21:03 -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
Gavin Andresen 3acee27b14 Merge pull request #1047 from luke-jr/strlcpy_attribute
Document strlcpy.h in assets-attribution.txt since it isn't MIT-licensed
2012-04-05 16:41:20 -07:00
Luke Dashjr 7993454a92 Document strlcpy.h in assets-attribution.txt since it isn't MIT-licensed 2012-04-05 18:58:20 -04:00
Pieter Wuille 0167938c26 Merge pull request #1045 from sipa/fastblocks2
Flush on log size instead of transaction count
2012-04-05 13:02:16 -07: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
Wladimir J. van der Laan 60d5ab3a16 Merge pull request #1038 from Diapolo/misc
small misc syntactic fixes
2012-04-04 22:52:34 -07:00
Gavin Andresen 5ce4c2a23a Remove USE_SSL #define 2012-04-04 21:19:27 -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 cf8525a571 removed an unneeded space in bitcoin-qt.pro 2012-04-05 00:11:22 +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