Commit Graph

3166 Commits

Author SHA1 Message Date
Gavin Andresen 496c2a3542 Merge pull request #3074 from laanwj/2013_10_remove_default_key_1
Remove automatic update of default key
2013-10-20 19:40:43 -07:00
Gavin Andresen 749230d05c Merge pull request #2840 from sipa/nosendlock
Allow SendMessages to run partially without cs_main
2013-10-20 19:06:53 -07:00
Gavin Andresen 34f72ad6ef Merge pull request #3046 from sarchar/lockedpage-change
Changing LockedPageManager to use a managed instance
2013-10-20 16:14:26 -07:00
Gavin Andresen dc03c2d584 Merge pull request #3117 from gavinandresen/debuglockprint
Make -DDEBUGLOCKORDER + -debug less noisy
2013-10-20 14:26:21 -07:00
Pieter Wuille 9b1200c23b
Merge pull request #3119
db0e8cc Bump Year Number to 2013 (super3)
2013-10-20 22:25:44 +02:00
super3 db0e8ccd90 Bump Year Number to 2013 2013-10-20 15:25:06 -04:00
Wladimir J. van der Laan 76eb192076 Merge pull request #3108 from Diapolo/paymentserver_style
paymentserver: style fixes / cleanup
2013-10-20 01:01:38 -07:00
Wladimir J. van der Laan 00f198c9a5 Merge pull request #3109 from laanwj/2013_10_remove_walletstack
qt: merge walletstack and walletframe
2013-10-20 00:29:38 -07:00
Chuck 0b8f47dc53 Changing LockedPageManager to use a managed instance
This ensures the allocator is ready no matter when it's needed (as
some STL implementations allocate in constructors -- i.e., MSVC's STL
in debug builds).

Using boost::call_once to guarantee thread-safe static initialization.

Adding some comments describing why the change was made.

Addressing deinitialization of the LockedPageManager object
by initializing it in a local static initializer and adding
an assert in the base's destructor.
2013-10-20 14:29:24 +07:00
Gavin Andresen bd48a4fe49 Merge pull request #2945 from gmaxwell/fee-logic_encourage_sweeping
[Fee logic] Don't count txins for priority to encourage sweeping.
2013-10-19 23:05:04 -07:00
Gavin Andresen f90b690a0d Merge pull request #2884 from gavinandresen/canonicalsizes2
Reject non-canonically-encoded CompactSize
2013-10-19 23:03:04 -07:00
Gavin Andresen d3b0fa1d82 Merge pull request #3008 from gavinandresen/CENTrule
Two small free transaction policy changes
2013-10-19 23:01:47 -07:00
Gavin Andresen 3b9ecfed82 Make -DDEBUGLOCKORDER + -debug less noisy
Print out every mutex lock/unlock if compiled -DDEBUGLOCKORDER
only if -debug=lock is set.
2013-10-20 15:41:15 +10:00
Wladimir J. van der Laan 163145938c qt: remove awkward way of setting GUI pages
Selecting the button for a pages was going through bitcoingui->walletframe->walletview->bitcoingui.
Because of this, the actions for the pages had to be exposed on the BitcoinGUI object.
2013-10-19 17:51:26 +02:00
Philip Kaufmann 95d4a2be95 paymentserver: style fixes / cleanup
- rename reportError() into message() to be in line with our default
  message() signal/slot naming (and can be used for all types of messages)
- rename some QStrings to not collide with message() function
- add a missing message for malformed URIs that IS also used in BitcoinGUI
- fix / extend some comments and misc style fixes
2013-10-19 16:27:04 +02:00
Wladimir J. van der Laan 26702e6930 qt: merge walletstack and walletframe
There were too many levels of indirection here, and the functionality of
walletframe and walletstack can easily be merged. This commit
merges the two which cuts a lot of lines of boilerplate code.
2013-10-18 18:06:19 +02:00
Wladimir J. van der Laan 81cab378cc Merge pull request #3101 from Diapolo/sendcoinsentry
add SendCoinsEntry::updateLabel() function
2013-10-18 07:04:49 -07:00
Philip Kaufmann 1728bf0873 update default -rpcsslciphers to include TLSv1.2
- this extends the accepted ciphersuites with TLSv1.2 ones
- also removes !AH, as I could not find documentation on it and the change
  did not result in a changed ciphersuite list (checked via openssl
  ciphers -v)
- closes #3096 (which also contains more details)
2013-10-17 16:11:25 +02:00
Wladimir J. van der Laan 13b1ecf0d0 Merge pull request #3084 from Diapolo/clientmodel
clientmodel: remove 2 hard-coded values, use CChainParams instead
2013-10-17 04:45:37 -07:00
Gavin Andresen a5bba245a3 Merge pull request #2981 from gmaxwell/tor2onion
Rename -tor to -onion to better reflect what it does.
2013-10-16 20:14:46 -07:00
Gavin Andresen 796e7b7aec Merge pull request #2950 from pstratem/walletload
Walletload
2013-10-16 20:12:38 -07:00
Gavin Andresen 5a8a4be289 Merge pull request #2645 from sipa/inlinesighash
Inline signature serializer
2013-10-16 17:53:31 -07:00
Philip Kaufmann 46b57eb500 add SendCoinsEntry::updateLabel() function
- makes the code for updating a label reusable
- no functional changes
2013-10-16 17:11:39 +02:00
Wladimir J. van der Laan a2bb571c4f Merge pull request #3069 from Diapolo/fix_addressbook
don't touch addressbook when using secure payment-requests
2013-10-15 23:48:47 -07:00
Gavin Andresen 03db5c6112 Merge pull request #3094 from Diapolo/btcamountfield
make BitcoinAmountField::setReadOnly() usable
2013-10-15 22:12:55 -07:00
Gavin Andresen 9e70bff67a Merge pull request #3083 from sipa/chainlocator
CBlockLocator improvements & move to core
2013-10-15 16:31:46 -07:00
Pieter Wuille 7d38af3c49 Push down cs_main locking in ProcessMessage 2013-10-15 22:34:25 +02:00
Pieter Wuille 49d754d915 Run node deletions outside of cs_vNodes 2013-10-15 22:34:25 +02:00
Pieter Wuille 6055b9101b Allow SendMessages to run partially without cs_main
SendMessages() tries to acquire a cs_main lock now, but this isn't nessecary
for much of its functionality. Move those parts out of the locked section,
so they can always be performed, and we hold cs_main for a shorter time.
2013-10-15 22:34:20 +02:00
Philip Kaufmann 75fa27eaca make BitcoinAmountField::setReadOnly() usable
- use it for secure payment-requests (this change allows a copy&paste of
  the amount and looks a little nicer than just a disabled GUI element)
