Commit graph

3645 commits

Author SHA1 Message Date
Philip Kaufmann c78bd93701
[Qt] extend validate line edit and btc address validator
- remove btc address length from address validator
- add an optional btc address check in validated line edit that defaults
  to off and is used in GUIUtil::setupAddressWidget()
- an isAcceptable() check is added to validated line edit on focus out
  which only kicks in, when a validator is used with that widget
- remove an isAcceptable() check from sendcoinsentry.cpp
- remove obsolete attributes from ui files, which are set by calling
  GUIUtil::setupAddressWidget()
- move some more things to GUIUtil::setupAddressWidget() and remove them
  from normal code e.g. placeholder text
2014-01-29 14:15:55 +01:00
Wladimir J. van der Laan 3cf1f43694 Mention * value for account in documentation for getbalance RPC 2014-01-29 13:43:47 +01:00
Wladimir J. van der Laan aab8fc58c6
Merge pull request #3450
4c0b2cd Win32: use a more modern API call in FileCommit() (Philip Kaufmann)
2014-01-29 09:09:50 +01:00
Wladimir J. van der Laan 2383e4883d
Re-add newline to error() messages
As reported by @Subo1978, error messages don't have a trailing newline
anymore after commit b77dfdc9. Add back this newline.
2014-01-29 08:46:15 +01:00
Wladimir J. van der Laan 0524bdd636
Merge pull request #3582
e5aadb2 Updated fallback seed nodes from sipa's DNS seeds (Gavin Andresen)
2014-01-29 07:50:45 +01:00
Wladimir J. van der Laan 6ebcec7d3c
Merge pull request #3593
c7f9332 Add check for valid keys in `importprivkey` (Wladimir J. van der Laan)
2014-01-28 18:38:31 +01:00
Wladimir J. van der Laan 7ff13ef2d2
Merge pull request #3590
edd735d [Qt] Fix coin control labels update (Cozz Lovan)
2014-01-28 11:00:40 +01:00
Wladimir J. van der Laan f9355f1f2b
Merge pull request #3594
d7aa1ec [Qt] fix bitcoin: URI strings (spelling fixes) (Philip Kaufmann)
2014-01-28 10:54:17 +01:00
Philip Kaufmann d7aa1ec8dd [Qt] fix bitcoin: URI strings (spelling fixes) 2014-01-28 10:48:41 +01:00
Wladimir J. van der Laan c7f9332596 Add check for valid keys in importprivkey
The base58 armoring was checked, but not the resulting private key,
which could be out of range. Fix this by adding a check.
2014-01-28 09:57:57 +01:00
Wladimir J. van der Laan dfd0d38fae
Merge pull request #3591
6986861 build: use -mwindows for gui targets when linking with mingw (Cory Fields)
2014-01-28 09:40:12 +01:00
Philip Kaufmann b34e88a88f use english for all reason strings in IsStandardTx() 2014-01-28 07:45:42 +01:00
Cory Fields 6986861fda build: use -mwindows for gui targets when linking with mingw 2014-01-27 15:30:51 -05:00
Pieter Wuille 75f51f2a63 Prepare block connection logic for headers-first.
This changes the block processing logic from "try to atomically switch
to a new block" to a continuous "(dis)connect a block, aiming for the
assumed best chain".

This means the smallest atomic operations on the chainstate become
individual block connections or disconnections, instead of entire
reorganizations. It may mean that we try to reorganize to one block,
fail, and rereorganize again to the old block. This is slower, but
doesn't require unbounded RAM.

