Commit graph

3241 commits

Author SHA1 Message Date
Luke Dashjr
45beb88966 Bugfix: Make USE_UPNP=- work with makefile.{linux-mingw,mingw,osx} too 2012-08-23 21:00:57 +00:00
Luke Dashjr
e422bebbdc Make IPv6 support buildtime-optional again (defaults to enabled) 2012-08-23 20:49:51 +00:00
Wladimir J. van der Laan
579d011738 Merge pull request #1713 from laanwj/2012_08_aboutqticon
Add icon for "About Qt" in menu
2012-08-23 13:03:14 -07:00
Wladimir J. van der Laan
05fa0de6d8 Add icon for "About Qt" in menu
Use the built-in icon that is also used in the dialog box itself.
2012-08-23 21:57:20 +02:00
Gregory Maxwell
92735bca31 Add txout address filtering to listunspent.
This applies on top of the coincontrol listaddressgroupings patch
and makes finding eligible outputs from the groups returned
by listaddressgroupings possible.
2012-08-23 15:55:50 -04:00
coderrr
22dfd73598 Add address groupings RPC from the coincontrol patches.
Signed-off-by: Gregory Maxwell <greg@xiph.org>
2012-08-23 15:55:42 -04:00
Gregory Maxwell
47753fa369 Merge pull request #1393 from luke-jr/refactor_times
Refactor transaction/accounting time
2012-08-23 12:38:50 -07:00
Luke Dashjr
c3f95ef13f Choose reasonable "smart" times to display for transactions
Logic:
- If sending a transaction, assign its timestamp to the current time.
- If receiving a transaction outside a block, assign its timestamp to the current time.
- If receiving a block with a future timestamp, assign all its (not already known) transactions' timestamps to the current time.
- If receiving a block with a past timestamp, before the most recent known transaction (that we care about), assign all its (not already known) transactions' timestamps to the same timestamp as that most-recent-known transaction.
- If receiving a block with a past timestamp, but after the most recent known transaction, assign all its (not already known) transactions' timestamps to the block time.
2012-08-23 18:38:22 +00:00
Luke Dashjr
bdbfd2329a JSON-RPC: Add "blocktime" and (for wallet transactions) "timereceived" to transaction Object outputs 2012-08-23 18:30:30 +00:00
Luke Dashjr
9c7722b7c5 Store a fixed order of transactions (and accounting) in the wallet
For backward compatibility, new accounting data is stored after a \0 in the comment string.
This way, old versions and third-party software should load and store them, but all actual use (listtransactions, for example) ignores it.
2012-08-23 18:18:20 +00:00
Jeff Garzik
cf78183fad Merge pull request #1707 from xanatos/patch-7
Removed useless assignment
2012-08-23 06:41:02 -07:00
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