Commit graph

3440 commits

Author SHA1 Message Date
Cory Fields c614bd718b qt5: fix a build issue with osx and qtdbus
See comment in notificator.cpp for details.
2014-01-10 16:30:33 -05:00
Cory Fields 328bdb1cd6 qt5: Ensure correct link order
If optional libs don't appear in QT_LIBS, they need to be listed first for
proper static linking.
2014-01-10 16:30:33 -05:00
Wladimir J. van der Laan a036b796d1
Merge pull request #3347
7e195e8 [Qt] massive options/settings rework (no core changes) (Philip Kaufmann)
2014-01-10 12:55:12 +01:00
Philip Kaufmann 6a1bf00425 [Qt] display native dir separators in select dadatir dialog
- fixes display on Windows now \ instead of / before
2014-01-10 11:43:29 +01:00
Wladimir J. van der Laan 5b45bf400e
Merge pull request #3488
2102ab9 ui: Fix GUI initialization order (Wladimir J. van der Laan)
2014-01-10 11:39:42 +01:00
Wladimir J. van der Laan c07dd453e4
Merge pull request #3432
b960fcb [Qt] update bitcoin-qt.pro and assets-attribution.md (Philip Kaufmann)
2014-01-10 08:56:33 +01:00
Wladimir J. van der Laan eaafa23cbd Add test for GetTime()
Test for mingw/wine issue #3494, where the upper word of time(NULL)
return value gets clobbered.
2014-01-09 11:35:38 +01:00
Wladimir J. van der Laan 13e99e463d
Merge pull request #3491
04f58ff qt: Better status text for mined transactions (Wladimir J. van der Laan)
2014-01-09 10:08:41 +01:00
Philip Kaufmann b960fcb86a [Qt] update bitcoin-qt.pro and assets-attribution.md
- remove unused and unmentioned file notsynced.png (we use an animation
  for this)
- add missing coincontroldialog.ui to bitcoin-qt.pro
- also unify formating in assets-attribution.md
2014-01-09 07:38:08 +01:00
Wladimir J. van der Laan 6d697e9fa4
qt: Update translations
Update current translations, and add new languages:

- es_MX: Spanish (Mexico)
- pam: Kapampangan

Also update translation process for autoconf-based build system.
2014-01-08 18:48:39 +01:00
Wladimir J. van der Laan 549e69a558
Merge pull request #3449
8b9adca Allow `-noserver` with bitcoind (Wladimir J. van der Laan)
2014-01-08 14:42:07 +01:00
Wladimir J. van der Laan d696820b45
build: Correctly put boost at end of LDADD
This fixes linking issues when statically linking
(thanks @imwuzhh).
2014-01-07 09:12:56 +01:00
Wladimir J. van der Laan 04f58ffd9d qt: Better status text for mined transactions
Fixes ancient issue #614.
2014-01-06 16:30:19 +01:00
Philip Kaufmann 7e195e8459 [Qt] massive options/settings rework (no core changes)
- add new options for database cache and script verification threads
- add label which displays options that are overridden by command-line
  parameters
- proxy settings are not applied on-the-fly anymore and require a client
  restart (ApplyProxySettings() was removed and was not working very well
  anyway)
- re-work options reset and require a client shutdown (as it is much
  easier to do it this way without having to mess with what can be changed
  on-the-fly and what needs a restart anyway)
- options reset now writes default values for every single option
- when changing an option which requires a client restart display a 10
  second warning message in statusLabel (via a QTimer)
- when applying the changes via ok change that to a persistent message,
  which is displayed even after closing optionsdialog and re-open it, when
  no client restart was made
- remove dialog boxes used when changing language or proxy settings
- add setRestartRequired() and isRestartRequired() to OptionsModel and
  use the set function when updating options to signal OptionsDialog
  when a restart is needed
- resize optionsdialog a little and add some min sizes for certain GUI
  elements
- remove apply button from optionsdialog
- save and restore optionsdialog window position
- update nTransactionFee in QSettings with a set -paytxfee value when
  opening optionsdialog (I'm not sure about this yet, perhaps revert to
  not updating QSettings and just display current -paytxfee value in
  optionsdialog.)
