novacoin.git
12 years agoFix critical UI performance issue (#1154)
Wladimir J. van der Laan [Sun, 29 Apr 2012 11:22:12 +0000]
Fix critical UI performance issue (#1154)

12 years agoMerge branch '0.5.x' into 0.6.0.x
Luke Dashjr [Fri, 27 Apr 2012 20:28:00 +0000]
Merge branch '0.5.x' into 0.6.0.x

12 years agofix compiler error in bitcoinrpc RE: boost::system
Gavin Andresen [Wed, 11 Apr 2012 18:00:48 +0000]
fix compiler error in bitcoinrpc RE: boost::system

(Partial of 2232717cba9e9f06a01e8f37bcea4e79ee65205f)

12 years agoBump win32.deps version number for new openssl
Gavin Andresen [Fri, 27 Apr 2012 15:53:11 +0000]
Bump win32.deps version number for new openssl

12 years agoMerge branch '0.5.x' into 0.6.0.x
Luke Dashjr [Fri, 27 Apr 2012 17:57:43 +0000]
Merge branch '0.5.x' into 0.6.0.x

Conflicts:
contrib/gitian-descriptors/gitian-win32.yml

12 years agoWindows build: compile against openssl 1.0.1b
Gavin Andresen [Fri, 27 Apr 2012 14:52:14 +0000]
Windows build: compile against openssl 1.0.1b

12 years agoMerge branch '0.4.x' into 0.5.x
Luke Dashjr [Fri, 27 Apr 2012 17:52:02 +0000]
Merge branch '0.4.x' into 0.5.x

Conflicts:
doc/build-msw.txt
src/makefile.linux-mingw
src/makefile.mingw

12 years agoWindows build: compile against openssl 1.0.1b
Gavin Andresen [Fri, 27 Apr 2012 14:52:14 +0000]
Windows build: compile against openssl 1.0.1b

12 years agoUpdate openssl version
Gavin Andresen [Fri, 27 Apr 2012 16:45:49 +0000]
Update openssl version

12 years agoBump win32.deps version number for new openssl
Gavin Andresen [Fri, 27 Apr 2012 15:53:11 +0000]
Bump win32.deps version number for new openssl

12 years agoWindows build: compile against openssl 1.0.1b
Gavin Andresen [Fri, 27 Apr 2012 14:52:14 +0000]
Windows build: compile against openssl 1.0.1b

12 years agoMerge branch '0.5.x' into 0.6.0.x
Luke Dashjr [Fri, 27 Apr 2012 14:57:15 +0000]
Merge branch '0.5.x' into 0.6.0.x

Conflicts:
bitcoin-qt.pro
doc/README
doc/README_windows.txt
share/setup.nsi
src/serialize.h

12 years agoBump version to 0.5.5
Luke Dashjr [Fri, 27 Apr 2012 14:55:06 +0000]
Bump version to 0.5.5

12 years agoMerge branch '0.4.x' into 0.5.x
Luke Dashjr [Fri, 27 Apr 2012 14:53:14 +0000]
Merge branch '0.4.x' into 0.5.x

Conflicts:
contrib/Bitcoin.app/Contents/Info.plist
doc/README
doc/README_windows.txt
share/setup.nsi
src/protocol.h
src/serialize.h

12 years agoWindows build: compile against openssl 1.0.1b
Gavin Andresen [Fri, 27 Apr 2012 14:52:14 +0000]
Windows build: compile against openssl 1.0.1b

12 years agoBump version to 0.4.6
Luke Dashjr [Fri, 27 Apr 2012 14:50:24 +0000]
Bump version to 0.4.6

12 years agolistsinceblock: rpc param blockid -> blockhash
freewil [Thu, 26 Apr 2012 16:48:33 +0000]
listsinceblock: rpc param blockid -> blockhash

This is more consistent with the rest of the labeling seen
by the user when accessing the rpc commands.

12 years agoremove strange debug message from listsinceblock
freewil [Thu, 26 Apr 2012 17:12:44 +0000]
remove strange debug message from listsinceblock

12 years agoWe should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
Timothy Redaelli [Wed, 25 Apr 2012 12:07:24 +0000]
We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)

12 years agoWe should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
Timothy Redaelli [Wed, 25 Apr 2012 12:07:24 +0000]
We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)

12 years agoWe should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
Timothy Redaelli [Wed, 25 Apr 2012 12:07:24 +0000]
We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)

