4215 Commits

Author SHA1 Message Date
Gregory Maxwell
4e0048e454 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
2014-04-03 21:59:16 -10:00
Wladimir J. van der Laan
3d72da2d36 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
2014-04-03 21:59:16 -10:00
Wladimir J. van der Laan
9eaaa43bc3 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
2014-04-03 21:59:16 -10:00
Peter Todd
c847e6fe32 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
2014-04-03 21:59:16 -10:00
Gavin Andresen
c3df36c441 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
2014-04-03 21:59:16 -10:00
Philip Kaufmann
354ba60384 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
2014-04-03 21:59:16 -10:00
Philip Kaufmann
036a69c13c 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
2014-04-03 21:59:15 -10:00
Luke Dashjr
473ac8f676 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
2014-04-03 21:59:15 -10:00
Luke Dashjr
70d89d963c 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
2014-04-03 21:59:15 -10:00
Gavin Andresen
a89b428586 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
2014-04-03 21:59:15 -10:00
fanquake
dc4cd268f5 Update Qt 4.8.3 download link
Conflicts:
	contrib/gitian-descriptors/README

Rebased-from: 68adfc0079916c1916405f7466db769af1fe8855 0.8.x
2014-04-03 21:59:15 -10:00
Philip Kaufmann
4e1ffda0ae 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
2014-04-03 21:59:15 -10:00
Philip Kaufmann
ab86ca03a8 fix #3049 by changing comment for CNetAddr::IsRFC4193()
Rebased-from: 71888bf121a5abbfb89a693b9f2cb99935d3cfad 0.8.x
2014-04-03 21:59:15 -10:00
Philip Kaufmann
e55c96f38b misc small spelling/indentation fixes
Rebased-from: efde29e7f6b917bb4807157536dca400512ca99d 0.8.x
2014-04-03 21:59:14 -10:00
Philip Kaufmann
5fcec45078 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
2014-04-03 21:59:14 -10:00
Pieter Wuille
a3144627a0 Fix minor unit test memory leaks
Rebased-from: 5d8c41f7b5eb1a103290f8c935127addeb781f73 0.8.x
2014-04-03 21:59:14 -10:00
Gregory Maxwell
f80351c321 Make settxfee clear that units are btc/kb.
Rebased-from: fffab7e45061aba3a5f345e0fc22a8584bcb012d 0.8.x
2014-04-03 21:59:14 -10:00
Warren Togami
10d589b7f2 Merge pull request #128 from petertoddltc/add-checkpoints-to-testnet
Add checkpoints to testnet
2014-04-03 21:58:44 -10:00
pooler
f389e65c8d Add testnet DNS seed from xurious.com 2014-03-31 23:21:12 +02:00
Warren Togami
8201f6c1fd Merge pull request #138 from rnicoll/master-0.8
Correct reference to Bitcoin in French locale
2014-03-15 16:33:25 -10:00
Ross Nicoll
1c8eddbdd8 Corrected reference to Bitcoin in French locale. 2014-03-15 10:59:25 +00:00
Warren Togami
85f303d883 Merge pull request #124 from simondlr/gitignore_leveldb_fix
Fix .gitignore to properly include leveldb Makefile.
2014-02-15 00:13:43 -10:00
Peter Todd
570f4b03eb
Litecoin: Add checkpoints to testnet 2014-02-10 20:39:59 -05:00
Simon de la Rouviere
523f31b803 Fix .gitignore to properly include leveldb Makefile. 2014-01-30 12:42:37 +02:00
Warren Togami
5a0d47cf59 qt-win32.yml: remove redundant unzip dep 2014-01-10 02:39:33 -10:00
Warren Togami
fe7b87a976 Litecoin v0.8.6.2 2014-01-09 15:38:53 -10:00
Warren Togami
bacaa46b0a Litecoin: Release Notes for 0.8.6.2 2014-01-09 15:29:46 -10:00
Warren Togami
5b17393890 Upgrade gitian win32 to boost-1.55.
Fixes issue where all network activity just stops.
2014-01-09 15:23:04 -10:00
Nikolay Belikov
d781651e4c Litecoin: More straightforward SSE2 detection
- Move CPU capabilities detection from init.cpp to scrypt.cpp
- scrypt_1024_1_1_256_sp is defined as a macro: no need to check for SSE2
  every time it is used
