Make settxfee clear that units are btc/kb.

Rebased-from: fffab7e45061aba3a5f345e0fc22a8584bcb012d 0.8.x
Fix minor unit test memory leaks

Rebased-from: 5d8c41f7b5eb1a103290f8c935127addeb781f73 0.8.x
Bitcoin-Qt: BitcoinGUI::message() updates/fixes

- ensure message boxes are shown in center of our main window, not
  centered on the users desktop
- always prefer user supplied titles for message boxes over the functions
  defaults (fixes a bug, where transaction info messages did not contain
  information, if it was incoming or outgoing)

Rebased-from: ca3c4d8d61d67f29c5db2b526cbfb5a4e7d9b727 0.8.x
misc small spelling/indentation fixes

Rebased-from: efde29e7f6b917bb4807157536dca400512ca99d 0.8.x
fix #3049 by changing comment for CNetAddr::IsRFC4193()

Rebased-from: 71888bf121a5abbfb89a693b9f2cb99935d3cfad 0.8.x
Bitcoin-Qt: prevent stuck/unusable debug window on exit

- when closing the client with an open debug window, that window could
  become stuck/unsuable (it was still shown wherea the main window was
  hidden already)
- fix this by hiding the debug window, when quitting the the client

Rebased-from: 3f8241c65539ceae7dc858f6f85acf3c2c58253b 0.8.x
Update Qt 4.8.3 download link

Conflicts:
	contrib/gitian-descriptors/README

Rebased-from: 68adfc0079916c1916405f7466db769af1fe8855 0.8.x
Avoid core dump if rpc port is in use.

The cleanup code needs to check for NULL rpcworkers thread group.

Rebased-from: b7f6e156462a24129078252a4e957a5be622ebcc 0.8.x
Bugfix: Avoid trying to parse outputs that aren't relevant to CWalletTx::GetAmounts

This fixes a warning when an output we aren't concerned with can't be parsed.

Rebased-from: a8c1df93c87f089bfb80d959724a65b714b2aaca 0.8.x
Bugfix: Supress "address" key in transaction details, when the destination isn't recognized

Previously, it would pass corrupt/random through base58.

Rebased-from: 33a3cfaf0fe7ab8f23b815e678fe72f2a95fb61f 0.8.x
RPC: prevent crash with walletpassphrase

- fix crash with walletpassphrase by checking if RPC server is running and
  give a friendly error message how to fix this (fixes #3100)
- add 3 new RPCErrorCodes RPC_SERVER_NOT_STARTED
- use the new code where needed / missing

Upstream: 4315ec1a722a290ba2bb2b86080a787f6174e2a2

Conflicts:
	src/rpcnet.cpp
	src/rpcwallet.cpp

Rebased-from: a80b01cdf6323dae55020933ad1f5ea52f64b0bc 0.8.x
bitcoingui: show main window (if hidden) on modal messages

Conflicts:
	src/qt/bitcoingui.cpp

Conflicts:
	src/qt/bitcoingui.cpp

Rebased-from: ad47c2848db573ea6656bbc16bd49000166dfd16 0.8.x
Bug fix: CDataStream::GetAndClear() when nReadPos > 0

Changed CDataStream::GetAndClear() to use the most obvious
get get and clear instead of a tricky swap().

Added a unit test for CDataStream insert/erase/GetAndClear.

Note: GetAndClear() is not performance critical, it is used only
by the send-a-message-to-the-network code. Bug was not noticed
before now because the send-a-message code never erased from the
stream.

Rebased-from: b56b10252f8f5374cbe750178e57460b4aeaeeef 0.8.x
Show short scriptPubKeys correctly

Previously bitcoin-qt's -debug transaction info was showing CTxOut([error])

It is valid for a scriptPubKey to be any size, for example simply
OP_RETURN is valid and can be used to destroy a TXOUT to mining fees.

Conflicts:
    src/core.cpp

Rebased-from: 5d37b9db291cf60d3a1b4a15d00ef00baa7d9f4e 0.8.x
qt: add license header to source files

Closes #839

Conflicts:
	src/qt/addressbookpage.cpp
	src/qt/guiutil.cpp
	src/qt/intro.cpp
	src/qt/intro.h
	src/qt/macnotificationhandler.h
	src/qt/optionsdialog.cpp
	src/qt/optionsmodel.cpp
	src/qt/paymentrequestplus.cpp
	src/qt/paymentrequestplus.h
	src/qt/paymentserver.cpp
	src/qt/receivecoinsdialog.cpp
	src/qt/receivecoinsdialog.h
	src/qt/receiverequestdialog.cpp
	src/qt/receiverequestdialog.h
	src/qt/trafficgraphwidget.cpp
	src/qt/trafficgraphwidget.h
	src/qt/walletmodeltransaction.cpp
	src/qt/walletmodeltransaction.h

Rebased-from: c70289eefe66f72cb3133ff603c808b700cbae5f 0.8.x
doc: replace DOS with MSYS shell to be more consistent

A plain DOS window doesn't have the right path settings, whereas
the MSYS shell window does.

Conflicts:
    doc/build-msw.md

Rebased-from: 51e3e0909eb8567cde3fe1be0badbc266cb4cc6a 0.8.x
Partial: 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.

Conflicts:
	src/key.cpp
	src/main.cpp
	src/wallet.cpp

Rebased-from: 2e0c4da3fb1ce78dca1b3db723cf095a94f2f371 0.8.x
Change release-process.md to sign release tags

Conflicts:
	doc/release-process.md

Rebased-from: b586637108dbb7cfcd8f6fa6d74d6a7768eee021 0.8.x
Update build-osx.md

Conflicts:
	doc/build-osx.md

Rebased-from: faa5b51468ab1f8d3637c14fe39e72cb92cd24ea 0.8.x
Explicitly ensure that wallet is unlocked in `importprivkey`

This makes for a more useful error reply (fixes #957).

Rebased-from: 4175de73d954a02c9f57f603e63e0d688ddfeed2 0.8.x