It also means that a ConnectBlock which fails may be no longer called
from the ProcessBlock which knows which node sent it. To deal with that,
a mapBlockSource is kept, and invalid blocks cause asynchronous "reject"
messages and banning (if necessary).
2014-01-27 21:20:41 +01:00
Pieter Wuille 0ec16f35d6 Move only: extract WriteChainState and UpdatedTip from SetBestChain. 2014-01-27 21:13:48 +01:00
Cozz Lovan edd735da4e [Qt] Fix coin control labels update 2014-01-27 19:16:31 +01:00
Philip Kaufmann df966d1b24 log parameter interactions to debug.log 2014-01-27 12:08:48 +01:00
Wladimir J. van der Laan ca1913e8f6
Merge pull request #2342
665bdd3 Fix off-by-one errors in use of IsFinalTx() (Peter Todd)
2014-01-27 10:16:54 +01:00
Wladimir J. van der Laan b571a8c708 qt: Translation update
Update English .ts file from source as well as pull changes from transifex
to current translation.
2014-01-27 09:56:35 +01:00
Wladimir J. van der Laan 86fa1c9cf2
Merge pull request #3579
f3005c8 [Qt] harmonize strings used when exporting in addressbookpage (Philip Kaufmann)
2014-01-27 09:53:51 +01:00
Philip Kaufmann f3005c82b1 [Qt] harmonize strings used when exporting in addressbookpage 2014-01-27 08:36:14 +01:00
Peter Todd 665bdd3bc9
Fix off-by-one errors in use of IsFinalTx()
Previously CreateNewBlock() didn't take into account the fact that
IsFinalTx() without any arguments tests if the transaction is considered
final in the *current* block, when both those functions really needed to
know if the transaction would be final in the *next* block.

Additionally the UI had a similar misunderstanding.

Also adds some basic tests to check that CreateNewBlock() is in fact
mining nLockTime-using transactions correctly.

Thanks to Wladimir J. van der Laan for rebase.
2014-01-26 21:50:15 -05:00
Gavin Andresen e5aadb25c5 Updated fallback seed nodes from sipa's DNS seeds 2014-01-24 17:09:20 -05:00
Gavin Andresen fd67424c82 Unit test fixes for AssertLockHeld / -DDEBUG_LOCKORDER
Unit tests would fail if compiled with -DDEBUG_LOCKORDER (AssertLockHeld()
would fail; AssertLockHeld() relies on the DEBUG_LOCKORDER code to keep
track of locks held).

Fixed by LOCK'ing the wallet mutex in the unit tests that manipulate the
wallet.
2014-01-24 10:47:29 -05:00
Wladimir J. van der Laan d0a94f2c2f
Merge pull request #3571
57feb1b ui: Clarify help messages for 'message' fields (Wladimir J. van der Laan)
2014-01-24 11:38:13 +01:00
Wladimir J. van der Laan 57feb1ba5a ui: Clarify help messages for 'message' fields
Add or amend tooltips to clarify what the message is for and that it
doesn't go over the network.
2014-01-24 11:37:20 +01:00
Wladimir J. van der Laan 7d9d134bf9 Remove redundant .c_str()s
After the tinyformat switch sprintf() family functions support passing
actual std::string objects.

Remove unnecessary c_str calls (236 of them) in logging and formatting.
2014-01-23 16:05:01 +01:00
Wladimir J. van der Laan b77dfdc9e3 Typesafe strprintf/error/LogPrint functions
Switch to tinyformat-based formatting.

Tinyformat is a typesafe drop-in replacement for C99 printf functions:
https://github.com/c42f/tinyformat
2014-01-23 16:05:00 +01:00
Wladimir J. van der Laan 53e9d3aa44
build: fix typo in configure help message
--with-qt-libdir etc, not --with-gui-libdir.
The typo was introduced in a9dbcf036b.
2014-01-23 14:05:43 +01:00
Wladimir J. van der Laan 17b409b2e6 qt: Fix richtext detection hang issue on very old Qt versions
Alternative implementation. Thanks to @awoland for the original.
Fixes #3486.
2014-01-23 12:44:28 +01:00
Wladimir J. van der Laan 8b2cf12b53
Merge pull request #3553
a8db31c qt: allow `walletpassphrase` in debug console without -server (Wladimir J. van der Laan)
2014-01-23 08:44:31 +01:00
Wladimir J. van der Laan 6746787a0c
Merge pull request #3560
fe14e8d build: Change package name to Bitcoin Core (Wladimir J. van der Laan)
6c980c7 build: Package docs/ and don't package source. (Wladimir J. van der Laan)
39db27c build: Add bitcoin-cli.exe to installer (Wladimir J. van der Laan)
2f87b38 Adapt Windows installer for 64 bit (Wladimir J. van der Laan)
f622232 gitian: Windows 64 bit support (Wladimir J. van der Laan)
2014-01-23 08:26:11 +01:00
Philip Kaufmann f0219813d5 [Qt] move helpmessage from debug window to main menu
- the option to show our help message dialog resides now in main menu
  under help