2013-10-15 15:26:22 +02:00
Wladimir J. van der Laan 38d15d8b42 Merge pull request #3080 from Diapolo/sendcoins-paymentreq
Bitcoin-Qt: misc changes for sendcoins and paymentsever
2013-10-15 05:57:17 -07:00
Philip Kaufmann 7dea6345e1 replace %zu with %"PRIszu" macro to prevent compiler warnings 2013-10-15 14:50:58 +02:00
Wladimir J. van der Laan f0c25cf6ec Merge pull request #2924 from sje397/TrafficGraph
[QT] Add network traffic graph to debug window
2013-10-15 03:48:22 -07:00
Philip Kaufmann 96b9603c01 misc spelling / space / style fixes 2013-10-15 12:13:54 +02:00
Philip Kaufmann 47970dac41 clientmodel: remove 2 hard-coded values, use CChainParams instead 2013-10-15 11:55:47 +02:00
Pieter Wuille f9b15a4fc9 Move CBlockLocator to core.h
As CBlockLocator is a P2P data structure, and independent from the
validation logic, it can be moved to core.
2013-10-15 11:09:29 +02:00
Pieter Wuille e4daecda0b Reimplement CBlockLocator's chain-related logic in CChain.
This removes a few unused CBlockLocator methods, and moves the
construction and fork-finding logic to CChain (which can do these
more efficiently, as it has a height-indexable chain available).
It also makes CBlockLocator independent from the validation code.
2013-10-15 11:09:29 +02:00
Gavin Andresen b2ba55c42b Avoid core dump if rpc port is in use.
The cleanup code needs to check for NULL rpcworkers thread group.
2013-10-15 15:30:20 +10:00
Gavin Andresen b9beea6e9d Merge pull request #3077 from sipa/chain
Refactor/encapsulate chain globals into a CChain class
2013-10-14 20:39:00 -07:00
Gavin Andresen ae6601872b Merge pull request #2933 from sipa/leveldb113
Merge upstream LevelDB 1.13
2013-10-14 19:54:27 -07:00
Scott Ellis ce14345a89 Add network traffic graph 2013-10-14 19:02:03 +11:00
Pieter Wuille 9269d0e96e
Merge pull request #2937
971bb3e Added ping time measurement. New RPC "ping" command to request ping. Implemented "pong" message handler. New "pingtime" field in getpeerinfo, to provide results to user. New "pingwait" field, to show pings still in flight, to better see newly lagging peers. (Josh Lehan)
2013-10-13 17:41:28 +02:00
phantomcircuit bc68788317 comment explaining new wallet format for key/wkey entries 2013-10-12 23:44:28 -07:00
Pieter Wuille 4c6d41b8b6 Refactor/encapsulate chain globals into a CChain class 2013-10-11 23:25:50 +02:00
Philip Kaufmann 733511eda0 prevent compiler redefinition warnings
- I observed a massive amount of redefinition warnings after #3071, which
  are silenced by this patch
- uses the same style as we do in other places, where we define _WIN32_WINNT
2013-10-11 15:37:36 +02:00
Philip Kaufmann 48c011489b don't touch addressbook when using secure payment-requests
- fixes #3006 by preventing addressbook changes when using
  secure payment-requests

sq
2013-10-11 15:34:05 +02:00
Philip Kaufmann 06dfd23d41 paymentserver: use own HTML-esc / add new header const
- make processPaymentRequest() use our own HTML-escaping function from
  GUIUtil
- make string "application/bitcoin-payment" a constant (below similar
  constant strings in the .cpp file)
2013-10-11 14:40:08 +02:00
Philip Kaufmann 8a041f494f sendcoinsdialog: display real failed address string
- display the real string (faulty address), which causes the valid address
  check to fail, instead of a stringified "nonsense" CBitcoinAddress
2013-10-11 14:29:09 +02:00
Philip Kaufmann 057bf35bc5 sendcoinsentry: small clear() and setValue() changes
- clear(): clear all UI elements (for secure and insecure payments)
- setValue(): only modify UI elements, which need to be set (for secure
  or insecure payments)
2013-10-11 14:22:43 +02:00
Wladimir J. van der Laan 56c0ba7a0f Merge pull request #3071 from gavinandresen/windows_h
Remove include of windows.h from allocators.h
2013-10-11 05:11:21 -07:00
Wladimir J. van der Laan b0091bb896 wallet: remove automatic update of default key 2013-10-10 14:59:49 +02:00
Wladimir J. van der Laan a302c21e0b Merge pull request #3066 from Diapolo/rem_global
make fCommandLine a local variable in AppInit()
2013-10-09 23:35:42 -07:00
Gavin Andresen d8315d1650 Remove include of windows.h from allocators.h
Create an allocators.cpp, and move all of the #ifdef WIN32
code and the #include of windows.h into it.