12 years agoBump version numbers for 0.6.1rc1
Gavin Andresen [Fri, 27 Apr 2012 14:14:33 +0000]
Bump version numbers for 0.6.1rc1

12 years agoMerge pull request #1151 from freewil/listsinceblock-blockhash
Gavin Andresen [Thu, 26 Apr 2012 22:37:12 +0000]
Merge pull request #1151 from freewil/listsinceblock-blockhash

listsinceblock: rpc param blockid -> blockhash

12 years agoMerge pull request #1150 from gavinandresen/NOPCH
Gavin Andresen [Thu, 26 Apr 2012 22:36:33 +0000]
Merge pull request #1150 from gavinandresen/NOPCH

Remove unused -DNOPCH

12 years agoMerge pull request #1152 from freewil/remove-strange-debug
Gavin Andresen [Thu, 26 Apr 2012 22:36:15 +0000]
Merge pull request #1152 from freewil/remove-strange-debug

remove strange debug message from listsinceblock

12 years agoMerge pull request #1146 from drizztbsd/posix-include
Pieter Wuille [Thu, 26 Apr 2012 22:25:56 +0000]
Merge pull request #1146 from drizztbsd/posix-include

We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)

12 years agoremove strange debug message from listsinceblock
freewil [Thu, 26 Apr 2012 17:12:44 +0000]
remove strange debug message from listsinceblock

12 years agolistsinceblock: rpc param blockid -> blockhash
freewil [Thu, 26 Apr 2012 16:48:33 +0000]
listsinceblock: rpc param blockid -> blockhash

This is more consistent with the rest of the labeling seen
by the user when accessing the rpc commands.

12 years agoDefine TEST_DATA_DIR so unit tests can be run from any current working directory
Gavin Andresen [Thu, 26 Apr 2012 15:20:44 +0000]
Define TEST_DATA_DIR so unit tests can be run from any current working directory

12 years agoUndo part of c2e8c8ac to fix issue#1148
Gavin Andresen [Thu, 26 Apr 2012 14:18:35 +0000]
Undo part of c2e8c8ac to fix issue#1148

12 years agoMerge pull request #1119 from sipa/fastshutdown
Pieter Wuille [Thu, 26 Apr 2012 12:20:57 +0000]
Merge pull request #1119 from sipa/fastshutdown

Make lsn_reset ("detach databases") optional and off by default.

12 years agoRemove unused -DNOPCH
Gavin Andresen [Wed, 25 Apr 2012 23:40:44 +0000]
Remove unused -DNOPCH

12 years agoMake lsn_reset ("detach databases") optional and off by default.
Pieter Wuille [Tue, 17 Apr 2012 21:03:24 +0000]
Make lsn_reset ("detach databases") optional and off by default.

Add an option -detachdb (and entry in OptionDialog), without which no
lsn_reset is called on addr.dat and blkindex.dat. That means these
files cannot be moved to a new environment, but shutdown can be
significantly faster. The wallet file is always lsn_reset'ed.

-detachdb corresponds to the old behaviour, though it is off by
default now to speed up shutdowns.

12 years agoWe should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
Timothy Redaelli [Wed, 25 Apr 2012 12:07:24 +0000]
We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)

12 years agoCBlock::WriteToDisk() properly checks ftell(3) for error return
Jeff Garzik [Sun, 22 Apr 2012 17:59:24 +0000]
CBlock::WriteToDisk() properly checks ftell(3) for error return

Rather than storing ftell(3)'s return value -- a long -- in an
unsigned int, we store and check a properly typed temp.  Then, assured a
non-negative value, we store in nBlockPosRet.

12 years agoTest ScriptSigArgsExpected() for error, before accumulating return value
Jeff Garzik [Sun, 22 Apr 2012 17:44:12 +0000]
Test ScriptSigArgsExpected() for error, before accumulating return value

12 years agoMerge pull request #1140 from jgarzik/sign-compare
Jeff Garzik [Tue, 24 Apr 2012 04:33:29 +0000]
Merge pull request #1140 from jgarzik/sign-compare

Address many more sign comparison warnings

12 years agoChange signed->unsigned at 3 code sites
Jeff Garzik [Sun, 22 Apr 2012 18:01:25 +0000]
Change signed->unsigned at 3 code sites

This resolves signed/unsigned comparison warnings.

12 years agoCBlock::WriteToDisk() properly checks ftell(3) for error return
Jeff Garzik [Sun, 22 Apr 2012 17:59:24 +0000]
CBlock::WriteToDisk() properly checks ftell(3) for error return