2014-01-22 15:28:50 +01:00
Wladimir J. van der Laan fe87b20717
Merge pull request #3568
4bee715 [Qt] very minor style cleanups (Philip Kaufmann)
2014-01-22 13:36:31 +01:00
Wladimir J. van der Laan 7dbe9ac1f3
Merge pull request #3567
22a5120 [Qt] Show and store message of normal bitcoin:URI (Cozz Lovan)
2014-01-22 13:33:15 +01:00
Philip Kaufmann 4bee715bfd [Qt] very minor style cleanups
- rebuilt some ui file layout to remove unreal values from the files
- remove an unneeded attribute from an ui file
- add / remove some spaces in files
2014-01-22 09:46:15 +01:00
Wladimir J. van der Laan 2f06b5965a
Merge pull request #3452
1ba3560 [Qt] let OptionsModel::getProxySettings() directly query proxy (Philip Kaufmann)
2014-01-22 08:55:57 +01:00
Wladimir J. van der Laan ceab53b41d
Merge pull request #3521
4d90102 [Qt] Add sorting feature to the requested payments table (Cozz Lovan)
8476d5d [Qt] Permanently store requested payments in wallet (Cozz Lovan)
b10e147 wallet: add interface for storing generic data on destinations (Wladimir J. van der Laan)
2014-01-22 08:07:56 +01:00
Wladimir J. van der Laan 6586bc3b51
Merge pull request #3502
1f12844 Fix importprivkey / rescan (Cozz Lovan)
2014-01-22 08:06:11 +01:00
Cozz Lovan 22a51207ae [Qt] Show and store message of normal bitcoin:URI 2014-01-21 23:54:49 +01:00
Wladimir J. van der Laan d0a7c682c6
build: Fix warning about space after trailing backslash 2014-01-21 14:32:05 +01:00
Wladimir J. van der Laan f622232bcf gitian: Windows 64 bit support
- Build a 64 bit version of all dependencies
- Show 32/64 bit version in "About..." for x86
- Export 64-bit .exes and installer from gitian build
2014-01-21 14:02:13 +01:00
Wladimir J. van der Laan 77a1607ce8
Merge pull request #3548
7b50bb2 [Qt] add utilitydialog.cpp/h and helpmessage class (Philip Kaufmann)
2014-01-21 09:01:38 +01:00
Wladimir J. van der Laan a682bc7e46
Merge pull request #3242
2041365 Bugfix: Use BOOST_CPPFLAGS when testing for boost sleep vs sleep_for (Luke Dashjr)
e18e100 configure: Minor grammatical changes to be more clear (Luke Dashjr)
a9dbcf0 configure: Change --with[out]-qt to --with[out]-gui and add --with[out]-cli and --with[out]-daemon to support more build configurations (Luke Dashjr)
f472990 Bugfix: Correct captitalisation of Qt (Luke Dashjr)
f930341 configure: Internal changes to make building bitcoind and bitcoin-cli optional (Luke Dashjr)
4a290b5 Cleanup LevelDB library dependencies (Luke Dashjr)
9b4e03b Bugfix: Undefine _FORTIFY_SOURCE before redefining it, to avoid warnings on compilers that define it by default (Luke Dashjr)
123e4f8 Bugfix: configure: Allow user-provided CXXFLAGS to override default optimisation, debug, and warning flags (Luke Dashjr)
2014-01-21 08:55:07 +01:00
Ashley Holman d8b4b49667 Don't store or send side-chain blocks lower than last checkpoint. 2014-01-19 18:15:38 -06:00
Cozz Lovan 4d901023b7 [Qt] Add sorting feature to the requested payments table 2014-01-19 18:21:54 +01:00
Cozz Lovan 8476d5d407 [Qt] Permanently store requested payments in wallet 2014-01-19 18:21:54 +01:00
Wladimir J. van der Laan b10e147096 wallet: add interface for storing generic data on destinations 2014-01-19 18:21:54 +01:00
Noel Tiernan e6c6bc92f4 Adds additional zero checks for setCompact
These encoded values should all decode to zero

   Positive Numbers
    0x01003456 (1 byte  0x00)
    0x02000056 (2 bytes 0x0000)
    0x03000000 (3 bytes 0x000000)
    0x04000000 (4 bytes 0x000000_00)

   Negative Numbers
    0x00923456 -(0 bytes, so zero)
    0x01803456 -(1 byte  0x00)
    0x02800056 -(2 bytes 0x0000)
    0x03800000 -(3 bytes 0x000000)
    0x04800000 -(4 bytes 0x000000_00)