Two motives for this cleanup:
1. I'm getting a weird error in windows.h in my smartfee branch.
2. allocators.h is included (indirectly) just about everywhere, so
this should speed up Windows compiles quite a lot.
2013-10-09 16:48:53 +10:00
Philip Kaufmann c7b1d6bbc7 Bitcoin-Qt: ensure Qt icon is shown with Qt >= 5.0 2013-10-08 12:27:57 +02:00
Philip Kaufmann 917ac1dcc1 make fCommandLine a local variable in AppInit() 2013-10-08 10:52:42 +02:00
Gavin Andresen aa56d317a5 Merge pull request #3059 from Diapolo/Shutdown
add missing Boost Thread join_all() call during shutdown
2013-10-07 15:42:07 -07:00
Philip Kaufmann 5ea66c54fb style-police: fixed badly readable code in ProcessMessage()
- I introduced the problem and fixed it with better readable code
2013-10-07 08:55:04 +02:00
Philip Kaufmann c55d1600da add missing Boost Thread join_all() call during shutdown
- fixes #3037 by adding missing join_all() call and brings bitcoind
  shutdown code in line with Bitcoin-Qt shutdown code
- added a comment for the if (!fRet) case
2013-10-07 08:52:54 +02:00
Wladimir J. van der Laan 695a722003 Merge pull request #3056 from Diapolo/stuck_debug_window
Bitcoin-Qt: prevent stuck/unusable debug window on exit
2013-10-06 04:57:08 -07:00
Philip Kaufmann a8d0c1e8cc Bitcoin-Qt: prevent stuck/unusable debug window on exit
- when closing the client with an open debug window, that window could
  become stuck/unsuable (it was still shown wherea the main window was
  hidden already)
- fix this by hiding the debug window, when quitting the the client
2013-10-05 13:15:50 +02:00
David Hill a5e685bcf8 Hurricane Electric uses block 2001:470::, not 2011:470:: 2013-10-04 08:46:45 -04:00
Gavin Andresen 16b3ff66e0 Lower maximum size for free transaction creation
Changes the maximum size of a free transaction that will be created
from 10,000 bytes to 1,000 bytes.

The idea behind this change is to make the free transaction area
available to a greater number of people; with the default 27K-per-block,
just three very-large very-high-priority transactions could fill the space.
2013-10-04 22:05:06 +10:00
Gavin Andresen ea1cd5b47f Remove CENT-output free transaction rule when relaying
Remove the (relay/mempool) rule that all outputs of free transactions
must be greater than 0.01 XBT. Dust spam is now taken care of by making
dusty outputs non-standard.
2013-10-04 22:05:06 +10:00
Josh Lehan 971bb3e901 Added ping time measurement.
New RPC "ping" command to request ping.
Implemented "pong" message handler.
New "pingtime" field in getpeerinfo, to provide results to user.
New "pingwait" field, to show pings still in flight, to better see newly lagging peers.
2013-10-04 01:30:12 -07:00
Philip Kaufmann fbed9c9d63 special case DoS value == 0 in ProcessMessage()
- prevents unneeded log messages, which could make users think something
  bad was happening
2013-10-04 10:12:55 +02:00
Gavin Andresen acb3ebc455 Merge pull request #2947 from gmaxwell/theyre_maturing_faster_these_days
[wallet] Consider generated coins mature at COINBASE_MATURITY+1
2013-10-03 22:52:38 -07:00
Gavin Andresen a68fd1ca14 Merge pull request #3040 from Diapolo/Qt_misc2
Bitcoin-Qt: add missing change from branch Qt_misc
2013-10-03 21:42:27 -07:00
Gavin Andresen af880e8d3a Merge pull request #3050 from Diapolo/fix_IsRFC4193_comment
fix #3049 by changing comment for CNetAddr::IsRFC4193()
2013-10-03 21:12:48 -07:00
Gavin Andresen fea7236ca3 Merge pull request #3051 from Diapolo/bitcoind-rc
rename bitcoin-res.rc to bitcoind-res.rc
2013-10-03 21:11:57 -07:00
Jeff Garzik 5ad5e2d836 Merge pull request #3038 from Diapolo/Log_Shutdown
log start and end of Shutdown()
2013-10-03 06:16:06 -07:00
Philip Kaufmann cbf87fc4a6 rename bitcoin-res.rc to bitcoind-res.rc
- helps recognizing that the resource file belongs to bitcoind.exe
2013-10-03 15:06:31 +02:00
Philip Kaufmann c1761a5df3 fix #3049 by changing comment for CNetAddr::IsRFC4193() 2013-10-03 15:03:33 +02:00
Jeff Garzik a79342479f Relay OP_RETURN data TxOut as standard transaction type 2013-10-02 11:49:43 -04:00
Jeff Garzik 28f6b8dbad RPC validateaddress: test pwalletMain for NULL (no-wallet mode) 2013-10-02 05:51:13 -04:00
Philip Kaufmann ced3c24816 log start and end of Shutdown()
- could be helpful when debugging shutdown related problems
2013-10-02 08:36:47 +02:00
Jeff Garzik 19e5ae7369 Merge branch 'pwalletmain' - checking pwalletMain for NULL,
a pre-req for no-wallet support.
2013-10-01 16:18:50 -04:00
Jeff Garzik b0730874d9 Support absence of wallet (pwalletMain==NULL) in several locations,
notably RPC.
2013-10-01 16:14:37 -04:00
Wladimir J. van der Laan b63ae2a534 Merge pull request #2991 from Diapolo/translation_fixes
Bitcoin-Qt: translation fixes in sendcoins
2013-10-01 08:18:48 -07:00
Jeff Garzik 19c415b1cf Merge pull request #2888 from litecoin-project/getnetworkhashps
Add getnetworkhashps to get the estimated network hashrate
2013-10-01 07:09:04 -07:00
Philip Kaufmann 23b48d13f1 Bitcoin-Qt: translation fixes in sendcoins
- remove some unneeded translatable strings from sendcoinsentry.ui file and
  rename some elements for better readability