2014-01-06 16:19:04 +01:00
Wladimir J. van der Laan 2a7201570b qt: Remove unused method OptionsModel::getTransactionFee 2014-01-06 15:10:21 +01:00
Philip Kaufmann 7e08e29117 better std::exception logging for block/undo files 2014-01-06 15:09:26 +01:00
Wladimir J. van der Laan d31ad26550 qt: Add missing lock in WalletModel::listCoins
Another problem detected by cs_wallet lock detection (#3401).
2014-01-06 13:36:24 +01:00
Wladimir J. van der Laan 28352af060 qt: protect SetAddressBook with cs_wallet lock everywhere 2014-01-06 13:36:24 +01:00
Wladimir J. van der Laan aaf8d15708 qt: Add missing LOCKs for locked coin functions
These don't aquire the wallet lock internally, so the caller has to do
it.
2014-01-06 10:34:34 +01:00
Wladimir J. van der Laan 4757e92318 qt: add missing cs_wallet lock in AddressTableModel::setData
duplicate check in AddressTableModel::setData accesses
wallet data structure as well as SetAddressBook without proper LOCK, fix this.
2014-01-06 10:34:33 +01:00
Wladimir J. van der Laan 7aedb91476
Merge pull request #3401
012ca1c LoadWallet: acquire cs_wallet mutex before clearing setKeyPool (Wladimir J. van der Laan)
9569168 Document cs_wallet lock and add AssertLockHeld (Wladimir J. van der Laan)
19a5676 Use mutex pointer instead of name for AssertLockHeld (Wladimir J. van der Laan)
2014-01-06 10:34:01 +01:00
Wladimir J. van der Laan ab086e0bd3
Merge pull request #3422
daa6b20 Unittests for uint256.h (Thomas Holenstein)
e85e19b Changed Get64(.) to GetLow64() (Thomas Holenstein)
2014-01-06 10:29:08 +01:00
Wladimir J. van der Laan 2102ab9f5c ui: Fix GUI initialization order
Fixes at least #3478.

Splits and documents the phases:
1. Parse command-line options. These take precedence over anything else.
2. Basic Qt initialization (not dependent on parameters or configuration)
3. Application identification
4. Initialization of translations
5. Now that settings and translations are available, ask user for data directory
6. Determine availability of data directory and parse bitcoin.conf
7. URI IPC sending
8. Main GUI initialization

Splits command line parsing logic from ipcSendCommandLine into
ipcParseCommandLine, as isTestNet() can only be overridden in the early
stages before choosing a data directory. Sending however needs to happen
after choosing a data directory.
2014-01-05 12:55:03 +01:00
Wladimir J. van der Laan 16403b4275
Merge pull request #3474
aec55a0 "getnetworkhashps" with defaults was yielding "0", the hashrate is not 0. (Gregory Maxwell)
2014-01-05 10:43:10 +01:00
Wladimir J. van der Laan 51947e4972
Merge pull request #3480
340bff3 ui: Better tab order in send coins entry (Wladimir J. van der Laan)
2014-01-04 13:13:37 +01:00
Christian Decker cdc11b3228 Added new DNS seed from bitcoinstats.com. 2014-01-03 14:01:39 +01:00
Wladimir J. van der Laan 340bff34b7 ui: Better tab order in send coins entry
Pressing <tab> after entering a label now brings the focus to the
address entry, instead of the row of buttons. In my experience this
is more useful, as I usually want to paste an address after
entering the label.

The buttons are mostly useless anyway:

- Choosing a previously used address should be discouraged

- When I'm already using the keyboard the 'paste address' button is
useless - just use the Ctrl-V. Maybe it would be an idea to remove it
completely

- I usually don't want to remove the entry I'm typing now! So makes
sense to have it at the end of the tab chain.
2014-01-02 09:36:46 +01:00
Gregory Maxwell aec55a073d "getnetworkhashps" with defaults was yielding "0", the hashrate is not 0.
This was broken in 4c6d41b8b6.
2013-12-29 03:14:06 -08:00
Thomas Holenstein daa6b20e29 Unittests for uint256.h
Unit tests for uint256.h. The file uint160_tests.cpp is no longer
needed. The ad-hoc tests which were in uint256.h are also no longer
needed. The new tests achieve 100% coverage.
2013-12-25 11:07:21 +01:00
Thomas Holenstein e85e19be06 Changed Get64(.) to GetLow64()
The function Get64(.) has a bug in case the width is not divisible by 64.
Since it is only ever used as Get64(0) this simply changes it to this
special case. Additionally, an assert is added, and a cast to prevent
a compiler error.
2013-12-25 11:07:21 +01:00
Wladimir J. van der Laan 6e7792003b
Merge pull request #3453
96e5f61 extend std::exception logging in txdb.cpp (Philip Kaufmann)
2013-12-24 10:06:58 +01:00
Wladimir J. van der Laan 086d7ec2b8
Merge pull request #3457
d78f35a Explicitly ensure that wallet is unlocked in `importprivkey` (Wladimir J. van der Laan)
2013-12-24 09:43:05 +01:00
Wladimir J. van der Laan 362755d018
Merge pull request #3427
1ad2636 qt: Prevent non-functional GUI from popping up during Init (Wladimir J. van der Laan)
2013-12-23 09:53:30 +01:00
Wladimir J. van der Laan d78f35a909 Explicitly ensure that wallet is unlocked in importprivkey
This makes for a more useful error reply (fixes #957).
2013-12-23 07:49:32 +01:00
Philip Kaufmann 96e5f61d6c extend std::exception logging in txdb.cpp 2013-12-20 18:58:15 +01:00
Philip Kaufmann 4c0b2cde3a Win32: use a more modern API call in FileCommit()
- this seems to be a more recent API call and also supports e.g. SMB3,
  ReFS, which is not guaranteed for commit_()
- link to MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364439%28v=vs.85%29.aspx
2013-12-20 18:42:27 +01:00
Wladimir J. van der Laan 365350140a
Merge pull request #3391
3380713 [Qt] coin control change address handling update (Philip Kaufmann)
2013-12-20 16:23:33 +01:00
Wladimir J. van der Laan 8b9adca446 Allow -noserver with bitcoind
Allow running bitcoind without server.

- Default to -server mode (of course) for bitcoind with SoftSetBoolArg
- Remove fForceServer argument from AppInit2
- Move fDaemon to a static variable in bitcoind
2013-12-20 16:07:33 +01:00
Philip Kaufmann 3380713af5 [Qt] coin control change address handling update
- re-work change address handling so that default is CNoDestination(),
  until a verified and known change address was entered (easier code flow)
- add a missing NULL pointer check for adresstablemodel
- add a missing text when opening coin control address selection for
  priority and ensure the label is black
- add a missing . at the end of a sentence
2013-12-20 15:50:21 +01:00
Philip Kaufmann 3c955993a4 init: add better formating for some command-line options 2013-12-20 15:44:14 +01:00
Wladimir J. van der Laan f498d43ee2
Merge pull request #3416
9e9056c Remove -logtodebugger (Wladimir J. van der Laan)
2013-12-20 15:03:41 +01:00
Wladimir J. van der Laan 23981b1f47
Merge pull request #3369
6027b46 Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance (Michael Bauer)
2013-12-20 14:43:01 +01:00
Wladimir J. van der Laan 326b5bb9d0
Merge pull request #3437
2ea980a qt: Treat regtest as testnet (Wladimir J. van der Laan)
2013-12-20 11:20:36 +01:00
Wladimir J. van der Laan 2ea980a77c qt: Treat regtest as testnet
No need to do anything special in the GUI for regtest mode,
but do treat it at testnet not mainnet to prevent confusion.
2013-12-20 11:18:50 +01:00
Wladimir J. van der Laan d2b6de031f qt: Make sure overviewpage button is pressed at startup
Due to walletframe changes, the overview page button is no longer
automatically selected at startup even though the overview page is shown.
2013-12-20 09:33:44 +01:00
Thomas Holenstein df840de5da
Make bitcoin compile without wallet if "db_cxx.h" is not present
Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove
them.
2013-12-19 10:46:41 +01:00
Wladimir J. van der Laan 285cf7a1a6
Merge pull request #3412
c3a7f51 Move `verifymessage` from rpcwallet to rpcmisc (Wladimir J. van der Laan)
723a03d Move `createmultisig` from rpcwallet to rpcmisc (Wladimir J. van der Laan)
452955f Move `validateaddress` from rpcwallet to rpcmisc (Wladimir J. van der Laan)
cd7fa8b Move `nTransactionFee` from main.cpp to wallet.cpp (Wladimir J. van der Laan)
a943bde Move `settxfee` from rpcblockchain to rpcwallet (Wladimir J. van der Laan)
16bc9aa Move `getinfo` from rpcnet to rpcmisc (Wladimir J. van der Laan)
652e156 add new RPC implementation file `rpcmisc.cpp` (Wladimir J. van der Laan)
2013-12-19 10:11:13 +01:00
Wladimir J. van der Laan 012ca1c9e4 LoadWallet: acquire cs_wallet mutex before clearing setKeyPool
Make the function mutex-aware, to prevent having to lock cs_wallet
at the call site in Init.
2013-12-19 10:00:58 +01:00
Wladimir J. van der Laan 956916806a Document cs_wallet lock and add AssertLockHeld
Add locking assertions to wallet to all methods that
access internal fields and do not aquire the cs_wallet mutex.
2013-12-19 09:46:11 +01:00
Wladimir J. van der Laan 19a5676280 Use mutex pointer instead of name for AssertLockHeld
This makes it useable for non-global locks such as the wallet and
keystore locks.
2013-12-19 09:46:11 +01:00
Wladimir J. van der Laan 636a42bd0e
Remove ui_interface ThreadSafeAskFee residue
Missed these in ca2c83d (#3415).
2013-12-18 13:46:10 +01:00
Wladimir J. van der Laan a5824bb3c6
Merge pull request #3433
6c1bf19 [Qt] style-police, add missing license headers (Philip Kaufmann)
2013-12-18 11:27:14 +01:00
Wladimir J. van der Laan 57fdd68aac
Merge pull request #3415
4a61c39 qt: status WalletModel::Aborted is no longer used (Wladimir J. van der Laan)
ca2c83d Remove unused ThreadSafeAskFee from ui_interface (Wladimir J. van der Laan)
37e67d3 Remove unused ThreadSafeHandleURI from ui_interface (Wladimir J. van der Laan)
2013-12-18 08:56:37 +01:00
Wladimir J. van der Laan 03d9dd47f6
Merge pull request #3424
06eb2f2 Seperate out wallet options in help message (Wladimir J. van der Laan)
2013-12-18 08:15:18 +01:00
Wladimir J. van der Laan 97203994a4
Merge pull request #3381
7df07b3 [Qt] fix RecentRequestsTableModel function ambiuguity (Philip Kaufmann)
2013-12-18 07:27:05 +01:00
Wladimir J. van der Laan cf920b657d
Merge pull request #3405
55c6890 Squashed 'src/leveldb/' changes from 936b461..e991315 (Pieter Wuille)
2013-12-17 09:50:39 +01:00
Philip Kaufmann 6c1bf199ca [Qt] style-police, add missing license headers
- add missing license headers in Mac files
- small code formating cleanups
2013-12-17 07:56:40 +01:00
Philip Kaufmann 46469d0f86 some more small re-branding changes (Bitcoin Core) 2013-12-16 23:36:22 +01:00
Wladimir J. van der Laan 1ad26362c9 qt: Prevent non-functional GUI from popping up during Init
When a InitError or InitWarning happens, the
GUI pops up but is unusable (until Init finishes).

This is caused by showNormalIfMinimized. Add a message
flag to skip this call for Init errors or warnings.
2013-12-16 18:51:30 +01:00
Wladimir J. van der Laan 16ec9044d1 Don't create empty transactions when reading corrupted wallet
The current transaction loading code is not exception safe.
An exception during deserialization causes an empty transaction
to be left behind in the wallet.

Fix this by building the transaction separately and adding
it only to the wallet at the end.

Fixes #3333.
2013-12-16 17:36:04 +01:00
Wladimir J. van der Laan 88ba2643f0 qt: Update English language file for translators 2013-12-16 12:25:25 +01:00
Wladimir J. van der Laan 2ed38d11a8
Merge pull request #3408
22f0135 Rebrand to `Bitcoin Core` (Wladimir J. van der Laan)
2013-12-16 12:23:31 +01:00
Wladimir J. van der Laan 06eb2f215b Seperate out wallet options in help message
Seperate out the wallet options in HelpMessage, and
don't show them if compiled with --disable-wallet.

Also add documentation for `-disablewallet` option.
2013-12-16 10:23:39 +01:00
Wladimir J. van der Laan 4a61c39456 qt: status WalletModel::Aborted is no longer used
Aborting transactions happens in the GUI now as it should,
not the backend.
2013-12-16 09:46:55 +01:00
Wladimir J. van der Laan 3d7c66d75d
Merge pull request #3423
0205abd Improve unit test code not to compare with explanatory messages for each platform. Instead, use have an exception object to check if the string returned by what() on the raised exception matches the string returned by what() on the expected exception instance. This way, we do not need to list all different possible explanatory strings for different platforms in the test code, and make it simple. (The idea is by Cory Fields.) (Kangmo)
2013-12-16 07:59:07 +01:00
Kangmo 0205abd83d Improve unit test code not to compare with explanatory messages for each platform.
Instead, use have an exception object to check if the string returned by what() on the raised exception matches the string returned by what() on the expected exception instance.
This way, we do not need to list all different possible explanatory strings for different platforms in the test code, and make it simple. (The idea is by Cory Fields.)
2013-12-16 09:26:04 +09:00
Wladimir J. van der Laan a5a65bbc90
Merge pull request #3420
bccd532 Fix unit test error on OSX 10.9 using Apple LLVM v5.0. (Kangmo)
2013-12-15 17:35:28 +01:00
Wladimir J. van der Laan 93a5d0bb98 qt: use GUIUtil::dateTimeStr in coincontrol 2013-12-15 15:39:09 +01:00
Kangmo bccd5324ab Fix unit test error on OSX 10.9 using Apple LLVM v5.0.
Before the fix, there were 6 errors such as :
serialize_tests.cpp:77: error in "noncanonical": incorrect exception std::ios_base::failure is caught

It turns out that ex.what() returns following string instead of "non-canonical ReadCompactSize()"
"non-canonical ReadCompactSize(): unspecified iostream_category error"

After the fix, unit test passed.

The test ran using Apple LLVM v5.0 on OSX 10.9 and the unit test error happened because of different error messages by different compilers.

g++ --version on my development environment.

```
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
```
2013-12-15 23:25:41 +09:00
Wladimir J. van der Laan 9e9056cd1a Remove -logtodebugger
`-logtodebugger` is a strange, obscure, WIN32-only (mostly MSVC) thing.
Let's clean up the options a bit get rid of it.

test_bitcoin was using fLogToDebugger as a way to prevent logging to
debug.log. For this, add a boolean (not exposed as option) fLogToDebugLog that
defaults to true and is disabled in the tests.
2013-12-15 10:12:38 +01:00
Wladimir J. van der Laan 8a7606f35b
Merge pull request #3377
0b238b2 Use thread-local storage for LogPrint(category...) (Gavin Andresen)
962b1cf Fix infinite loop with LogPrint on Windows (Gavin Andresen)
2013-12-14 13:28:22 +01:00
Wladimir J. van der Laan ca2c83da50 Remove unused ThreadSafeAskFee from ui_interface
ThreadSafeAskFee is effectively unused. It is only called
when the fAskFee parameter on SendMoney or SendMoneyToDestination
is true, which never happens. Remove it.
2013-12-14 12:30:08 +01:00
Wladimir J. van der Laan 37e67d37c1 Remove unused ThreadSafeHandleURI from ui_interface 2013-12-14 11:30:50 +01:00
Wladimir J. van der Laan c3a7f516e7 Move verifymessage from rpcwallet to rpcmisc
Enables it in --disable-wallet compiles.
2013-12-13 16:34:57 +01:00
Wladimir J. van der Laan 723a03d2de Move createmultisig from rpcwallet to rpcmisc
Enables it in --disable-wallet compiles.
2013-12-13 16:34:57 +01:00
Wladimir J. van der Laan 452955f5be Move validateaddress from rpcwallet to rpcmisc
Enables it in --disable-wallet compiles.
Delimit wallet-using part using #ifdef ENABLE_WALLET.
2013-12-13 16:34:57 +01:00
Wladimir J. van der Laan cd7fa8bb43 Move nTransactionFee from main.cpp to wallet.cpp
Transaction fee is only used by the wallet.
No need for it to be in main.cpp.
2013-12-13 16:34:57 +01:00
Wladimir J. van der Laan a943bde6f0 Move settxfee from rpcblockchain to rpcwallet
`settxfee` only affects the wallet, not the block chain.
2013-12-13 16:06:32 +01:00
Wladimir J. van der Laan 16bc9aaf8a Move getinfo from rpcnet to rpcmisc
`getinfo` is a general info method which shows information
from multiple sources, it doesn't belong in rpcnet.cpp or
any of the other current RPC implementation files.
2013-12-13 16:03:57 +01:00
Wladimir J. van der Laan 652e156951 add new RPC implementation file rpcmisc.cpp 2013-12-13 16:03:16 +01:00
Philip Kaufmann a9a37c8bb5 update help for -blockmaxsize and blockprioritysize
- was left out in #3326
2013-12-13 10:01:21 +01:00
Wladimir J. van der Laan 22f0135df0 Rebrand to Bitcoin Core
Only messages for now, executable names and other file names
can be changed later if necessary and safe.

Do not do an all-sweeping change. Some occurences of Bitcoin-Qt need to
be kept:

- Applicationname: this is used to determine the registry entry names,
  we don't want to lose settings over a silly name change.
- Where it refers to the executable name instead of the product name.
2013-12-13 07:51:16 +01:00
Wladimir J. van der Laan 666225f687
Merge pull request #3387
3e01c00 Add tests for correct and incorrect order of signatures for a multisig (P2SH) (Tamas Blummer)
2013-12-13 06:03:40 +01:00
Wladimir J. van der Laan 150771c4f3
Merge pull request #3326
ad898b4 Increase default -blockmaxsize/prioritysize to 750K/50K (Gavin Andresen)
2013-12-13 05:39:35 +01:00
Cory Fields efdfee423f build: fix detection of boost libs on multi-arch distros
Fixes #3219.
2013-12-12 19:09:00 -05:00
Pieter Wuille ed873a301e Merge src/leveldb changes for LevelDB 1.15 2013-12-12 22:08:18 +01:00
Philip Kaufmann 7df07b3f45 [Qt] fix RecentRequestsTableModel function ambiuguity
- fixes a compiler ambiguity error with ::createIndex() called in
  RecentRequestsTableModel::index()
- also add some Q_UNUSED() macros
2013-12-11 14:45:25 +01:00
Philip Kaufmann 24646ee76f [Qt] fix possibilty to delete last sendcoins entry
- hide the entry about to be deleted, and if it is the last entry add a
  new one, so that we always have one entry in our list
2013-12-11 14:40:31 +01:00
Tamas Blummer 3e01c00f42 Add tests for correct and incorrect order of signatures for a multisig
(P2SH)
2013-12-11 00:03:50 +01:00
Wladimir J. van der Laan 6939a0d50e
Merge pull request #3350
fdbdb7f cleanup includes in rpcnet.cpp (Philip Kaufmann)
b6aafca some string and indentation updates in init/rpcclient (Philip Kaufmann)
2013-12-10 12:37:43 +01:00
Philip Kaufmann bd70562f66 [Qt] add messages when handling local payment request files
- important for the open URI dialog to give users feedback
  when a file is invalid etc.
2013-12-10 11:04:37 +01:00
Gavin Andresen d47bbbd261 Merge pull request #3368 from laanwj/2013_11_disable_wallet_mining
Allow mining RPCs with --disable-wallet
2013-12-09 19:36:39 -08:00
Gavin Andresen 0b238b2786 Use thread-local storage for LogPrint(category...)
This prevents crashes at shutdown where a global destructor
calls LogPrint(category...) after mapMultiArgs has been
deleted.
2013-12-10 13:19:18 +10:00
Gavin Andresen 962b1cf441 Fix infinite loop with LogPrint on Windows
Running -printtodebugger -debug (or -debug=lock),
compiled with -DDEBUG_LOCKORDER would infinite loop
on Windows because every critical section lock/unlock
triggers a LogPrint.

Solution is to use the raw boost mutex instead of a CCriticalSection.
2013-12-10 11:34:28 +10:00
Wladimir J. van der Laan 955787f83f
Merge pull request #3207
666893b qt: keep a list of requested payments (Wladimir J. van der Laan)
2013-12-09 16:42:37 +01:00
Philip Kaufmann f914c7a1a4 rpcwallet: use EnsureWalletIsUnlocked() where possible
- replaces a pwalletMain->IsLocked() check
- in keypoolrefill init kpSize to 0 as we have the logic to determine max
  kpSize in pwalletMain->TopUpKeyPool() anyway
2013-12-09 16:19:12 +01:00
Wladimir J. van der Laan 6694f4a7a2
Merge pull request #3297
84f8551 [Qt] misc small Mac related changes/cleanups (Philip Kaufmann)
2013-12-09 15:36:14 +01:00
Philip Kaufmann 84f8551f3a [Qt] misc small Mac related changes/cleanups
- cleanup Info.plist.in and specify high DPI mode enable command as per
  http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-ios-and-x11/
- move setting of QApplication::setAttribute() to bitcoin.cpp and add
  attribute for enabling use of high DPI pixmaps for Qt >= 5.1
- add missing setWindowTitle() on Mac
- cleanup Mac / non-Mac setup in bitcoingui.cpp
2013-12-09 15:24:45 +01:00
Philip Kaufmann fdbdb7f345 cleanup includes in rpcnet.cpp 2013-12-09 14:02:38 +01:00
Wladimir J. van der Laan 7266bb1bdc
Merge pull request #3373
80ecf67 Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
2013-12-09 12:27:59 +01:00
Philip Kaufmann b6aafca03d some string and indentation updates in init/rpcclient 2013-12-09 10:09:59 +01:00
Wladimir J. van der Laan fbc7a96d03 Re-enable miner tests in --disable-wallet mode
Use a fixed script instead of a CReserveKey from the wallet.
This does not affect the functionality or result of the tests as they never
check the state of the wallet in the first place.
2013-12-09 09:25:10 +01:00
Wladimir J. van der Laan acfa03337e Move internal miner functionality together 2013-12-09 08:55:56 +01:00
Wladimir J. van der Laan 4a85e06750 Allow mining RPCs with --disable-wallet
The following mining-related RPC calls don't use the wallet:

- getnetworkhashps
- getmininginfo
- getblocktemplate
- submitblock

Enable them when compiling with --disable-wallet.
2013-12-09 08:44:57 +01:00
Gavin Andresen 80ecf6702a Add ThreadGetMyExternalIP to net thread group
Fixes #3372 -- crash at shutdown.
2013-12-09 14:10:10 +10:00
Michael Bauer 6027b460e4 Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance
Conflicts:
	src/rpcserver.cpp
2013-12-08 18:51:45 +01:00
Pieter Wuille b2864d2fb3 Add main-specific node state 2013-12-08 14:51:37 +01:00
Wladimir J. van der Laan 70370ae502
Merge pull request #3348
ccd1372 [Qt] small notificator and style changes (Philip Kaufmann)
2013-12-08 14:24:49 +01:00
Wladimir J. van der Laan 6893d74e15
Merge pull request #3322
26d1b65 src/Makefile.am: Simplify clean of leveldb (Josh Triplett)
a26a367 configure.ac: Check for miniupnpc headers, not just -lminiupnpc (Josh Triplett)
82ccb05 autogen.sh: Stop passing --verbose to autoreconf (Josh Triplett)
e12dafd autogen.sh: Use long options to autoreconf, for self-documentation (Josh Triplett)
19b9add autogen.sh: Support running from outside the source directory (Josh Triplett)
97d285a autogen.sh: Use set -e to fail if any command fails (Josh Triplett)
f80b723 autogen.sh: Add a /bin/sh shebang. (Josh Triplett)
2013-12-08 13:56:12 +01:00
Wladimir J. van der Laan 05e27c6641
Merge pull request #3332
5094f8d Split off rpc_wallet_tests (Wladimir J. van der Laan)
829c920 Move CCryptoKeyStore to crypter.cpp (Wladimir J. van der Laan)
ae6ea5a Update build-unix.md to mention --disable-wallet (Wladimir J. van der Laan)
4f9e993 Add --disable-wallet option to build system (Wladimir J. van der Laan)
d004d72 Move CAddrDB frrom db to net (Wladimir J. van der Laan)
48ba56c Delimit code with #ifdef ENABLE_WALLET (Wladimir J. van der Laan)
991685d Move getinfo to rpcnet.cpp (Wladimir J. van der Laan)
bbb0936 Move HelpExample* from rpcwallet to rpcserver (Wladimir J. van der Laan)
2013-12-08 13:52:48 +01:00
Gavin Andresen fbbed19b78 Merge pull request #3365 from gmaxwell/hexify
Restore hex to getrawtransaction vout scriptPubkey.
2013-12-06 16:58:15 -08:00
Gregory Maxwell a702a0b61d Restore hex to getrawtransaction vout scriptPubkey.
Commit be066fad accidentally removed the hex field.
This gets in the way of doing offline signing.

(credit belongs to sipa for actually looking for the
 cause instead of being lazy like me and just shrugging
 and writing the scriptpubkey from the asm.)
2013-12-06 15:59:34 -08:00
Philip Kaufmann 4cf3411056 [Qt] misc PaymentServer changes (e.g. changes to eventFilter())
- make eventFilter() private and pass events on to QObject::eventFilter()
  instead of just returning false
- re-work paymentservertest.cpp to correctly handle the event test
  after the above change (rewrite test_main to allow usage of
  QCoreApplication:: in the tests)
- delete socket when we were unable to connect in ipcSendCommandLine()
- show a message to the user if we fail to start-up (instead of just a
  debug.log entry)
- misc small comment changes
2013-12-06 11:06:57 +01:00
Wladimir J. van der Laan b4297c8fff
Merge pull request #3353
1e01f7c Payment request URI syntax changed, from request=... to r=... (Gavin Andresen)
2013-12-06 09:46:48 +01:00
Philip Kaufmann 38cbeab1ff fix typo in rpcnet.cpp 2013-12-05 08:46:50 +01:00
Wladimir J. van der Laan b1961523f1
Merge pull request #3356
d3ef9b0 Prevent empty transactions from being added to vtxPrev (Wladimir J. van der Laan)
2013-12-05 08:17:02 +01:00
Wladimir J. van der Laan 4ef92a9067 Refuse to retransmit transactions without vins
Versions of bitcoin before 0.8.6 have a bug that inserted
empty transactions into the vtxPrev in the wallet, which will cause the node to be
banned when retransmitted, hence add a check for !tx.vin.empty()
before RelayTransaction.
2013-12-04 15:40:51 +01:00
Wladimir J. van der Laan d3ef9b00ec Prevent empty transactions from being added to vtxPrev
CWalletTx::AddSupportingTransactions() was adding empty transaction
to vtxPrev in some cases. Skip over these.

Part one of the solution to #3190. This prevents invalid vtxPrev from
entering the wallet, but not current ones being transmitted.
2013-12-04 15:30:23 +01:00
Wladimir J. van der Laan 5094f8d46f Split off rpc_wallet_tests
Split wallet tests from other RPC tests.
Now no #ifdef ENABLE_WALLET are needed anymore in either file.
2013-12-04 12:46:14 +01:00
Wladimir J. van der Laan 829c920387 Move CCryptoKeyStore to crypter.cpp
This breaks the dependency on crypter for disable-wallet builds.
2013-12-04 12:46:13 +01:00
Wladimir J. van der Laan 4f9e993bc9 Add --disable-wallet option to build system
Make it possible to build Bitcoin without wallet
(and thus without BDB) so that it only functions as node.
2013-12-04 12:46:13 +01:00
Wladimir J. van der Laan d004d7279f Move CAddrDB frrom db to net
This was a leftover from the times in which
peers.dat depended in BDB.

Other functions in db.cpp still depend on BerkelyDB,
to be able to compile without BDB this (small)
functionality needs to be moved to another file.
2013-12-04 12:46:13 +01:00
Wladimir J. van der Laan 48ba56cdfd Delimit code with #ifdef ENABLE_WALLET
Delimit all code that uses the wallet functions
in implementation files that conditionally use the wallet.
2013-12-04 12:46:13 +01:00
Wladimir J. van der Laan 991685d3dc Move getinfo to rpcnet.cpp
Where to place `getinfo` is a difficult issue
as it shows information from the wallet, net and
block chain. However, I moved it out of rpcwallet
as the command needs also to be available without
wallet.
2013-12-04 12:46:13 +01:00
Wladimir J. van der Laan bbb093652e Move HelpExample* from rpcwallet to rpcserver
General functions used throughout the RPC framework
don't belong in rpcwallet.
2013-12-04 12:46:12 +01:00
Wladimir J. van der Laan 6c98cca9e4 qt: use deleteLater to remove send entries
Use deleteLater() instead of delete, as it is not allowed
to delete widgets directly in an event handler.
Should solve the MacOSX random crashes on send with coincontrol.
2013-12-04 08:17:57 +01:00
Gavin Andresen 1e01f7c506 Payment request URI syntax changed, from request=... to r=...
BIP 72 was changed to save six bytes in bitcoin: URIs.
2013-12-04 13:18:09 +10:00
Wladimir J. van der Laan f15bd3c96f
Merge pull request #3285
d3207b6 [Qt] coin-control features GUI cleanup 3 (Philip Kaufmann)
834e14e [Qt] coin-control features GUI cleanup 2 (Philip Kaufmann)
2013-12-03 17:26:45 +01:00
Philip Kaufmann ccd1372dd0 [Qt] small notificator and style changes
- remove default arguments for notificator
- re-order some calls to use same ordering in Qt files
- style police changes (spaces, comments and such)
2013-12-03 14:01:53 +01:00
Gavin Andresen cf74e8cb5e Merge pull request #3320 from laanwj/2013_11_cli_split
bitcoin-cli: remove unneeded dependencies (only minor code movement)
2013-12-03 03:47:44 -08:00
Wladimir J. van der Laan 0b47fe6bdc bitcoin-cli: remove unneeded dependencies (only code movement)
Remove unnecessary dependencies for bitcoin-cli
(leveldb, berkelydb, wallet, RPC server)

Build system changes:
- split libbitcoin.a into libbitcoin_common.a, libbitcoin_server.a and
  libbitcoin_cli.a

Code changes (movement only):
- split up HelpMessage into HelpMessage in init.cpp and HelpMessageCli
  in rpcclient.cpp
- move uiInterface from init.cpp to util.cpp
2013-12-03 09:07:13 +01:00
Gregory Maxwell 9b59e3bda8 Sanitize assert usage and refuse to compile with NDEBUG.
There were quite a few places where assert() was used with side effects,
 making operation with NDEBUG non-functional.  This commit fixes all the
 cases I know about, but also adds an  #error on NDEBUG because the code
 is untested without assertions and may still have vulnerabilities if
 used without assert.
2013-12-02 11:33:44 -08:00
Philip Kaufmann d3207b6fa8 [Qt] coin-control features GUI cleanup 3
- remove style sheets from ui files and use Qt attributes instead
- make some more strings untranslatable, to make life for translators
  easier
- split up long tooltips an rework the texts a little
2013-12-02 13:36:19 +01:00
Philip Kaufmann 834e14e57f [Qt] coin-control features GUI cleanup 2
- remove monospace labels from sendcoinsdialog also
- use a validated line edit for the change address
- add a tooltip to change address switch
- ensure we have a valid change address in
  CoinControlDialog::coinControl->destChange or just CNoDestination()
- some small ui file changes
2013-12-02 13:32:46 +01:00
Sined d6cb85d50d Lossless image optimization
less bytes, same images
2013-12-02 10:10:22 +01:00
Wladimir J. van der Laan b9988c9e74
Merge pull request #3339
bae6c7e Fix a rare crash on Mac OS X, by removing a setFocus on the payTo field that was not necessary, as the field still receives focus without it. (Ryan Niebur)
2013-12-02 08:52:54 +01:00
Ryan Niebur bae6c7e32b Fix a rare crash on Mac OS X, by removing a setFocus on the payTo field that was not necessary, as the field still receives focus without it. 2013-12-01 20:31:10 -08:00
Gavin Andresen 49dc3a0f1a Make unit tests succeed with -DDEBUG_LOCKORDER 2013-12-02 13:11:21 +10:00
Gavin Andresen a65edb104d Merge pull request #3329 from gavinandresen/syncdebug
mutex debugging routines: LocksHeld() and AssertLockHeld()
2013-12-01 17:43:37 -08:00
Wladimir J. van der Laan 40ad6e7f35
Merge pull request #3306
84b695c [Qt] allow deletion of payment-requests in sendcoins (Philip Kaufmann)
2013-12-01 13:02:14 +01:00
Gavin Andresen 4d707d5120 Add verbose boolean to getrawmempool
Also changes mempool to store CTxMemPoolEntries
to keep track of when they enter/exit the pool.
2013-11-30 15:42:10 +10:00
Gavin Andresen 0733c1bde6 Refactor: move GetValueIn(tx) to tx.GetValueIn()
GetValueIn makes more sense as a CTransaction member.
2013-11-30 15:42:10 +10:00
Gavin Andresen 98c7c8fd1d Remove dead transaction replacement code
This dead code can be resurrected from git history if
transaction replacement is ever implemented. Keeping
dead code in the source is a bad idea, because it implies
it was tested and worked at some point, which is not true.
2013-11-30 15:42:10 +10:00
Gavin Andresen ad898b40aa Increase default -blockmaxsize/prioritysize to 750K/50K 2013-11-30 14:38:15 +10:00
Wladimir J. van der Laan e7e8a7537a
Merge pull request #3309
9ac5a01 Move types.h include before ifaddres.h for u_int declaration (Robert Backhaus)
2013-11-29 10:34:38 +01:00
Gavin Andresen c649637b6c mutex debugging routines: LocksHeld() and AssertLockHeld() 2013-11-29 17:46:19 +10:00
Wladimir J. van der Laan 9d2b73d19f bitcoin-cli: Add missing SelectParamsFromCommandLine
The SelectParamsFromCommandLine call was missing in bitcoin-cli,
which caused `-testnet` and `-regtest` to be ignored. Add this
call just like in bitcoind.cpp.
2013-11-28 17:37:01 +01:00
Josh Triplett 26d1b65c53 src/Makefile.am: Simplify clean of leveldb 2013-11-27 18:17:17 -08:00
Philip Kaufmann 0078841617 prevent Windows redefinition warning cause by compat.h 2013-11-27 21:28:31 +01:00
Wladimir J. van der Laan 5f083afde1
Merge pull request #3284
fb78cc2 Split up bitcoinrpc (code movement only) (Wladimir J. van der Laan)
2013-11-27 14:16:36 +01:00