Rather than storing ftell(3)'s return value -- a long -- in an
unsigned int, we store and check a properly typed temp.  Then, assured a
non-negative value, we store in nBlockPosRet.

12 years agoAdd casts for unavoidable signed/unsigned comparisons
Jeff Garzik [Sun, 22 Apr 2012 17:51:16 +0000]
Add casts for unavoidable signed/unsigned comparisons

At these code sites, it is preferable to cast rather than change
a variable's type.

12 years agoTest ScriptSigArgsExpected() for error, before accumulating return value
Jeff Garzik [Sun, 22 Apr 2012 17:44:12 +0000]
Test ScriptSigArgsExpected() for error, before accumulating return value

12 years agoSigOp and orphan-tx constants and counts are always unsigned.
Jeff Garzik [Mon, 23 Apr 2012 18:14:03 +0000]
SigOp and orphan-tx constants and counts are always unsigned.

Fixes several sign-comparison warnings.

12 years agoMerge pull request #1133 from sipa/abspath
Pieter Wuille [Sun, 22 Apr 2012 21:56:03 +0000]
Merge pull request #1133 from sipa/abspath

Make GetDataDir return absolute paths

12 years agoPrefer 'unsigned int' for loop index variables tested against ::size()
Jeff Garzik [Sun, 22 Apr 2012 17:22:39 +0000]
Prefer 'unsigned int' for loop index variables tested against ::size()

C++ STL ::size() generally returns unsigned, which implies that "int idx"
style of loop variable will generate a signed-vs-unsigned comparison warning
when testing the loop exit condition "idx < blah.size()"

Update areas of the bitcoin code where loop variables may be more properly and
correctly defined as unsigned.

12 years agochange button tooltip on sign message page for copy to clipboard as it was missleading
Philip Kaufmann [Sun, 22 Apr 2012 15:32:08 +0000]
change button tooltip on sign message page for copy to clipboard as it was missleading

12 years agoMake GetDataDir return absolute paths
Pieter Wuille [Sun, 22 Apr 2012 12:35:22 +0000]
Make GetDataDir return absolute paths

12 years agoMerge branch '0.5.x' into 0.6.0.x
Luke Dashjr [Sun, 22 Apr 2012 14:07:24 +0000]
Merge branch '0.5.x' into 0.6.0.x

Conflicts:
src/main.h
src/net.cpp
src/util.cpp

12 years agoMerge branch '0.4.x' into 0.5.x
Luke Dashjr [Sun, 22 Apr 2012 14:05:43 +0000]
Merge branch '0.4.x' into 0.5.x

Conflicts:
src/main.cpp

12 years agoAdd missing includes. (Fix bulding under GCC 4.7)
Timothy Redaelli [Fri, 20 Apr 2012 10:50:57 +0000]
Add missing includes. (Fix bulding under GCC 4.7)

(Note: GCC 4.7 build NOT tested with backports -Luke)

12 years agoFix bugs on 'unsigned char' platforms.
Dwayne C. Litzenberger [Mon, 16 Apr 2012 05:32:55 +0000]
Fix bugs on 'unsigned char' platforms.

In ISO C++, the signedness of 'char' is undefined.  On some platforms (e.g.
ARM), 'char' is an unsigned type, but some of the code relies on 'char' being
signed (as it is on x86).  This is indicated by compiler warnings like this:

 bignum.h: In constructor 'CBigNum::CBigNum(char)':
 bignum.h:81:59: warning: comparison is always true due to limited range of data type [-Wtype-limits]

 util.cpp: In function 'bool IsHex(const string&)':
 util.cpp:427:28: warning: comparison is always false due to limited range of data type [-Wtype-limits]

In particular, IsHex erroneously returned true regardless of the input
characters, as long as the length of the string was a positive multiple of 2.

Note: For testing, it's possible using GCC to force char to be unsigned by
adding the -funsigned-char parameter to xCXXFLAGS.

12 years agoFix bugs on 'unsigned char' platforms.
Dwayne C. Litzenberger [Mon, 16 Apr 2012 05:32:55 +0000]
Fix bugs on 'unsigned char' platforms.

In ISO C++, the signedness of 'char' is undefined.  On some platforms (e.g.
ARM), 'char' is an unsigned type, but some of the code relies on 'char' being
signed (as it is on x86).  This is indicated by compiler warnings like this:

 bignum.h: In constructor 'CBigNum::CBigNum(char)':
 bignum.h:81:59: warning: comparison is always true due to limited range of data type [-Wtype-limits]

 util.cpp: In function 'bool IsHex(const string&)':
 util.cpp:427:28: warning: comparison is always false due to limited range of data type [-Wtype-limits]