- optimize string prorcessing in SendCoinsDialog::on_sendButton_clicked()
- make all UI labels for secure payments plain text and move the settings
  to sendcoinsentry.ui file
- remove unneeded button and default button definiton from warning message
  boxes
- remove fixed font-size when sending coins to an address with label and
  use monospace font for addresses
2013-10-01 15:48:25 +02:00
Philip Kaufmann ab25271d3c Bitcoin-Qt: add missing change from branch Qt_misc
- remove an unneeded debug message in walletframe
2013-10-01 14:15:19 +02:00
Philip Kaufmann f65dddc7b2 misc small spelling/indentation fixes 2013-10-01 09:47:16 +02:00
Pieter Wuille 6865127551 Merge pull request #3015 from theuni/win32-version-info
Win32 version info
2013-09-29 06:49:23 -07:00
Philip Kaufmann d5f0ef54f8 several small Qt-related fixes
- make BitcoinGUI::showPaymentACK() use a reference for msg and use our
  own GUIUtil::HtmlEscape() function
- ensure QTimer usage in clientmodel is the same as in walletmodel
- remove an unneeded debug message in walletframe
- flag some parameters as unused in DebugMessageHandler()
- small code formatting changes
2013-09-28 19:32:34 +02:00
Pieter Wuille f5857e5cb5 Inline signature serializer
Instead of building a full copy of a CTransaction being signed, and
then modifying bits and pieces until its fits the form necessary
for computing the signature hash, use a wrapper serializer that
only serializes the necessary bits on-the-fly.

This makes it easier to see which data is actually being hash,
reduces load on the heap, and also marginally improves performances
(around 3-4us/sigcheck here). The performance improvements are much
larger for large transactions, though.

The old implementation of SignatureHash is moved to a unit tests,
to test whether the old and new algorithm result in the same value
for randomly-constructed transactions.
2013-09-28 18:37:00 +02:00
Wladimir J. van der Laan 7de4e47d5f Merge pull request #3031 from Diapolo/miner
internal miner: move 2 globals from main to miner
2013-09-28 01:21:57 -07:00
Wladimir J. van der Laan 18c5910e8f Merge pull request #3027 from cozz/cozz2
GUI: fix sendcoinsdialog/sendcoinsentry
2013-09-28 00:46:41 -07:00
Philip Kaufmann 8d750f1d21 internal miner: move 2 globals from main to miner
- moves 2 global variables from main.cpp/h to miner.cpp/h
- also removes 2 unneded includes in miner.cpp, that come from miner.h
  already
2013-09-25 15:48:11 +02:00
Cozz Lovan 5dc9164edc GUI: fix sendcoinsdialog/sendcoinsentry 2013-09-24 16:10:38 +02:00
Pieter Wuille 99740bab9c Skip unspendable outputs in consistency check 2013-09-24 14:11:20 +02:00
Gavin Andresen fb8724ee6c Merge pull request #2791 from sipa/proveprune
Prune provably-unspendable outputs
2013-09-23 14:23:14 -07:00
Pieter Wuille a28fb70e45 Merge pull request #3016 from sipa/lows
Use 'low S' as malleability breaker rather than 'even S'
2013-09-23 06:05:29 -07:00
Gavin Andresen ff4e3e63e7 Merge pull request #2949 from gmaxwell/fewer_fee_footguns
[raw] reject insanely high fees by default in sendrawtransaction
2013-09-22 16:44:35 -07:00
Wladimir J. van der Laan c2f4187263 Merge pull request #2995 from Diapolo/GUI_message
Bitcoin-Qt: BitcoinGUI::message() updates/fixes
2013-09-20 23:38:56 -07:00
Philip Kaufmann faaeae1eb3 fix some printf -> LogPrintf leftovers 2013-09-20 10:49:34 +02:00
Pieter Wuille e0e14e43d9 Use 'low S' as malleability breaker rather than 'even S' 2013-09-20 09:30:41 +02:00
Pieter Wuille 367c29d6e0 Bugfix: nHeightLast instead of nHeightFirst 2013-09-19 10:44:35 +02:00
Pieter Wuille 1657ed2ab4 Fix minor unit test memory leaks 2013-09-19 00:01:46 +02:00
Cory Fields dee632cc25 win32: add version info to bitcoind.exe
TODO: Add icon info
2013-09-18 17:58:53 -04:00
Cory Fields 7a3df1cd94 autotools: fix the Makefile.include to be safely included anywhere.
This way we can reuse rules rather than duplicating them.
2013-09-18 17:12:39 -04:00
Cory Fields c546dc05bb autotools: fix subdir m4 check, never let it return -I
If BDB_CPPFLAGS returns only "-I", the next argument sent to the preprocessor
is treated as a path. There are 2 fixes here:

1. Check in CPPFLAGS, as a user might have manually passed a path to check.
2. Ensure the value is not empty before setting BDB_CPPFLAGS to "-I value"
2013-09-18 17:11:41 -04:00
Wladimir J. van der Laan 9a4a7d3c6a qt: english translation update 2013-09-18 13:32:09 +02:00
Jeff Garzik acafc9ceb1 Add src/.gitignore: ignore src/test_bitcoin 2013-09-18 07:07:41 -04:00
Gavin Andresen 881a85a22d Replace printf with LogPrintf / LogPrint 2013-09-18 20:39:25 +10:00
Gavin Andresen e51321fb75 Refactor: OutputDebugStringF -> LogPrint(category, ...) 2013-09-18 20:39:24 +10:00
Gregory Maxwell d6eb259953 [Fee logic] Don't count txins for priority to encourage sweeping.
This changes the priority calculation to not include the size of per-txin
 data including up to 110 bytes of scriptsig so that transactions which
 sweep up extra UTXO don't lose priority relative to ones that don't.