2014-01-19 13:55:08 +00:00
Luke Dashjr 2041365c8c Bugfix: Use BOOST_CPPFLAGS when testing for boost sleep vs sleep_for 2014-01-18 21:10:56 +00:00
Luke Dashjr e18e1001eb configure: Minor grammatical changes to be more clear 2014-01-18 21:10:52 +00:00
Luke Dashjr a9dbcf036b configure: Change --with[out]-qt to --with[out]-gui and add --with[out]-cli and --with[out]-daemon to support more build configurations 2014-01-18 20:11:05 +00:00
Luke Dashjr f47299038d Bugfix: Correct captitalisation of Qt 2014-01-18 20:10:07 +00:00
Luke Dashjr f930341d81 configure: Internal changes to make building bitcoind and bitcoin-cli optional 2014-01-18 19:54:50 +00:00
Micha e7906d18cf
Add a new checkpoint at block 279,000
From a cursory glance, it looks like block 279,000 meets the criteria for
a checkpoint block, and it's also what the bootstrap.dat torrent is at. This closes #3530.
2014-01-18 21:52:46 +02:00
Luke Dashjr 4a290b526c Cleanup LevelDB library dependencies 2014-01-18 19:47:21 +00:00
Cozz Lovan 1f12844fc0 Fix importprivkey / rescan 2014-01-18 18:47:32 +01:00
Philip Kaufmann 7b50bb2f1b [Qt] add utilitydialog.cpp/h and helpmessage class
- adds a nice and well formated dialog, which displays our -? help message
  (all options/paramaters)
- moves aboutdialog.cpp/h to the new utilitydialog
- move GUI shutdown window to utilitydialog
2014-01-18 16:57:02 +01:00
Pieter Wuille b9d384a45d Merge src/leveldb changes: temporarily revert to writing .sst files. 2014-01-18 14:32:29 +01:00
Wladimir J. van der Laan 6c19ca1f92
Merge pull request #3490
7e08e29 better std::exception logging for block/undo files (Philip Kaufmann)
2014-01-18 12:25:05 +01:00
Wladimir J. van der Laan a8db31c83d qt: allow walletpassphrase in debug console without -server
Currently it is only possible to use `walletpassphrase` to unlock the
wallet when bitcoin is started in server mode.

Almost everything that manipulates the wallet in the RPC console
needs the wallet to be unlocked and is thus unusable without -server.

This is pretty unintuitive to me, and I'm sure it's even more confusing
to users.

Solve this with a very minimal change: by making the GUI start a
dummy RPC thread just to handle timeouts.
2014-01-17 16:55:20 +01:00
Philip Kaufmann 1ba3560fe8 [Qt] let OptionsModel::getProxySettings() directly query proxy
- as a proxy set via GUI can be overridden via -proxy, directly query the
  core to get active proxy
- give a warning, if active proxy is not SOCKS5 (needs to be SOCKS5 for
  the Qt networking code to work)
- also remove an obsolete connect() call from optionsdialog.cpp and a
  reference to Bitcoin-Qt (now just GUI)