- Test correctness of both scrypt-generic and scrypt-sse2
2014-01-09 15:23:04 -10:00
Mr.Coder
4a96ed8039 Update makefile.osx to prevent some compiling errors under osx 10.9
osx 10.9 changed the default stdlib to libc++. You may need to compile with libstdc++ to prevent some errors. At the same time, boost should be compiled use a cxxflag '-stdlib=libstdc++'
2014-01-09 15:23:04 -10:00
Sejntcior
e955fa8971 Fix QT5 compatibility for Coin Control
Adapted from https://github.com/bitcoin/bitcoin/pull/3267
2014-01-09 15:23:04 -10:00
Matthieu Caneill
a921cd224c Add: requirement libupnpc-dev for Debian, in readme-qt
This library is needed on Debian and Ubuntu, unless the flag
to omit UPnP support is set.
2014-01-09 05:55:50 -10:00
Barry Allard
50f246e747 Litecoin: s/Bit/Lite/-coin.app 2014-01-09 05:54:16 -10:00
Barry Allard
375d8e9a4e [osx] update contrib/homebrew/bitcoin.qt.pro.patch from old OpenSSL -> modern OpenSSL via homebrew 2014-01-09 05:53:45 -10:00
rolf vreijdenberger
983aa861dd Litecoin: Coin Control cosmetic s/Bitcoin/Litecoin/ 2014-01-09 05:34:37 -10:00
rolf vreijdenberger
afbb2a32c9 Litecoin: bitrpc.py cosmetic s/Bitcoin/Litecoin/ 2014-01-09 05:31:24 -10:00
Warren Togami
88e2a2e898 Litecoin v0.8.6.1 2013-12-05 22:52:50 -10:00
Warren Togami
7cc3c0a9c0 Litecoin: Reduce default mintxfee to 0.001 2013-12-05 22:50:36 -10:00
Warren Togami
3ba60fe898 Litecoin: Release Notes for 0.8.6.1 2013-12-05 22:48:57 -10:00
pooler
9f8986dec4 Litecoin: Update pnSeed array 2013-12-05 22:48:56 -10:00
Warren Togami
def3c9e53b Litecoin: Reduce Dust thresholds by 10x
DUST_SOFT_LIMIT of 0.001 means a penalty of an additional mintxfee
is charged for each output smaller than 0.001.  This is a key
behavioral disincentive in Litecoin's anti-spam design.

DUST_HARD_LIMIT of 0.00001 means inputs smaller than this size are
ignored by the wallet, not available to coin selection and
effectively do not exist.  This too discourages spam.
2013-12-04 20:36:51 -10:00
Warren Togami
3d538f0a92 Litecoin: Reduce high priority tx size limit to 5KB (from 10KB)
This is the first step in making the high priority transaction area
available to more people.  Future versions of Litecoin will eventually
reduce this to 1KB per tx to match Bitcoin 0.8.6+.  We decline to
make that drastic of a reduction now as currently p2pool miners have
too much dust to combine.

Litecoin plays an active role in p2pool development to make this less
of a problem.  Litecoin helped p2pool version 13 to reduce the
frequency of dust payouts and increase the smallest dust size to be
roughly 5x bigger.  An upcoming version of p2pool is expected to
eliminate a lot more dust payouts.

Modified-from: 9612e4c0d9730dbdb9971e53c72df17dd97daa2a
2013-12-04 20:36:51 -10:00
Warren Togami
80aa7891ec Litecoin: Reduce prioritysize from 27KB to 17KB 2013-12-04 20:36:51 -10:00
Warren Togami
75c6b1ad12 Litecoin: Checkpoint at block 456000 2013-12-04 20:36:51 -10:00
Warren Togami
91a94eb4ea LevelDB: use PosixWriteableFile only on MacOS X
mmap is proven on the other platforms, we are not changing it at
the last moment before release.
2013-12-04 20:36:51 -10:00
Patrick Strateman
648c6f4510 dont use mmap in leveldb, this is a marginal performance hit
fail on short writes

Ensure new files referred to by the manifest are in the filesystem.
2013-12-04 20:36:51 -10:00
theuni
cb75107c7d leveldb: Use native Darwin memory barriers 2013-12-04 20:36:50 -10:00
Wladimir J. van der Laan
8f16782290 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 20:36:50 -10:00
Wladimir J. van der Laan
f1e8edc966 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 20:36:50 -10:00
Wladimir J. van der Laan
bf7e6d69bf 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.

Rebased-From: 6c98cca9e47ddb9c786cd3f0445175c378515e0d
2013-12-03 22:09:16 -10:00