I'd toyed with some other variations, but it seems like any formulation
 which results in an incentive stronger than making them not count will
 sometimes create incentives to add extra outputs so that you have
 extra inputs to consume later.  The maximum credit is limited so that
 users don't lose the disincentive to stuff random data in their
 transactions, the limit of 110 is based on the size of a P2SH
 redemption with a compressed public key.

This shouldn't need a staged deployment because the priority is not
 used as a relay criteria, only a mining criteria.
2013-09-17 10:56:54 -07:00
coblee d64eef48a4 Add getnetworkhashps to get the calculated network hashrate 2013-09-17 11:15:02 +08:00
Cory Fields 152e51c7af included-tests: generate binary data from test files for inclusion into test binaries
This change moves test data into the binaries rather than reading them from
the disk at runtime.

Advantages:
- Tests become distributable
- Cross-compile friendly. Build on one machine and execute in an arbitrary
  location on another.
- Easier testing for backports. Users can verify that tests pass without having
  to track down corresponding test data.
- More trustworthy test results and easier quality assurance as tests make
  fewer assumptions about their environment.
- Tests could theoretically run at client/daemon startup and exit on failure.

Disadvantages:
- Required 'hexdump' build-dependency. This is a standard bsd tool that should
  be usable everywhere. It is likely already installed on all build-machines.
- Tests can no longer be fudged after build by altering test-data.
2013-09-16 12:53:11 -04:00
Jeff Garzik a25cd0bfdf Merge pull request #3000 from gmaxwell/more_osx_fsync
More fixes for blockchain corruption on OSX.
2013-09-16 06:25:12 -07:00
Cory Fields cae63be6c9 autotools: fix a parallel build race condition spotted by the pull-tester
libleveldb.a and libmemenv.a should be able to build in parallel, but in
practice calling the leveldb makefile ends up rewriting build_config.mk. If
one target tries to build while the other is halfway through writing the
.mk, the make ends up in an undefined state.

Fix that by making one depend on the other. This also reorders the variables
to be passed by param rather than via the environment, and combines the targets
into a single rule to avoid needless duplication.
2013-09-16 01:59:03 -04:00
Gregory Maxwell e7bad10c12 More fixes for blockchain corruption on OSX.
As we'd previously learned, OSX's fsync is a data eating lie.

Since 0.8.4 we're still getting some reports of disk corruption on
 OSX but now all of it looks like the block files have gotten out of
 sync with the database. It turns out that we were still using fsync()
 on the block files, so this isn't surprising.
2013-09-15 20:34:29 -07:00
Gavin Andresen 2975db76b3 Merge pull request #2996 from theuni/qt-translation
Update translation process for autotools
2013-09-14 16:17:27 -07:00
Cory Fields 21ffa3ce3a autotools: add translate target for qt translations 2013-09-14 12:11:38 -04:00
Philip Kaufmann b26f9d893c Bitcoin-Qt: BitcoinGUI::message() updates/fixes
- ensure message boxes are shown in center of our main window, not
  centered on the users desktop
- always prefer user supplied titles for message boxes over the functions
  defaults (fixes a bug, where transaction info messages did not contain
  information, if it was incoming or outgoing)
2013-09-14 18:04:30 +02:00
Cory Fields f286aa1611 autotools: rearrange qt sources to make them more flexible
Add BITCOIN_MM QR_CPP and BITCOIN_CPP in order to better accomodate complicated
targets. This is a no-op change.
2013-09-14 11:51:44 -04:00
Peter Todd 2253642287
Make validateaddress provide redeemScript 2013-09-12 22:54:43 -04:00
Peter Todd be066fad7d Add RPC call decodescript 2013-09-12 22:53:54 -04:00
Peter Todd 463c9710f5 Move Parse{Hash|Hex} to be usable by all RPC code 2013-09-12 22:53:54 -04:00
Gregory Maxwell 11a79680b1 Merge pull request #2979 from luke-jr/autoconf
Autoconf fixes
2013-09-10 17:51:05 -07:00
Gregory Maxwell 85311c1ef8 Merge pull request #2982 from gmaxwell/20130908_ccoins_corrupt
Longer term workaround for chainstate corruption from negative versions.
2013-09-10 16:07:34 -07:00
Luke Dashjr 1e9d3b1392 Bugfix: Since test_bitcoin is being built and run inside src/test/, try using relative directories from that point 2013-09-10 23:04:56 +00:00
Luke Dashjr 941dba1783 configure: Check common include subdirectories for bdb headers, and refuse to use any version other than 4.8 by default 2013-09-10 22:26:00 +00:00
Cory Fields b4d8d03b86 autotools: use an absolute path to test data 2013-09-10 18:23:22 -04:00
Philip Kaufmann d78900cc1b fix some cosmetic glitches in the codebase
- rename URL into URI in paymentserver where correct
- add some missing Qt-coding-stuff in paymentserver
- change QSpinBox to QLineEdit as base for BitcoinAmountField in .ui files
  (as this is the result when converting the BAF back into base)
- remove some c_str() and replace with QString::fromStdString()
- remove several new-lines
- remove unneeded spaces
- indentation fixes
2013-09-09 12:36:04 +02:00
Gregory Maxwell f8b7aa8625 Longer term workaround for chainstate corruption from negative versions.
This also makes negative transaction versions non-standard.

This avoids an issue triggered in block 256818 where transactions with
negative version numbers were incorrectly serialized into the UTXO set.

On restart nodes detect the inconsistency and refuse to start so long as
a block with these transactions is inside the self-consistency check
window, logging "coin database inconsistencies found". The software
recommends reindexing, but reindexing does not correct the problem.