In particular, IsHex erroneously returned true regardless of the input
characters, as long as the length of the string was a positive multiple of 2.

Note: For testing, it's possible using GCC to force char to be unsigned by
adding the -funsigned-char parameter to xCXXFLAGS.

12 years agoFix phexdigits[255] is undefined.
Dwayne C. Litzenberger [Mon, 16 Apr 2012 05:31:38 +0000]
Fix phexdigits[255] is undefined.

12 years agoFix phexdigits[255] is undefined.
Dwayne C. Litzenberger [Mon, 16 Apr 2012 05:31:38 +0000]
Fix phexdigits[255] is undefined.

12 years agoMerge pull request #1124 from sipa/rpcobj3
Pieter Wuille [Sat, 21 Apr 2012 23:49:32 +0000]
Merge pull request #1124 from sipa/rpcobj3

extension of #1103: encapsulate mapCommands in CRPCTable

12 years agoMerge pull request #1131 from laanwj/2012_04_hexstr
Pieter Wuille [Sat, 21 Apr 2012 23:47:02 +0000]
Merge pull request #1131 from laanwj/2012_04_hexstr

Integrate @JoelKatz's optimized ToHex (#562) into current HexStr function

12 years agoMerge pull request #1129 from laanwj/2012_04_opcodes
Pieter Wuille [Sat, 21 Apr 2012 23:43:31 +0000]
Merge pull request #1129 from laanwj/2012_04_opcodes

Add explicit numeric constant value for all opcodes

12 years agoMerge pull request #1121 from gavinandresen/scripttest
Gavin Andresen [Sat, 21 Apr 2012 23:36:41 +0000]
Merge pull request #1121 from gavinandresen/scripttest

Data-driven script evaluation unit tests (rebased to fix compiler warning).

12 years agoData-drive script evaluation unit tests.
Gavin Andresen [Tue, 17 Apr 2012 21:57:06 +0000]
Data-drive script evaluation unit tests.

12 years agoMerge pull request #1126 from drizztbsd/master
Pieter Wuille [Sat, 21 Apr 2012 22:13:29 +0000]
Merge pull request #1126 from drizztbsd/master

Fix build with gcc 4.7

12 years agoIntegrate @JoelKatz's optimized ToHex (#562) into current HexStr function
Wladimir J. van der Laan [Sat, 21 Apr 2012 18:15:25 +0000]
Integrate @JoelKatz's optimized ToHex (#562) into current HexStr function

12 years agoRemove no-longer used UI hints in bitcoin core
Wladimir J. van der Laan [Sat, 21 Apr 2012 16:21:19 +0000]
Remove no-longer used UI hints in bitcoin core

The Qt UI has its own associated structures for temporary transaction state / cache.