2014-01-17 15:43:44 +01:00
Wladimir J. van der Laan 08ede8ef5e
Merge pull request #3512
04aa828 [Qt] don't regenerate autostart link on every client startup (Philip Kaufmann)
2014-01-17 10:11:46 +01:00
Gavin Andresen 8c31f037b1 Merge pull request #3527 from laanwj/2014_01_gitian_win32_qt5
build: update win32 deps
2014-01-15 04:20:58 -08:00
Wladimir J. van der Laan f8b48ed297
Merge pull request #3426
16ec904 Don't create empty transactions when reading corrupted wallet (Wladimir J. van der Laan)
2014-01-14 18:59:07 +01:00
Wladimir J. van der Laan 1aac1448de
Merge pull request #3538
81bad8b [Qt] 2 minor translation changes (Philip Kaufmann)
2014-01-14 18:55:39 +01:00
Wladimir J. van der Laan 6b5fbc9073
Merge pull request #3541
c704532 [Qt] small paymentserver header cleanup (Philip Kaufmann)
2014-01-14 18:48:02 +01:00
Wladimir J. van der Laan b0e8c4b0b9
Merge pull request #3540
57d8e3f [Qt] add missing lock in walletmodel (Cozz Lovan)
2014-01-14 18:33:27 +01:00
Philip Kaufmann c704532294 [Qt] small paymentserver header cleanup 2014-01-14 17:57:32 +01:00
Philip Kaufmann 81bad8b386 [Qt] 2 minor translation changes 2014-01-14 17:43:38 +01:00
Cozz Lovan 57d8e3f88f [Qt] add missing lock in walletmodel 2014-01-14 17:41:57 +01:00
Philip Kaufmann 8c20bbbed9 update copyright year to 2014 2014-01-14 17:11:38 +01:00
Wladimir J. van der Laan b26de9d951
qt: Update remaining "The Bitcoin Core Developers" 2014-01-14 11:19:52 +01:00
Wladimir J. van der Laan 1e3abb4e3d build: upgrade Qt used by windows build to 5.2.0 2014-01-14 11:03:21 +01:00
Wladimir J. van der Laan dbafb99472
Merge pull request #3526
f10b2d7 qt: use series of pngs for spinner (Wladimir J. van der Laan)
2014-01-14 07:55:47 +01:00
Gavin Andresen 266921e70f Merge pull request #3516 from sipa/serorphans-head
Store orphan blocks in serialized form
2014-01-13 08:54:33 -08:00
Wladimir J. van der Laan f087ce8891 qt: English translation update 2014-01-13 17:36:24 +01:00
Wladimir J. van der Laan c7930c859e
Merge pull request #3528
66a8829 qt: Minor message updates (Wladimir J. van der Laan)
2014-01-13 17:35:17 +01:00
Wladimir J. van der Laan f126973fd0
Merge pull request #3374
bd70562 [Qt] add messages when handling local payment request files (Philip Kaufmann)
2014-01-13 17:11:05 +01:00
Wladimir J. van der Laan 66a8829a33 qt: Minor message updates
Used sending/receiving addresses -> Sending/receiving addresses
Previously requested payments -> Requested payments (idea from @cozz in #3521)
2014-01-13 17:05:55 +01:00
Wladimir J. van der Laan f10b2d70d0 qt: use series of pngs for spinner
Use a series of .png frames for the spinner instead of a .mng.
`mng` is an obscure image format and is not built by default into Qt5.

This appears to improve the crispness of the spinner as well.

Does not noticably increase the size (still ~27k) and the code
is not more complicated either.
2014-01-13 14:45:23 +01:00
Wladimir J. van der Laan 67d60f7031 build: fix MacOSX build after ec41342
Fix regression introduced in ec41342.

Also use a less ugly solution, by defining the value of
`MOC_DEFS` in the configure script instead of `Makefile.include`.
2014-01-13 10:33:12 +01:00
Wladimir J. van der Laan 0e469b5167
Merge pull request #3513
d464edf [Qt] fix alphabetical ordering in Makefile.am (Philip Kaufmann)
2014-01-12 10:03:02 +01:00
Wladimir J. van der Laan 0a4fefe18f
Merge pull request #3511
245a6ab [Qt] guard bitcoin-config.h and remove dublicated help message code (Philip Kaufmann)
2014-01-12 10:01:31 +01:00
Wladimir J. van der Laan b68c618c6d
Merge pull request #3507
9b146cd GUI: Fix design in overview page (Cozz Lovan)
2014-01-12 10:00:39 +01:00
Philip Kaufmann d464edfb8c [Qt] fix alphabetical ordering in Makefile.am
- also change to 1 file per line for more stuff in Makefile.am
2014-01-12 03:00:53 +01:00
Pieter Wuille da0fecffa7 Store orphan blocks in serialized form 2014-01-11 23:39:29 +01:00
Philip Kaufmann 04aa828728 [Qt] don't regenerate autostart link on every client startup
- allows users to add additional paramaters via the autostart link
- related to #2197
2014-01-11 18:58:26 +01:00
Philip Kaufmann 245a6ab1ae [Qt] guard bitcoin-config.h and remove dublicated help message code 2014-01-11 18:56:24 +01:00
Philip Kaufmann c037531d69 small headers ordering cleanup
- keep headers in alphabetical order
- fix Makefile.am (2 files in 1 line - leftover)
- remove some spaces etc.
2014-01-11 18:17:09 +01:00
Cozz Lovan 9b146cd3ca GUI: Fix design in overview page 2014-01-11 16:30:14 +01:00
Wladimir J. van der Laan 5a407bd095
makefile.am: split long lines into one file per line
This makes it easier to read diffs.
Cosmetic change to build system only.
2014-01-11 15:23:15 +01:00
Wladimir J. van der Laan b7f4b6d35d GUI for --disable-wallet compiles and -disablewallet mode
There is not much in the GUI to be done without wallet,
though it's possible to change options, watch the sync process,
and use the debug console.

So embed the debug console in the main window.
2014-01-11 12:36:20 +01:00
Wladimir J. van der Laan ec41342e3d build: pass correct defs and include path to moc
To make sure the right slots are generated, MOC needs -DHAVE_CONFIG_H
and correct include path to include bitcoin-config.h.
2014-01-11 12:23:00 +01:00
Wladimir J. van der Laan 9a2305a1b3 qt: Stop shutdown detection timer during shutdown
Stop the shutdown timer from exiting the main loop
when shutdown is already in progress.

Fixes seeming hanging window after typing 'stop' in debug console.

Also hide the debug console during shutdown as it is useless without
a core to connect to.
2014-01-11 10:20:28 +01:00
Wladimir J. van der Laan 35ecf854c0 qt: Remove global references in bitcoin.cpp
Remove the need for global references `guiref` and
`splashref` by making the BitcoinGUI and SplashScreen
classes register for the UI interface signals themselves.
2014-01-11 10:20:28 +01:00
Wladimir J. van der Laan 55fe4de960 qt: Show window while shutting down
Makes it clear to the user that the application is still wrapping up
and the computer should not be turned off until it is finished.
2014-01-11 10:20:28 +01:00
Wladimir J. van der Laan 202d853bbe qt: Move initialization/shutdown to a thread
Move AppInit2 and Shutdown to a thread.

This allows a more responsive splash screen, prevents 'process does not respond'
messages from the window system and will allow for showing a user friendly
window while shutting down.
2014-01-11 10:20:28 +01:00
Cory Fields 42cc96737c qt5: fix typo causing broken selection logic 2014-01-10 16:30:34 -05:00
Cory Fields 371f3f6ba5 qt5: fix --with-qt with no arguments 2014-01-10 16:30:33 -05:00
Cory Fields 8b0f608815 qt5: tests: Make sure static plugin symbols are pulled in
Since we're now properly linking against static plugins for qt binaries,
we need to ensure that they're Imported properly.

Without these Imports, the linker drops some of the unused linked libs, causing
undefined symbols in QtCore.
2014-01-10 16:30:33 -05:00
Cory Fields 47ffb50533 qt5: Use QT_SELECT for debian-based distros.
At least Debian/Ubuntu use 'qtchooser' for switching between qt4/qt5 binaries.
It is a wrapper for all qt tools, and calls the named tool of the default
version unless overridden by the -qt= option or QT_SELECT environment variable.
QT_SELECT is set by configure once the qt version has been chosen.

Take for example, moc.

$ which moc
    /usr/bin/moc

$ ls -go /usr/bin/moc
    lrwxrwxrwx 1 9 Jul  3 21:33 /usr/bin/moc -> qtchooser

$ qtchooser -print-env
    QT_SELECT="default"
    QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt4/bin"
    QTLIBDIR="/usr/lib/x86_64-linux-gnu"

$ QT_SELECT=qt5 qtchooser -print-env
    QT_SELECT="qt5"
    QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt5/bin"
    QTLIBDIR="/usr/lib/x86_64-linux-gnu"

$ moc -v
    Qt Meta Object Compiler version 63 (Qt 4.8.4)

$ QT_SELECT=qt5 moc -v
    Qt Meta Object Compiler version 67 (Qt 5.0.1)

This should be harmless elsewhere.
2014-01-10 16:30:33 -05:00
Cory Fields 60dc589477 qt5: Use the info gleaned from configure for plugin importing 2014-01-10 16:30:33 -05:00
Cory Fields c8ba8ef654 qt5: split out qt config and add qt5 support
Qt5 detection is a big ugly mess, but at least we can fence it off.
2014-01-10 16:30:33 -05:00
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