This should be fixed by changing the chainstate serialization, but
working around it seems harmless for now because the version is not
used by any network rule currently.

A patch free workaround is to start with -checklevel=2 which skips
the consistency checks, but the IsStandard change is important for
miners in order to protect unpatched nodes.
2013-09-09 02:11:11 -07:00
Gavin Andresen 4c723841e2 Merge pull request #2968 from TheBlueMatt/master
Don't warn about forks while fIsInitialDownload
2013-09-08 17:48:42 -07:00
Gregory Maxwell 102518fdb7 Rename -tor to -onion to better reflect what it does.
I've seen users confused multiple times thinking they
 should be using -tor to set their tor proxy and then
 finding in horror that they were still connecting to
 the IPv4 internet.

Even Jeff guesses wrong about what the knob does, so
 I think we should rename it. This leaves the old
 knob working, we can pull it out completely in a
 later release.
2013-09-08 04:54:06 -07:00
Warren Togami a6b3de1395 Silence useless warning in src/json/json_spirit_writer_template.h to make important warnings easier to see.
warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
2013-09-07 21:20:46 -10:00
Jeff Garzik 15fd245b9a Merge pull request #2943 from theuni/autotools-final
Autotools buildsystem
2013-09-06 17:09:55 -07:00
Wladimir J. van der Laan 495242c1ad Merge pull request #2976 from laanwj/2013_09_txid_details
qt: add vout index to transaction id in transactions details dialog
2013-09-06 04:21:45 -07:00
Wladimir J. van der Laan ed4c7fd4fd qt: add vout index to transaction id in transactions details dialog 2013-09-06 12:12:18 +02:00
Philip Kaufmann 42018eff07 Bitcoin-Qt: Use qDebug() for printing to debug.log
- removes all usages of PrintDebugStringF from Qt code
- ensure same format for all debug.log messages "functionname : Message"
2013-09-06 10:32:07 +02:00
Cory Fields 35b8af9226 autotools: switch to autotools buildsystem 2013-09-05 21:31:03 -04:00
Gregory Maxwell a22eed6a1e Make settxfee clear that units are btc/kb. 2013-09-05 17:56:13 -07:00
Gavin Andresen 2fee100f03 Merge pull request #2944 from gavinandresen/acceptheader
Set Accept: application/bitcoin-paymentrequest header
2013-09-03 19:52:38 -07:00
Matt Corallo 55ed3f1475 Don't warn about forks while fIsInitialDownload 2013-09-03 22:22:13 -04:00
Gregory Maxwell dd30937ce3 Merge pull request #2948 from jgarzik/changeaddr
RPC: add getrawchangeaddress, for raw transaction change destinations
2013-09-02 20:29:02 -07:00
Wladimir J. van der Laan f4f048ee58 Merge pull request #2958 from laanwj/2013_08_txfee2
[Qt] Display txfee in first sendCoinsDialog message box
2013-09-02 09:48:10 -07:00
Timothy Stranex ccf3af77c1 Fix typo in a comment: it's base58, not base48. 2013-09-02 17:27:27 +02:00
Wladimir J. van der Laan 1537d174d7 Merge pull request #2951 from laanwj/2013_08_addressbook_purpose
[Qt] Handle address purpose in incremental updates
2013-09-02 05:47:58 -07:00
Philip Kaufmann e664c3d70c Bitcoin-Qt: allow to differentiate Qt log entries from core
- prepend "Bitcoin-Qt" in front of debug.log entries, which come from Qt
- move DebugMessageHandler installation upwards to the event handler
  installation, which fits much better
2013-08-31 15:35:39 +02:00
Jonas Schnelli 9e8904f6ae qt: Display txfee in first sendCoinsDialog message box
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-08-31 12:41:47 +02:00
Wladimir J. van der Laan 9d2fee17e0 qt: Use GUIUtil::HtmlEscape to escape HTML
This is why we created this function. Avoids some #ifdef.
2013-08-30 14:38:09 +02:00
Wladimir J. van der Laan 5da998e887 qt: Add comment to sorting step in refreshAddressTable 2013-08-30 08:25:25 +02:00
Wladimir J. van der Laan 1a12b3e090 Merge pull request #2930 from Diapolo/displayUnit
Bitcoin-Qt: fixes for using display unit from options
2013-08-29 07:37:30 -07:00
Wladimir J. van der Laan dcd0b0775e qt: Handle address purpose in incremental updates
Correctly use the purpose of addresses that are added after the start
of the client. Addresses with purpose "refund" and "change" should not
be visible in the GUI. This is now handled correctly.
2013-08-29 16:25:51 +02:00
Pieter Wuille ae6eac667b Merge pull request #2940 from Diapolo/checkpoint
move Checkpoints:fEnabled from step 2 to step 3 in init
2013-08-29 01:59:35 -07:00
Philip Kaufmann bdd0c59ab0 Bitcoin-Qt: fixes for using display unit from options
- extend PaymentServer with setOptionsModel() and rework initNetManager()
  to make use of that
- fix all other places in the code to use display unit from options and no
  hard-coded unit
2013-08-29 10:38:51 +02:00
patrick s a42eef6f10 verify vchPubKey matches calculated public key unless fSkipCheck is set 2013-08-29 01:11:47 -07:00
patrick s 6e51b3bddf improve wallet load time by removing duplicated calls to EC_KEY_check_key and adding a hash for vchPubKey/vchPrivKey entries in wallet.dat
backwards compatible with previous wallet.dat format
2013-08-28 23:53:26 -07:00
Gregory Maxwell 9d14e689c8 [raw] reject insanely high fees by default in sendrawtransaction
There have been several incidents where mainnet experimentation with
 raw transactions  resulted in insane fees.  This is hard to prevent
 in the raw transaction api because the inputs may not be known.
 Since sending doesn't work if the inputs aren't known, we can catch
 it there.