12 years agochange type of various bare chars to bool that are only used as bool (and never seria...
Wladimir J. van der Laan [Sat, 21 Apr 2012 11:31:08 +0000]
change type of various bare chars to bool that are only used as bool (and never serialized)

12 years agoAdd explicit numeric constant value for all opcodes
Wladimir J. van der Laan [Sat, 21 Apr 2012 08:10:48 +0000]
Add explicit numeric constant value for all opcodes

- Easier for debugging (what opcode was 0x... again?)
- Clarifies that the opcodes are set in stone in the protocol, and signals that it is impossible to insert opcodes in between.

12 years agoExpose CRPCTable via bitcoinrpc.h for testing
Pieter Wuille [Fri, 20 Apr 2012 23:37:34 +0000]
Expose CRPCTable via bitcoinrpc.h for testing

12 years agoEncapsulate mapCommands in class CRPCTable
Pieter Wuille [Wed, 18 Apr 2012 20:42:17 +0000]
Encapsulate mapCommands in class CRPCTable

12 years agoEncapsulate RPC command dispatch in an array of CRPCCommand's
Jeff Garzik [Sun, 15 Apr 2012 03:55:05 +0000]
Encapsulate RPC command dispatch in an array of CRPCCommand's

12 years agoMerge pull request #1122 from dlitz/unsigned-char-fix
Wladimir J. van der Laan [Fri, 20 Apr 2012 17:18:45 +0000]
Merge pull request #1122 from dlitz/unsigned-char-fix

Unsigned char fix & fix undefined phexdigits[255]

12 years agoAdd missing includes. (Fix bulding under GCC 4.7)
Timothy Redaelli [Fri, 20 Apr 2012 10:50:57 +0000]
Add missing includes. (Fix bulding under GCC 4.7)

12 years agoMerge pull request #959 from rebroad/LoadBlockIndexKillable
Pieter Wuille [Thu, 19 Apr 2012 11:33:04 +0000]
Merge pull request #959 from rebroad/LoadBlockIndexKillable

Added ability to respond to signals during Block Loading stage.

12 years agoAdded ability to respond to signals during Block Loading stage.
R E Broadley [Wed, 18 Apr 2012 11:30:24 +0000]
Added ability to respond to signals during Block Loading stage.

12 years agoFix bugs on 'unsigned char' platforms.
Dwayne C. Litzenberger [Mon, 16 Apr 2012 05:32:55 +0000]
Fix bugs on 'unsigned char' platforms.

In ISO C++, the signedness of 'char' is undefined.  On some platforms (e.g.
ARM), 'char' is an unsigned type, but some of the code relies on 'char' being
signed (as it is on x86).  This is indicated by compiler warnings like this:

 bignum.h: In constructor 'CBigNum::CBigNum(char)':
 bignum.h:81:59: warning: comparison is always true due to limited range of data type [-Wtype-limits]

 util.cpp: In function 'bool IsHex(const string&)':
 util.cpp:427:28: warning: comparison is always false due to limited range of data type [-Wtype-limits]

In particular, IsHex erroneously returned true regardless of the input
characters, as long as the length of the string was a positive multiple of 2.

Note: For testing, it's possible using GCC to force char to be unsigned by
adding the -funsigned-char parameter to xCXXFLAGS.

12 years agoFix phexdigits[255] is undefined.
Dwayne C. Litzenberger [Mon, 16 Apr 2012 05:31:38 +0000]
Fix phexdigits[255] is undefined.

12 years agoAdd missing breaks in optionmodel's switch case
Pieter Wuille [Tue, 17 Apr 2012 21:27:59 +0000]
Add missing breaks in optionmodel's switch case

12 years agoMerge pull request #1118 from sipa/addbreaks
Wladimir J. van der Laan [Tue, 17 Apr 2012 21:33:26 +0000]
Merge pull request #1118 from sipa/addbreaks

Add missing breaks in optionmodel's switch case

12 years agoAdd missing breaks in optionmodel's switch case
Pieter Wuille [Tue, 17 Apr 2012 21:27:59 +0000]
Add missing breaks in optionmodel's switch case

12 years agoMerge pull request #1114 from sipa/lesssync
Pieter Wuille [Tue, 17 Apr 2012 21:23:31 +0000]
Merge pull request #1114 from sipa/lesssync

Reduce sync frequency for blkindex.dat

12 years agoFix potential deadlock
Pieter Wuille [Tue, 17 Apr 2012 16:50:45 +0000]
Fix potential deadlock

Conflict:
* cs_main in ProcessMessages() (before calling ProcessMessages)
* cs_vSend in CNode::BeginMessage
versus:
* cs_vSend in ThreadMessageHandler2 (before calling SendMessages)
* cs_main in SendMessages

Even though cs_vSend is a try_lock, if it succeeds simultaneously with
the locking of cs_main in ProcessMessages(), it could cause a deadlock.

12 years agoFix misc. minor sign-comparison warnings
Jeff Garzik [Sun, 15 Apr 2012 21:00:20 +0000]
Fix misc. minor sign-comparison warnings

12 years agoCNode's nHeaderStart may be negative, so change its type (PARTIAL)
Jeff Garzik [Sun, 15 Apr 2012 20:59:48 +0000]
CNode's nHeaderStart may be negative, so change its type (PARTIAL)

12 years agoFix sign-compare warnings: netbase's Lookup* max-solutions may be unsigned
Jeff Garzik [Sun, 15 Apr 2012 20:58:32 +0000]
Fix sign-compare warnings: netbase's Lookup* max-solutions may be unsigned

12 years agoFix loop index var types, fixing many minor sign comparison warnings
Jeff Garzik [Sun, 15 Apr 2012 20:52:09 +0000]
Fix loop index var types, fixing many minor sign comparison warnings

foo.size() typically returns an unsigned integral type; make loop variables
match those types' signedness.

12 years agoFix loop index var types, fixing many minor sign comparison warnings
Jeff Garzik [Sun, 15 Apr 2012 20:52:09 +0000]
Fix loop index var types, fixing many minor sign comparison warnings

foo.size() typically returns an unsigned integral type; make loop variables
match those types' signedness.

12 years agoThe string class returns string::npos, when find() fails.
Jeff Garzik [Sun, 15 Apr 2012 20:47:24 +0000]
The string class returns string::npos, when find() fails.

Noticed when sign-comparison warnings were enabled.

12 years agoAdd forgotten initializer
Wladimir J. van der Laan [Mon, 16 Apr 2012 09:46:13 +0000]
Add forgotten initializer

12 years agoAlreadyHave(): only hold lock during mapTransactions access
Jeff Garzik [Tue, 17 Apr 2012 16:30:00 +0000]
AlreadyHave(): only hold lock during mapTransactions access

12 years agoFix tests after recent refactors
Pieter Wuille [Tue, 17 Apr 2012 18:37:47 +0000]
Fix tests after recent refactors

12 years agoMerge remote-tracking branch 'jgarzik/mempool'
Pieter Wuille [Tue, 17 Apr 2012 18:12:48 +0000]
Merge remote-tracking branch 'jgarzik/mempool'

12 years agoMerge pull request #1117 from sipa/deadlockfix
Pieter Wuille [Tue, 17 Apr 2012 18:05:02 +0000]
Merge pull request #1117 from sipa/deadlockfix

Fix potential deadlock

12 years agoMerge pull request #1112 from sipa/saneserial
Pieter Wuille [Tue, 17 Apr 2012 18:04:29 +0000]
Merge pull request #1112 from sipa/saneserial

Further reduce header dependencies

12 years agoFurther reduce header dependencies
Pieter Wuille [Mon, 16 Apr 2012 12:56:45 +0000]
Further reduce header dependencies

This commit removes the dependency of serialize.h on PROTOCOL_VERSION,
and makes this parameter required instead of implicit. This is much saner,
as it makes the places where changing a version number can have an
influence obvious.

12 years agoMove proto version to version.h. Reduce header deps a bit more.
Jeff Garzik [Sun, 15 Apr 2012 22:20:05 +0000]
Move proto version to version.h.  Reduce header deps a bit more.

12 years agoMove CWalletDB code to new walletdb module.
Jeff Garzik [Sun, 15 Apr 2012 21:39:49 +0000]
Move CWalletDB code to new walletdb module.

In addition to standard code separation, this change opens the door
to fixing several include inter-dependencies.

12 years agoRemove headers.h
Pieter Wuille [Sun, 15 Apr 2012 20:10:54 +0000]
Remove headers.h

12 years agoMerge pull request #1106 from jgarzik/sign-compare
Gavin Andresen [Tue, 17 Apr 2012 17:55:56 +0000]
Merge pull request #1106 from jgarzik/sign-compare

Fix many sign-comparison warnings found in bitcoin codebase

12 years agoLocking fix for AlreadyHave()
Jeff Garzik [Fri, 13 Apr 2012 22:24:55 +0000]
Locking fix for AlreadyHave()

Access to mapTransactions[] must be guarded by cs_mapTransactions lock.

12 years agoMerge pull request #1115 from laanwj/2012_04_cleanupmisc
Gavin Andresen [Tue, 17 Apr 2012 17:12:33 +0000]
Merge pull request #1115 from laanwj/2012_04_cleanupmisc

Delete unused, unreachable and commented code, add missing initializer

12 years agoFix potential deadlock
Pieter Wuille [Tue, 17 Apr 2012 16:50:45 +0000]
Fix potential deadlock

Conflict:
* cs_main in ProcessMessages() (before calling ProcessMessages)
* cs_vSend in CNode::BeginMessage
versus:
* cs_vSend in ThreadMessageHandler2 (before calling SendMessages)
* cs_main in SendMessages

Even though cs_vSend is a try_lock, if it succeeds simultaneously with
the locking of cs_main in ProcessMessages(), it could cause a deadlock.

12 years agomain.cpp: replace tabs with spaces
Jeff Garzik [Tue, 17 Apr 2012 16:31:51 +0000]
main.cpp: replace tabs with spaces

Sometimes they sneak in through the 'vi' door

12 years agoAlreadyHave(): only hold lock during mapTransactions access
Jeff Garzik [Tue, 17 Apr 2012 16:30:00 +0000]
AlreadyHave(): only hold lock during mapTransactions access

12 years agoRemove unused and unreachable code
Wladimir J. van der Laan [Mon, 16 Apr 2012 09:44:05 +0000]
Remove unused and unreachable code