diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | contrib/bitcoind.bash-completion | 40 | ||||
-rw-r--r-- | doc/release-notes.md | 306 | ||||
-rw-r--r-- | src/clientversion.h | 4 | ||||
-rw-r--r-- | src/init.cpp | 1 | ||||
-rw-r--r-- | src/main.h | 8 | ||||
-rw-r--r-- | src/net.cpp | 4 | ||||
-rw-r--r-- | src/qt/bitcoin.cpp | 4 | ||||
-rw-r--r-- | src/qt/bitcoingui.cpp | 3 | ||||
-rw-r--r-- | src/qt/coincontroldialog.cpp | 14 | ||||
-rw-r--r-- | src/qt/coincontroldialog.h | 28 | ||||
-rw-r--r-- | src/qt/forms/addressbookpage.ui | 6 | ||||
-rw-r--r-- | src/qt/forms/coincontroldialog.ui | 7 | ||||
-rw-r--r-- | src/qt/forms/sendcoinsdialog.ui | 12 | ||||
-rw-r--r-- | src/test/Makefile.am | 1 | ||||
-rw-r--r-- | src/test/main_tests.cpp | 20 | ||||
-rw-r--r-- | src/wallet.h | 4 |
17 files changed, 130 insertions, 336 deletions
diff --git a/configure.ac b/configure.ac index 3ed4549a88..9d5457f03b 100644 --- a/configure.ac +++ b/configure.ac @@ -2,9 +2,9 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 9) -define(_CLIENT_VERSION_REVISION, 0) +define(_CLIENT_VERSION_REVISION, 99) define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_IS_RELEASE, true) +define(_CLIENT_VERSION_IS_RELEASE, false) define(_COPYRIGHT_YEAR, 2014) AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin]) AC_CONFIG_AUX_DIR([src/build-aux]) diff --git a/contrib/bitcoind.bash-completion b/contrib/bitcoind.bash-completion index dd6c1ce819..03ef173c09 100644 --- a/contrib/bitcoind.bash-completion +++ b/contrib/bitcoind.bash-completion @@ -1,5 +1,5 @@ -# bash programmable completion for bitcoind(1) -# Copyright (c) 2012 Christian von Roques <roques@mti.ag> +# bash programmable completion for bitcoind(1) and bitcoin-cli(1) +# Copyright (c) 2012,2014 Christian von Roques <roques@mti.ag> # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -37,9 +37,35 @@ _bitcoind() { COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword + if ((cword > 4)); then + case ${words[cword-4]} in + signrawtransaction) + COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) ) + return 0 + ;; + esac + fi + + if ((cword > 3)); then + case ${words[cword-3]} in + addmultisigaddress) + _bitcoin_accounts + return 0 + ;; + gettxout|importprivkey) + COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) + return 0 + ;; + esac + fi + if ((cword > 2)); then case ${words[cword-2]} in - listreceivedbyaccount|listreceivedbyaddress) + addnode) + COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) ) + return 0 + ;; + getblock|getrawtransaction|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; @@ -51,11 +77,11 @@ _bitcoind() { fi case "$prev" in - backupwallet) + backupwallet|dumpwallet|importwallet) _filedir return 0 ;; - setgenerate) + getmempool|lockunspent|setgenerate) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; @@ -66,7 +92,7 @@ _bitcoind() { esac case "$cur" in - -conf=*|-pid=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*) + -conf=*|-pid=*|-loadblock=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*) cur="${cur#*=}" _filedir return 0 @@ -103,7 +129,7 @@ _bitcoind() { esac } -complete -F _bitcoind bitcoind +complete -F _bitcoind bitcoind bitcoin-cli } # Local variables: diff --git a/doc/release-notes.md b/doc/release-notes.md index 8bf0b50bc0..f16eec32a2 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,304 +1,2 @@ -Bitcoin Core version 0.9.0rc1 is now available from: - - http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.9.0rc1/ - -This is a release candidate for a new major version. A major version brings -both new features and bug fixes. - -Please report bugs using the issue tracker at github: - - https://github.com/bitcoin/bitcoin/issues - -How to Upgrade --------------- - -If you are running an older version, shut it down. Wait until it has completely -shut down (which might take a few minutes for older versions), uninstall all -earlier versions of Bitcoin, then run the installer (on Windows) or just copy -over /Applications/Bitcoin-Qt (on Mac) or bitcoind/bitcoin-qt (on Linux). - -If you are upgrading from version 0.7.2 or earlier, the first time you run -0.9.0 your blockchain files will be re-indexed, which will take anywhere from -30 minutes to several hours, depending on the speed of your machine. - -On Windows, do not forget to uninstall all earlier versions of the Bitcoin -client first, especially if you are switching to the 64-bit version. - -Windows 64-bit installer -------------------------- - -New in 0.9.0 is the Windows 64-bit version of the client. There have been -frequent reports of users running out of virtual memory on 32-bit systems -during the initial sync. Because of this it is recommended to install the -64-bit version if your system supports it. - -Rebranding to Bitcoin Core ---------------------------- - -To reduce confusion between Bitcoin-the-network and Bitcoin-the-software we -have renamed the reference client to Bitcoin Core. - -Autotools build system ------------------------ - -For 0.9.0 we switched to an autotools-based build system instead of individual -(q)makefiles. - -Using the standard “./autogen.sh; ./configure; make” to build Bitcoin-Qt and -bitcoind makes it easier for experienced open source developers to contribute -to the project. - -Be sure to check doc/build-*.md for your platform before building from source. - -Bitcoin-cli -------------- - -Another change in the 0.9 release is moving away from the bitcoind executable -functioning both as a server and as a RPC client. The RPC client functionality -(“tell the running bitcoin daemon to do THIS”) was split into a separate -executable, 'bitcoin-cli'. The RPC client code will eventually be removed from -bitcoind, but will be kept for backwards compatibility for a release or two. - -`walletpassphrase` RPC ------------------------ - -The behavior of the `walletpassphrase` RPC when the wallet is already unlocked -has changed between 0.8 and 0.9. - -The 0.8 behavior of `walletpassphrase` is to fail when the wallet is already unlocked: - - > walletpassphrase 1000 - walletunlocktime = now + 1000 - > walletpassphrase 10 - Error: Wallet is already unlocked (old unlock time stays) - -The new behavior of `walletpassphrase` is to set a new unlock time overriding -the old one: - - > walletpassphrase 1000 - walletunlocktime = now + 1000 - > walletpassphrase 10 - walletunlocktime = now + 10 (overriding the old unlock time) - -0.9.0rc1 Release notes -======================= - -RPC: - -- 'listreceivedbyaddress' now provides tx ids -- Updated help and tests for 'getreceivedby(account|address)' -- In 'getblock', accept 2nd 'verbose' parameter, similar to getrawtransaction, - but defaulting to 1 for backward compatibility -- Add 'verifychain', to verify chain database at runtime -- Add 'dumpwallet' and 'importwallet' RPCs -- 'keypoolrefill' gains optional size parameter -- Add 'getbestblockhash', to return tip of best chain -- Add 'chainwork' (the total work done by all blocks since the genesis block) - to 'getblock' output -- Make RPC password resistant to timing attacks -- Clarify help messages and add examples -- Add 'getrawchangeaddress' call for raw transaction change destinations -- Reject insanely high fees by default in 'sendrawtransaction' -- Add RPC call 'decodescript' to decode a hex-encoded transaction script -- Make 'validateaddress' provide redeemScript -- Add 'getnetworkhashps' to get the calculated network hashrate -- New RPC 'ping' command to request ping, new 'pingtime' and 'pingwait' fields - in 'getpeerinfo' output -- Adding new 'addrlocal' field to 'getpeerinfo' output -- Add verbose boolean to 'getrawmempool' -- Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance -- Explicitly ensure that wallet is unlocked in `importprivkey` -- Add check for valid keys in `importprivkey` - -Command-line options: - -- Rename option '-tor' to '-onion' to better reflect what it does -- Add '-disablewallet' mode to let bitcoind run entirely without wallet (when - built with wallet) -- Update default '-rpcsslciphers' to include TLSv1.2 -- make '-logtimestamps' default on and rework help-message -- RPC client option: '-rpcwait', to wait for server start -- Remove '-logtodebugger' -- Allow `-noserver` with bitcoind - -Block-chain handling and storage: - -- Update leveldb to 1.15 -- Check for correct genesis (prevent cases where a datadir from the wrong - network is accidentally loaded) -- Allow txindex to be removed and add a reindex dialog -- Log aborted block database rebuilds -- Store orphan blocks in serialized form, to save memory -- Limit the number of orphan blocks in memory to 750 -- Fix non-standard disconnected transactions causing mempool orphans -- Add a new checkpoint at block 279,000 - -Wallet: - -- Store key creation time. Calculate whole-wallet birthday. -- Optimize rescan to skip blocks prior to birthday -- Let user select wallet file with -wallet=foo.dat -- Consider generated coins mature at 101 instead of 120 blocks -- Improve wallet load time -- Don't count txins for priority to encourage sweeping -- Don't create empty transactions when reading a corrupted wallet -- Fix rescan to start from beginning after importprivkey -- Only create signatures with low S values. - -Mining: - -- Increase default -blockmaxsize/prioritysize to 750K/50K -- 'getblocktemplate' does not require a key to create a block template - -Protocol and network: - -- Send tx relay flag with version -- New 'reject' P2P message (BIP 0061, see https://gist.github.com/gavinandresen/7079034 for draft) -- Dump addresses every 15 minutes instead of 10 seconds -- Relay OP_RETURN data TxOut as standard transaction type -- Remove CENT-output free transaction rule when relaying -- Lower maximum size for free transaction creation -- Send multiple inv messages if mempool.size > MAX_INV_SZ -- Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSION -- Do not treat fFromMe transaction differently when broadcasting -- Process received messages one at a time without sleeping between messages -- Improve logging of failed connections -- Bump protocol version to 70002 -- Add some additional logging to give extra network insight -- Added new DNS seed from bitcoinstats.com - -Validation: - -- Log reason for non-standard transaction rejection -- Prune provably-unspendable outputs, and adapt consistency check for it. -- Detect any sufficiently long fork and add a warning -- Call the -alertnotify script when we see a long or invalid fork -- Fix multi-block reorg transaction resurrection -- Reject non-canonically-encoded serialization sizes -- Reject dust amounts during validation -- Accept nLockTime transactions that finalize in the next block - -Build system: - -- Switch to autotools-based build system -- Build without wallet by passing `--disable-wallet` to configure, this removes - the BerkeleyDB dependency -- Upgrade gitian dependencies (libpng, libz, libupnpc, boost, openssl) to more - recent versions -- Windows 64-bit build support -- Solaris compatibility fixes -- Check integrity of gitian input source tarballs -- Enable full GCC Stack-smashing protection for all OSes - -GUI: - -- Switch to Qt 5.2.0 for Windows build -- Add payment request (BIP 0070) support -- Improve options dialog -- Show transaction fee in new send confirmation dialog -- Add total balance in overview page -- Allow user to choose data directory on first start, when data directory is - missing, or when the -choosedatadir option is passed -- Save and restore window positions -- Add vout index to transaction id in transactions details dialog -- Add network traffic graph in debug window -- Add open URI dialog -- Add Coin Control Features -- Improve receive coins workflow: make the 'Receive' tab into a form to request - payments, and move historical address list functionality to File menu. -- Rebrand to `Bitcoin Core` -- Move initialization/shutdown to a thread. This prevents “Not responding” - messages during startup. Also show a window during shutdown. -- Don't regenerate autostart link on every client startup -- Show and store message of normal bitcoin:URI -- Fix richtext detection hang issue on very old Qt versions -- osx: Make use of the 10.8+ user notification center to display growl like - notifications -- osx: Added NSHighResolutionCapable flag to Info.plist for better font - rendering on Retina displays. -- osx: Fix bitcoin-qt startup crash when clicking dock icon -- linux: Fix Gnome bitcoin: URI handler - -Miscellaneous: - -- Add Linux script (contrib/qos/tc.sh) to limit outgoing bandwidth -- Add '-regtest' mode, similar to testnet but private with instant block - generation with 'setgenerate' RPC. -- Add 'linearize.py' script to contrib, for creating bootstrap.dat -- Add separate bitcoin-cli client - -Credits --------- - -Thanks to everyone who contributed to this release: - -- Andrey -- bitsofproof -- Brandon Dahler -- Christian Decker -- Christopher Latham -- Chuck -- coblee -- constantined -- Cory Fields -- Cozz Lovan -- Daniel Larimer -- David Hill -- Dmitry Smirnov -- Eric Lombrozo -- fanquake -- fcicq -- Florin -- Gavin Andresen -- Gregory Maxwell -- Guillermo Céspedes Tabárez -- HaltingState -- Han Lin Yap -- harry -- Jeff Garzik -- Johnathan Corgan -- Jonas Schnelli -- Josh Lehan -- Josh Triplett -- Julian Langschaedel -- Kangmo -- Lake Denman -- Luke Dashjr -- Mark Friedenbach -- Matt Corallo -- Michael Bauer -- Michael Ford -- Michagogo -- Mike Hearn -- Nils Schneider -- Olivier Langlois -- patrick s -- Patrick Strateman -- Peter Todd -- phantomcircuit -- phelixbtc -- Philip Kaufmann -- Pieter Wuille -- Rav3nPL -- regergregregerrge -- Robert Backhaus -- Roman Mindalev -- Rune K. Svendsen -- Ryan Niebur -- Scott Ellis -- Scott Willeke -- Sergey Kazenyuk -- Shawn Wilkinson -- Sined -- sje -- super3 -- Tamas Blummer -- theuni -- Thomas Holenstein -- Timon Rapp -- Timothy Stranex -- Vaclav Vobornik -- vhf / victor felder -- Vinnie Falco -- Warren Togami -- Wladimir J. van der Laan +(note: this is a temporary file, to be added-to by anybody, and moved to +release-notes at release time) diff --git a/src/clientversion.h b/src/clientversion.h index 3c69e028b5..8d0f89c715 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -12,10 +12,10 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 #define CLIENT_VERSION_REVISION 0 -#define CLIENT_VERSION_BUILD 0 +#define CLIENT_VERSION_BUILD 99 // Set to true for release, false for prerelease or test build -#define CLIENT_VERSION_IS_RELEASE true +#define CLIENT_VERSION_IS_RELEASE false // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source diff --git a/src/init.cpp b/src/init.cpp index 4cc18800a5..372f5db297 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -593,6 +593,7 @@ bool AppInit2(boost::thread_group& threadGroup) // ********************************************************* Step 5: verify wallet database integrity #ifdef ENABLE_WALLET if (!fDisableWallet) { + LogPrintf("Using wallet %s\n", strWalletFile); uiInterface.InitMessage(_("Verifying wallet...")); if (!bitdb.Open(GetDataDir())) diff --git a/src/main.h b/src/main.h index 781562854f..cc1786d0a6 100644 --- a/src/main.h +++ b/src/main.h @@ -266,10 +266,10 @@ int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, // DUP CHECKSIG DROP ... repeated 100 times... OP_1 // - /** Check for standard transaction types - @param[in] mapInputs Map of previous transactions that have outputs we're spending - @return True if all inputs (scriptSigs) use only standard transaction forms - */ +/** Check for standard transaction types + @param[in] mapInputs Map of previous transactions that have outputs we're spending + @return True if all inputs (scriptSigs) use only standard transaction forms +*/ bool AreInputsStandard(const CTransaction& tx, CCoinsViewCache& mapInputs); /** Count ECDSA signature operations the old-fashioned (pre-0.6) way diff --git a/src/net.cpp b/src/net.cpp index bb1d1bac45..19f4a73bc4 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1653,7 +1653,7 @@ bool BindListenPort(const CService &addrBind, string& strError) { int nErr = WSAGetLastError(); if (nErr == WSAEADDRINUSE) - strError = strprintf(_("Unable to bind to %s on this computer. Bitcoin is probably already running."), addrBind.ToString()); + strError = strprintf(_("Unable to bind to %s on this computer. Bitcoin Core Daemon is probably already running."), addrBind.ToString()); else strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %d, %s)"), addrBind.ToString(), nErr, strerror(nErr)); LogPrintf("%s\n", strError); @@ -1664,7 +1664,7 @@ bool BindListenPort(const CService &addrBind, string& strError) // Listen for incoming connections if (listen(hListenSocket, SOMAXCONN) == SOCKET_ERROR) { - strError = strprintf("Error: Listening for incoming connections failed (listen returned error %d)", WSAGetLastError()); + strError = strprintf(_("Error: Listening for incoming connections failed (listen returned error %d)"), WSAGetLastError()); LogPrintf("%s\n", strError); return false; } diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 162009f5de..652d39a5ce 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -448,12 +448,12 @@ int main(int argc, char *argv[]) fSelParFromCLFailed = true; } #ifdef ENABLE_WALLET - // Parse URIs on command line -- this can affect TestNet() / RegTest() mode + // Parse URIs on command line -- this can affect Params() if (!PaymentServer::ipcParseCommandLine(argc, argv)) exit(0); #endif - bool isaTestNet = TestNet() || RegTest(); + bool isaTestNet = Params().NetworkID() != CChainParams::MAIN; // Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index f66fab496c..0ca16edb8c 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -151,8 +151,7 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) : // Status bar notification icons QFrame *frameBlocks = new QFrame(); frameBlocks->setContentsMargins(0,0,0,0); - frameBlocks->setMinimumWidth(56); - frameBlocks->setMaximumWidth(56); + frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks); frameBlocksLayout->setContentsMargins(3,0,3,0); frameBlocksLayout->setSpacing(3); diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 2d8fcd7a52..1e5a2efc94 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -125,6 +125,7 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) : ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but dont show it + ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but dont show it // default view is sorted by amount desc sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder); @@ -327,7 +328,7 @@ void CoinControlDialog::sortView(int column, Qt::SortOrder order) sortColumn = column; sortOrder = order; ui->treeWidget->sortItems(column, order); - ui->treeWidget->header()->setSortIndicator((sortColumn == COLUMN_AMOUNT_INT64 ? COLUMN_AMOUNT : (sortColumn == COLUMN_PRIORITY_INT64 ? COLUMN_PRIORITY : sortColumn)), sortOrder); + ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder); } // treeview: clicked on header @@ -335,22 +336,18 @@ void CoinControlDialog::headerSectionClicked(int logicalIndex) { if (logicalIndex == COLUMN_CHECKBOX) // click on most left column -> do nothing { - ui->treeWidget->header()->setSortIndicator((sortColumn == COLUMN_AMOUNT_INT64 ? COLUMN_AMOUNT : (sortColumn == COLUMN_PRIORITY_INT64 ? COLUMN_PRIORITY : sortColumn)), sortOrder); + ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder); } else { - if (logicalIndex == COLUMN_AMOUNT) // sort by amount - logicalIndex = COLUMN_AMOUNT_INT64; - - if (logicalIndex == COLUMN_PRIORITY) // sort by priority - logicalIndex = COLUMN_PRIORITY_INT64; + logicalIndex = getMappedColumn(logicalIndex, false); if (sortColumn == logicalIndex) sortOrder = ((sortOrder == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder); else { sortColumn = logicalIndex; - sortOrder = ((sortColumn == COLUMN_AMOUNT_INT64 || sortColumn == COLUMN_PRIORITY_INT64 || sortColumn == COLUMN_DATE || sortColumn == COLUMN_CONFIRMATIONS) ? Qt::DescendingOrder : Qt::AscendingOrder); // if amount,date,conf,priority then default => desc, else default => asc + sortOrder = ((sortColumn == COLUMN_LABEL || sortColumn == COLUMN_ADDRESS) ? Qt::AscendingOrder : Qt::DescendingOrder); // if label or address then default => asc, else default => desc } sortView(sortColumn, sortOrder); @@ -731,6 +728,7 @@ void CoinControlDialog::updateView() // date itemOutput->setText(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime())); + itemOutput->setText(COLUMN_DATE_INT64, strPad(QString::number(out.tx->GetTxTime()), 20, " ")); // confirmations itemOutput->setText(COLUMN_CONFIRMATIONS, strPad(QString::number(out.nDepth), 8, " ")); diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h index b9318ca7b0..465e2a009d 100644 --- a/src/qt/coincontroldialog.h +++ b/src/qt/coincontroldialog.h @@ -65,9 +65,35 @@ private: COLUMN_TXHASH, COLUMN_VOUT_INDEX, COLUMN_AMOUNT_INT64, - COLUMN_PRIORITY_INT64 + COLUMN_PRIORITY_INT64, + COLUMN_DATE_INT64 }; + // some columns have a hidden column containing the value used for sorting + int getMappedColumn(int column, bool fVisibleColumn = true) + { + if (fVisibleColumn) + { + if (column == COLUMN_AMOUNT_INT64) + return COLUMN_AMOUNT; + else if (column == COLUMN_PRIORITY_INT64) + return COLUMN_PRIORITY; + else if (column == COLUMN_DATE_INT64) + return COLUMN_DATE; + } + else + { + if (column == COLUMN_AMOUNT) + return COLUMN_AMOUNT_INT64; + else if (column == COLUMN_PRIORITY) + return COLUMN_PRIORITY_INT64; + else if (column == COLUMN_DATE) + return COLUMN_DATE_INT64; + } + + return column; + } + private slots: void showMenu(const QPoint &); void copyAmount(); diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui index 49221f41c1..f40c446050 100644 --- a/src/qt/forms/addressbookpage.ui +++ b/src/qt/forms/addressbookpage.ui @@ -122,6 +122,12 @@ </item> <item> <widget class="QPushButton" name="closeButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> <string>C&lose</string> </property> diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui index a31c491e95..cd1c0ffa18 100644 --- a/src/qt/forms/coincontroldialog.ui +++ b/src/qt/forms/coincontroldialog.ui @@ -428,7 +428,7 @@ <bool>false</bool> </property> <property name="columnCount"> - <number>11</number> + <number>12</number> </property> <attribute name="headerShowSortIndicator" stdset="0"> <bool>true</bool> @@ -494,6 +494,11 @@ <string/> </property> </column> + <column> + <property name="text"> + <string/> + </property> + </column> </widget> </item> <item> diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index 95f3294adb..4cb1670c79 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -742,6 +742,12 @@ </property> <item> <widget class="QLabel" name="label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> <string>Balance:</string> </property> @@ -749,6 +755,12 @@ </item> <item> <widget class="QLabel" name="labelBalance"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> </property> diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 667e53c6b4..5a1f42ee61 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -45,6 +45,7 @@ test_bitcoin_SOURCES = \ DoS_tests.cpp \ getarg_tests.cpp \ key_tests.cpp \ + main_tests.cpp \ miner_tests.cpp \ mruset_tests.cpp \ multisig_tests.cpp \ diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp new file mode 100644 index 0000000000..b7f4312cda --- /dev/null +++ b/src/test/main_tests.cpp @@ -0,0 +1,20 @@ +#include "core.h" +#include "main.h" + +#include <boost/test/unit_test.hpp> + +BOOST_AUTO_TEST_SUITE(main_tests) + +BOOST_AUTO_TEST_CASE(subsidy_limit_test) +{ + uint64_t nSum = 0; + for (int nHeight = 0; nHeight < 7000000; nHeight += 1000) { + uint64_t nSubsidy = GetBlockValue(nHeight, 0); + BOOST_CHECK(nSubsidy <= 50 * COIN); + nSum += nSubsidy * 1000; + BOOST_CHECK(MoneyRange(nSum)); + } + BOOST_CHECK(nSum == 2099999997690000ULL); +} + +BOOST_AUTO_TEST_SUITE_END() diff --git a/src/wallet.h b/src/wallet.h index 7feb86d294..e2e89fffe7 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -675,8 +675,10 @@ public: { // Transactions not sent by us: not trusted const CWalletTx* parent = pwallet->GetWalletTx(txin.prevout.hash); + if (parent == NULL) + return false; const CTxOut& parentOut = parent->vout[txin.prevout.n]; - if (parent == NULL || !pwallet->IsMine(parentOut)) + if (!pwallet->IsMine(parentOut)) return false; } return true; |