This rejects fees > than 10000 * nMinRelayTxFee or 1 BTC with the
 defaults and can be overridden with a bool at the rpc.
2013-08-28 15:49:51 -07:00
Jeff Garzik e5e9904c1c RPC: add getrawchangeaddress, for raw transaction change destinations 2013-08-28 16:29:52 -04:00
Wladimir J. van der Laan ff33a3470d Merge pull request #2931 from Diapolo/intro
Bitcoin-Qt: add testnet check and icon to intro dialog
2013-08-28 12:17:17 -07:00
Gregory Maxwell 1ef0067eab Merge pull request #2904 from gmaxwell/newaddr-no-passphrase
[QT] Don't ask for a passphrase to getnewaddress.
2013-08-28 11:20:09 -07:00
Gregory Maxwell bf3a20a6e8 [wallet] Consider generated coins mature at COINBASE_MATURITY+1
We're not seeing large reorgs that would justify waiting a large
 amount past the rule required maturity, and the extra three
 hours is just a nuisance. Take one more block to at least give
 the 100th block time to propagate.
2013-08-28 10:16:50 -07:00
Gavin Andresen b773da064d Set Accept: application/bitcoin-paymentrequest header
Suggestion from BitPay: set an Accept: HTTP header when
fetching payment requests / payment ACKs.
2013-08-28 11:48:39 +10:00
Jeff Garzik bb7d0fc12f Merge pull request #2928 from jgarzik/cnb-txout
CreateNewBlock / getblocktemplate cleaning
2013-08-25 18:49:25 -07:00
Gavin Andresen b62dc051aa Merge pull request #2938 from petertodd/op-reserved-weirdness
Document and test OP_RESERVED weirdness
2013-08-25 18:17:59 -07:00
Jeff Garzik f1dbed9233 miner: constify CreateNewBlock() arg scriptPubKeyIn 2013-08-25 20:16:23 -04:00
Peter Todd 214d45b6b9
Document and test OP_RESERVED weirdness
Seems it was forgotten about when IsPushOnly() and the unittests were
written. A particular oddity is that OP_RESERVED doesn't count towards
the >201 opcode limit unlike every other named opcode.
2013-08-25 12:37:07 -04:00
Pieter Wuille 8a9e538227 Merge pull request #2935 from sipa/obounds
Fix out-of-bounds check
2013-08-25 07:42:21 -07:00
Philip Kaufmann 60fc1b4034 move Checkpoints:fEnabled from step 2 to step 3 in init
- it belongs to parameter-to-internal flags step, not parameter
  interactions phase
2013-08-25 13:25:21 +02:00
Jeff Garzik 3d86e7cd48 Merge pull request #2618 from fcicq/solaris-support
Partial solaris support
2013-08-24 20:19:24 -07:00
Jeff Garzik 750ae29664 Merge pull request #2852 from petertodd/getblock-chainwork
Add 'chainwork' to getblock
2013-08-24 19:45:50 -07:00
Pieter Wuille 24e5d7d5ae Fix out-of-bounds check 2013-08-24 23:22:27 +02:00
Pieter Wuille 877b5e3653 Merge src/leveldb changes for LevelDB 1.13 2013-08-24 22:21:41 +02:00
Philip Kaufmann d9baa28f92 Bitcoin-Qt: add testnet check and icon to intro dialog 2013-08-24 15:20:37 +02:00
Jeff Garzik 7bb0f6c5e8 RPC: getblocktemplate does not require a key, to create a block template
getblocktemplate only uses certain portions of the coinbase transaction,
notably ignoring the coinbase TX output entirely.

Use CreateNewBlock() rather than CreateNewBlockWithKey(), eliminating
the needless key passing.

Should be zero behavior changes.
2013-08-24 00:45:17 -04:00
Jeff Garzik 7e17018995 CreateNewBlock() now takes scriptPubKey argument,
rather than a key.

CreateNewBlockWithKey() helper is added to restore existing functionality,
making this an equivalent-transformation change.
2013-08-24 00:33:46 -04:00
Gregory Maxwell 71ac5052d8 Remove fAllowReuse from GetKeyFromPool.
With the GUI password fix this was always false.
2013-08-23 12:54:50 -07:00
Gregory Maxwell 20469d83dd [QT] Don't ask for a passphrase to getnewaddress.
With an encrypted wallet the GUI was prompting for a passphrase every time
 the user requested a new address.  This is unnecessary, increases the
 exposure to keyboard sniffers, and discourages using fresh addresses for
 every transaction.

Instead only prompt for a passphrase when the keypool runs out, also call
 the new address function with the flag that prevents reuse.

Thanks to AlexNagy on IRC for pointing this out and who wouldn't take any
 lip from a curmudgeonly developer and insisted on what he knew to be true.
2013-08-23 12:01:57 -07:00
Philip Kaufmann 6728e00776 Bitcoin-Qt: extend some checks for valid model pointers 2013-08-23 13:07:20 +02:00
Philip Kaufmann dbc0a6aba2 Bitcoin-Qt: tweak Qt walletXXX.cpp/h code
WalletView:
- add new signal showNormalIfMinimized()
- emit the new signal in handleURI() to fix a bug, preventing the main
  window to show up when using bitcoin: URIs

WalletStack:
- connect the showNormalIfMinimized() signal from WalletView with the
  showNormalIfMinimized() slot in BitcoinGUI
- rework setCurrentWallet() to return a bool
- add check for valid walletModel in addWallet()
- add missing gui attribute initialisation in constructor

WalletFrame:
- remove unused or unneded class attributes gui and clientModel
- add a check for valid clientModel in setClientModel()

