Commit graph

3230 commits

Author SHA1 Message Date
Pieter Wuille
de363e73ea Merge pull request #1709 from xanatos/patch-10
Spaces in strings
2012-08-23 05:34:47 -07:00
xanatos
331544bc37 Spaces in strings
One added space + one removed space.
2012-08-23 15:19:13 +03:00
xanatos
b765385a3e Removed useless assignment
nLoadWalletRet is already equal to DB_NEED_REWRITE (we are in an if)
2012-08-23 14:47:00 +03:00
Wladimir J. van der Laan
0b886ad1bd Make CCrypter use LockedPageManager to manage locked pages
Replace direct calls to mlock.

Also, change the class to lock the memory areas in the constructor and unlock them again in the destructor. This makes sure that locked pages won't leak.
2012-08-23 06:55:35 +02:00
Wladimir J. van der Laan
e95568b78d Handle locked pages more robustly (Fixes issue #1462)
Memory locks do not stack, that is, pages which have been locked several times by calls to mlock()
will be unlocked by a single call to munlock(). This can result in keying material ending up in swap when
those functions are used naively. In this commit a class "LockedPageManager" is added
that simulates stacking memory locks by keeping a counter per page.
2012-08-23 06:55:35 +02:00
Wladimir J. van der Laan
fedd060d81 Merge pull request #1700 from laanwj/2012_08_testsotherfiles
bitcoin-qt.pro: Add test sources to OTHER_FILES
2012-08-22 10:49:38 -07:00
Gregory Maxwell
a159d6caf0 Merge pull request #1694 from sipa/fix_netloops
Fix infinite loops in connection logic
2012-08-22 07:15:03 -07:00
Wladimir J. van der Laan
4942b21203 bitcoin-qt.pro: Add test sources to OTHER_FILES so that they can be edited easier in Qt creator
- Also add src/version.h
2012-08-22 14:18:27 +02:00
Wladimir J. van der Laan
ba1cdb6883 Merge pull request #1701 from laanwj/2012_08_pull_transifex
Update translations from transifex
2012-08-22 05:09:29 -07:00
Wladimir J. van der Laan
d9725378b0 Update translations from transifex 2012-08-22 14:05:01 +02:00
Pieter Wuille
f161a2c211 Fix infinite loops in connection logic 2012-08-22 13:35:33 +02:00
Pieter Wuille
1a3dcca8f4 Merge pull request #1695 from sipa/noloadorphan
Do not accept orphan blocks in -loadblock mode
2012-08-22 04:32:39 -07:00
Gavin Andresen
80cfc3a485 Checkpoint at block 193,000 2012-08-21 22:50:00 -04:00
Gavin Andresen
f39ab4c8d0 Merge branch 'testdata' of git://github.com/TheBlueMatt/bitcoin 2012-08-21 13:58:24 -04:00
Pieter Wuille
5c88e3c108 Do not accept orphan blocks in -loadblock mode 2012-08-21 19:18:53 +02:00
Jeff Garzik
1954d40691 Merge pull request #1493 from jgarzik/unlocked-rpc
RPC: add facility to enable RPCs to run outside cs_main, wallet locks
2012-08-21 09:22:13 -07:00
Jeff Garzik
0e1d3551da RPC: add facility to enable RPCs to run outside cs_main, wallet locks
Use with 'stop' and 'help' RPCs.

This provides a facility to individually evaluate the locking for an RPC, and
potentially make it more parallel.
2012-08-21 12:03:52 -04:00
Gavin Andresen
cd58f05894 Restore OSX 10.5 compatibility (do not use pthread_setname_np) 2012-08-21 12:00:05 -04:00
Gavin Andresen
b4b7ed1915 Fix 32-bit build error: include util.h to get int64 typedef 2012-08-21 11:59:59 -04:00
Jeff Garzik
5f2b41d54d Merge pull request #1693 from jgarzik/rpcwallet
Move code to new modules rpcwallet.cpp, rpcblockchain.cpp
2012-08-21 08:44:21 -07:00
Jeff Garzik
c625ae04d2 RPC, cosmetic: move more RPC code to new rpcblockchain.cpp module 2012-08-21 11:03:38 -04:00
Jeff Garzik
e3bc569865 RPC, cosmetic: move wallet-related RPCs to new rpcwallet.cpp module 2012-08-21 10:38:57 -04:00
Pieter Wuille
143acc7672 Merge pull request #1687 from gavinandresen/quietunit
Suppress output when running unit tests.
2012-08-21 07:07:51 -07:00
Gregory Maxwell
4a4a0c1196 Merge pull request #1690 from gavinandresen/signrawtx_null
Allow signrawtransaction '...' null null 'hashtype'
2012-08-21 06:40:50 -07:00
Jeff Garzik
a483c27704 Merge pull request #1691 from jgarzik/submitwork
Add 'submitblock' RPC, split out from 'getblocktemplate' RPC
2012-08-20 23:49:45 -07:00
Jeff Garzik
a2168d94c0 RPC: submitblock returns null on success, string on error 2012-08-21 02:41:46 -04:00
Jeff Garzik
7600e7fc39 RPC, cosmetic: Create rpcmining.cpp as new home for mining-related RPC code 2012-08-21 02:21:33 -04:00
Jeff Garzik
ddd1ffb4f1 RPC, cosmetic: de-indent getblocktemplate() 2012-08-21 02:06:09 -04:00
Jeff Garzik
79f2525ab6 RPC: split new 'submitblock' out of 'getblocktemplate' 2012-08-21 02:02:06 -04:00
Gavin Andresen
cc6dfd1f4b Allow signrawtransaction '...' null null 'hashtype'
Allows the user to pass null as the second or third parameter
to signrawtransaction, in case you need to (for example) fetch
private keys from the wallet but want to specify the hash type.
2012-08-20 17:19:13 -04:00
Gregory Maxwell
b86da2abe8 Merge pull request #1689 from gavinandresen/rawtx_singlefix
When using SIGHASH_SINGLE, only sign inputs that have corresponding outputs
2012-08-20 12:59:50 -07:00
Jeff Garzik
af3b5ea569 Merge pull request #1526 from gavinandresen/heightincoinbase
Transition to requiring block height in block coinbases
2012-08-20 12:57:01 -07:00
Gavin Andresen
d5e7b61173 When using SIGHASH_SINGLE, do not sign inputs that have no corresponding outputs.
This fixes issue #1688
2012-08-20 14:06:27 -04:00
Matt Corallo
da9e86c3b6 Allow setting a different linker than compiler in makefile.unix 2012-08-20 12:12:41 -04:00
Matt Corallo
fc4743faa8 Add data-driven transaction tests. 2012-08-20 12:12:41 -04:00
Matt Corallo
336a0abbbb Add a few test cases to data-driven script tests. 2012-08-20 12:12:41 -04:00
Gavin Andresen
4d51be1cf3 Suppress output when running unit tests.
This does two things:
1) Now does not output to debug.log if -printtodebugger flag is passed
2) Unit tests set -printtodebugger so only test results are output to stdout