General:
- small code formatting changes
2013-08-23 09:10:31 +02:00
Gavin Andresen e62f8d72f3 Merge pull request #2539 from gavinandresen/paymentrequest
Payment Protocol Work
2013-08-22 01:54:28 -07:00
Gavin Andresen a41d5fe019 Payment Protocol: X509-validated payment requests
Add support for a Payment Protocol to Bitcoin-Qt.

Payment messages are protocol-buffer encoded and communicated over
http(s), so this adds a dependency on the Google protocol buffer
library, and requires Qt with OpenSSL support.
2013-08-22 16:18:25 +10:00
Gavin Andresen 47d0534368 Route qDebug() messages to debug.log 2013-08-22 11:05:45 +10:00
Gavin Andresen a73aa68b84 Rework when payment server is started 2013-08-22 11:05:45 +10:00
Philip Kaufmann a2189fbaf6 update SelectParamsFromCommandLine() handling/order
- move SelectParamsFromCommandLine() from init.cpp to bitcoin.cpp to allow
  to use TestNet() for Bitcoin-Qt instead of GetBoolArg("-testnet", false)
- change order in bitcoind.cpp to match bitcoin.cpp functionality
- hamonize error message strings for missing datadir and failing
  SelectParamsFromCommandLine() in bitcoin.cpp and bitcoind.cpp
- use TestNet() call in splashscreen.cpp
2013-08-22 11:05:45 +10:00
Gavin Andresen 3624356e82 Refactor: Move GetAccountAddresses to CWallet 2013-08-22 11:05:45 +10:00
Gavin Andresen 618855133d Refactor: CAddressBookData for mapAddressBook
Straight refactor, so mapAddressBook stores a CAddressBookData
(which just contains a std::string) instead of a std::string.

Preparation for payment protocol work, which will add the notion
of refund addresses to the address book.
2013-08-22 11:05:45 +10:00
Gavin Andresen b94595bb7f GetDataDir(): cache paths for each network separately 2013-08-22 11:05:44 +10:00
Gavin Andresen 57d80467f1 Reject dust amounts during validation
Replaces the validation check for "amount == 0" with an isDust check,
so very small output amounts are caught before the wallet
is unlocked, a transaction is created, etc.
2013-08-22 11:05:44 +10:00
Philip Kaufmann 88ff655987 translations update for 0.8.4
- update translation master files
- include current translations from Transifex
- add several new languages
- fix a bug in bitcoin.qrc, which prevents some languages from beeing used
  (wrong file extension .ts instead of .qm was used)
2013-08-21 15:35:50 +02:00
Gavin Andresen b986663ccd Merge pull request #2919 from gmaxwell/bloom_faster
Update the bloom state on the real object, not the temporary one.
2013-08-20 20:12:51 -07:00
Gregory Maxwell a7f533a972 Update the bloom state on the real object, not the temporary one.
This resulted in just passing all transactions to filtered wallets
which worked surprisingly well, except where it didn't.
2013-08-20 17:46:07 -07:00
Gavin Andresen 449fb40aa9 Merge pull request #2915 from petertodd/murmurhash-tests
Add MurmurHash3() unit test
2013-08-20 17:19:28 -07:00
Gavin Andresen 5250fdcc6c Merge pull request #2914 from gmaxwell/bloom_faster
Performance optimization for bloom filters.
2013-08-20 15:52:49 -07:00
Pieter Wuille b28d8b423b Merge leveldb subtree change.
* On Mac OS X fsync does not guarantee write to disk. Use fcntl F_FULLFSYNC instead.
2013-08-20 15:13:34 +02:00
Peter Todd 4eecdcacaf
Add MurmurHash3() unit test
Useful as a source of test vectors to anyone re-implementing bloom
filters.
2013-08-20 07:30:39 -04:00
Gregory Maxwell 37c6389c5a Performance optimization for bloom filters.
This reduces a peer's ability to attack network resources by
 using a full bloom filter, but without reducing the usability
 of bloom filters.  It sets a default match everything filter
 for peers and it generalizes a prior optimization to
 cover more cases.
2013-08-20 02:27:26 -07:00
Gavin Andresen bb237705d0 Checkpoint at block 250,000 2013-08-20 17:30:33 +10:00
phelixbtc d1862bf309 makefile.mingw: Fix Win32 RPC Crashes.
8864019f6d
2013-08-19 17:19:08 +02:00
Pieter Wuille 4a9a8f3f48 Merge commit '84d6d69fc69662b2709fffbeaf3c3b4f53c535b1' 2013-08-18 00:58:04 +02:00
Gavin Andresen 317f57ec87 Merge pull request #2903 from Michagogo/listsinceblock-help
Clarified the listsinceblock help test
2013-08-15 20:34:00 -07:00
Gavin Andresen 31b28082fe Merge pull request #2891 from gavinandresen/leveldb_printerror
Use HandleError() consistently to handle leveldb errors
2013-08-15 19:02:32 -07:00
Gavin Andresen 3f20f82209 Merge pull request #2880 from gavinandresen/test_numequal
More unit tests for OP_NUMEQUAL
2013-08-15 18:53:49 -07:00
Gavin Andresen a0bb001431 Merge pull request #2886 from gavinandresen/rpctiming
Make RPC password resistant to timing attacks
2013-08-15 18:53:26 -07:00
Gavin Andresen 9be4cff5f6 Merge pull request #2876 from sipa/fixreorgcrash
Fix reorganization crash
2013-08-15 18:51:06 -07:00
Gregory Maxwell 47491a90b6 Merge pull request #2131 from sipa/evens
Only create signatures with even S, and verification mode to check.
2013-08-15 18:42:28 -07:00
Gavin Andresen 13d3b1c144 Merge pull request #2829 from sipa/bip32
BIP 32 derivation + test vectors
2013-08-15 16:40:03 -07:00