Note that -printtodebugger only actually prints to the debugger on Windows.
2012-08-20 11:33:20 -04:00
Gavin Andresen
d18f2fd9d6 Reject block.nVersion<=1 blocks if network has upgraded to version=2
If 950 of the last 1,000 blocks are nVersion=2, reject nVersion=1
(or zero, but no bitcoin release has created block.nVersion=0) blocks
-- 75 of last 100 on testnet3.

This rule is being put in place now so that we don't have to go
through another "express support" process to get what we really
want, which is for every single new block to include the block height
in the coinbase.
2012-08-20 10:46:07 -04:00
Gavin Andresen
de237cbfa4 Block height in coinbase as a new block rule
"Version 2" blocks are blocks that have nVersion=2 and
have the block height as the first item in their coinbase.
Block-height-in-the-coinbase is strictly enforced when
version=2 blocks are a supermajority in the block chain
(750 of the last 1,000 blocks on main net, 51 of 100 for
testnet). This does not affect old clients/miners at all,
which will continue producing nVersion=1 blocks, and
which will continue to be valid.
2012-08-20 10:46:07 -04:00
Gavin Andresen
3fcec0d4a0 Set block.nVersion to fix miner unit test 2012-08-20 10:46:07 -04:00
Jeff Garzik
b3a570d158 Merge pull request #1641 from jgarzik/mempool
Add 'mempool' P2P command, and extend 'getdata' behavior
2012-08-20 07:21:34 -07:00
Jeff Garzik
89a7bd644f Merge pull request #1686 from Diapolo/fix_comment
fix a comment in addrman.cpp
2012-08-18 09:15:11 -07:00
Philip Kaufmann
30c8a40847 fix a comment in addrman.cpp 2012-08-18 16:45:24 +02:00
Wladimir J. van der Laan
221497c61b Merge pull request #1673 from Diapolo/Qt_Win_ASLR_DEP_linker_flag
Bitcoin-Qt (Windows only): add ASLR and DEP linker flags
2012-08-18 02:05:07 -07:00
Philip Kaufmann
8e2ebc0106 Bitcoin-Qt (Windows only): add ASLR and DEP linker flags
- for extra security on Windows: enable ASLR and DEP via GCC linker flags

GCC linker flag description:
--dynamicbase  The image base address may be relocated using address space layout randomization (ASLR). This feature was introduced with MS Windows Vista for i386 PE targets.
--nxcompat The image is compatible with the Data Execution Prevention.
This feature was introduced with MS Windows XP SP2 for i386 PE targets.
2012-08-18 10:52:50 +02:00
Wladimir J. van der Laan
8765d20b1e Merge pull request #1680 from Diapolo/add_message_on_blockimport
add splashscreen message when importing blocks via -loadblock
2012-08-17 11:29:43 -07:00
Gregory Maxwell
10ffb45667 Merge pull request #1681 from TheBlueMatt/fixtests
Remove useless non-cross-platform tests.
2012-08-17 09:42:35 -07:00
Matt Corallo
8555a3e3cc Remove useless non-cross-platform tests. 2012-08-17 12:40:09 -04:00
Wladimir J. van der Laan
a108d3defb Merge pull request #1607 from Diapolo/Qt_Win_exe_desc
Bitcoin-Qt (Windows only): extend Resource File
2012-08-17 08:55:54 -07:00
Jeff Garzik
dabb95b892 Merge pull request #1678 from Diapolo/LoadExternalBlockFile_add_timer
log how long LoadExternalBlockFile() takes in ms (Benchmark)
2012-08-17 08:45:11 -07:00