4237 Commits

Author SHA1 Message Date
Warren Togami
09137b47e4 getnormalizedtxid now explains itself. 2014-04-03 21:59:20 -10:00
Pieter Wuille
bc7bc9d751 Add normalized transaction hash
Rebased-from: e7853a91cf646a6a4701158d148f036924575a97
Rebased-by:   Warren Togami <wtogami@gmail.com>

Original code from https://github.com/bitcoin/bitcoin/pull/3656

Warning
=======
This patch was rejected from Bitcoin Core and must be considered experimental.
Theoretically it is compatible with the de facto standard as utilized by
blockchain.info and a few vendors.
2014-04-03 21:59:20 -10:00
Warren Togami
bb85fc8477 Litecoin: reject fee > 1 LTC in sendrawtransaction 2014-04-03 21:59:20 -10:00
Warren Togami
70313dd1e7 Litecoin: settxfee label in LTC 2014-04-03 21:59:20 -10:00
Wladimir J. van der Laan
55929d483b Remove "conflicted" as transaction category.
We were losing information about sent/received by overriding the
category in case of a conflicted transaction.

Hence, remove the "conflicted" category.

Conflicted status of a transaction can still be determined by looking
for confirmations<0.

Rebased-from: b77ecd66b6b19921c98422bf70a39c4338c2f8b9 0.8.x
2014-04-03 21:59:19 -10:00
Pieter Wuille
fc1426bc0a Add HasCanonicalPushes(), and use it in IsStandardTx
Conflicts:
	src/script.cpp
	src/script.h

Rebased-from: b8ee034b9f47b562932ba21cd0334d803f77ec98 0.8.x
2014-04-03 21:59:19 -10:00
Wladimir J. van der Laan
9b8b8075df qt: Add option to (not) spend unconfirmed change
- Add a wallet tab to options dialog
- Move fee setting to wallet tab
- Add new setting to set -nospendzeroconfchange from UI

Conflicts:
	src/qt/optionsmodel.cpp
	src/qt/optionsmodel.h

Conflicts:
	src/qt/forms/optionsdialog.ui
	src/qt/optionsmodel.h

Rebased-from: 391cf691d5eee2934ed0e2e2b59bd99987c394a5 0.8.x
2014-04-03 21:59:19 -10:00
Luke Dashjr
9ae42ca79b Bump copyright years to 2014 for changed files
Rebased-from: 0de199f4b52774afd6af583db9962705abbfa98a 0.8.x
2014-04-03 21:59:19 -10:00
Gavin Andresen
1222b1b59c Handle "conflicted" transactions properly
Extend CMerkleTx::GetDepthInMainChain with the concept of
a "conflicted" transaction-- a transaction generated by the wallet
that is not in the main chain or in the mempool, and, therefore,
will likely never be confirmed.

GetDepthInMainChain() now returns -1 for conflicted transactions
(0 for unconfirmed-but-in-the-mempool, and >1 for confirmed).

This makes getbalance, getbalance '*', and listunspent all agree when there are
mutated transactions in the wallet.

Before:
 listunspent: one 49BTC output
 getbalance: 96 BTC (change counted twice)
 getbalance '*': 46 BTC (spends counted twice)

After: all agree, 49 BTC available to spend.

Conflicts:
	src/qt/walletmodel.cpp
	src/wallet.cpp

Conflicts:
	src/wallet.cpp

Rebased-from: 07986591be1610f3a209f15755dabad14322f16c 0.8.x
2014-04-03 21:59:19 -10:00
b6393ce9-d324-4fe1-996b-acf82dbc3d53
441f09f263 If requested, actually treat uncomfirmed change as being uncomfirmed
This commit strengthens 1bbca249b202c4802cc2c4d4de4a26e6392b4d92 by updating the CWalletTx::IsConfirmed() function.

If (bSpendZeroConfChange==false), then IsConfirmed() should actually treat unconfirmed change as being unconfirmed.

Rebased-from: cd46fbf38e9a518633c254381209ed05410bc280
2014-04-03 21:59:18 -10:00
Peter Todd
3a67c1ff27 Partial: Fix off-by-one errors in use of IsFinalTx()
Conflicts:
	src/main.cpp
	src/miner.cpp
	src/qt/transactiondesc.cpp
	src/qt/transactionrecord.cpp

Rebased-from: 3f25f26edcc41b22130c5845024b86a9b1aa6183 0.8.x
2014-04-03 21:59:18 -10:00
Wladimir J. van der Laan
d2ee3aecbe 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.

Conflicts:
	src/qt/addresstablemodel.cpp

Rebased-from: 72378a3b67c559310f8047a622ee109850f80e59 0.8.x
2014-04-03 21:59:18 -10:00
Gregory Maxwell
6a51fcf1bd [raw] reject insanely high fees by default in sendrawtransaction
There have been several incidents where mainnet experimentation with
 raw transactions  resulted in insane fees.  This is hard to prevent
 in the raw transaction api because the inputs may not be known.
 Since sending doesn't work if the inputs aren't known, we can catch
 it there.

This rejects fees > than 10000 * nMinRelayTxFee or 1 BTC with the
 defaults and can be overridden with a bool at the rpc.

Conflicts:
	src/main.cpp
	src/main.h
	src/rpcrawtransaction.cpp

Rebased-from: 6349de20f90f046aefa9eaae0de8e3faf11527fa 0.8.x
2014-04-03 21:59:18 -10:00
Wladimir J. van der Laan
6b7c937114 Add option to avoid spending unconfirmed change
Conflicts:
	src/init.cpp
	src/wallet.cpp
	src/wallet.h

Rebased-from: 86d40cab2725e758f4ddaf1e1149f0ab897df110 0.8.x
2014-04-03 21:59:18 -10:00
Wladimir J. van der Laan
c1c35358fb Fix getaddednodeinfo RPC call with dns=false
The getaddednodeinfo RPC call, when invoked with the dns flag set to
false, returns a malformed JSON object with duplicate keys.

Change this to return an array of objects with one key as
shown in the help message.

Fixes #3581.

Rebased-from: a41825be5762ff36dcf0d89c20b95572af30c6bb 0.8.x
2014-04-03 21:59:18 -10:00
Wladimir J. van der Laan
7e1d5ca894 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.

Conflicts:
	src/rpcdump.cpp

Conflicts:
	src/rpcdump.cpp

Rebased-from: b403ab80ab39d41a6f965479cdf878cd8e58a399 0.8.x
2014-04-03 21:59:17 -10:00
Wladimir J. van der Laan
56646670e1 qt: Fix richtext detection hang issue on very old Qt versions
Alternative implementation. Thanks to @awoland for the original.
Fixes #3486.

Rebased-from: 90a28680bd8b24800428b301f7bf6cbf534de2ca 0.8.x
2014-04-03 21:59:17 -10:00
Luke Dashjr
7f85c10736 Bugfix: Undefine _FORTIFY_SOURCE before redefining it, to avoid warnings on compilers that define it by default
Rebased-from: 2b5514138ab0b4e7fd1cbebe77852d41d09ca38d 0.8.x
2014-04-03 21:59:17 -10:00
Wladimir J. van der Laan
5860707b6c 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.

Rebased-from: 3127d6caf46e2e96fc701b2d44ca28c4b9d7717a 0.8.x
2014-04-03 21:59:17 -10:00
Wladimir J. van der Laan
dab55190ec Explicitly ensure that wallet is unlocked in importprivkey
This makes for a more useful error reply (fixes #957).

Rebased-from: 4175de73d954a02c9f57f603e63e0d688ddfeed2 0.8.x
2014-04-03 21:59:17 -10:00
regergregregerrge
5a79068b5a Update build-osx.md
Conflicts:
	doc/build-osx.md

Rebased-from: faa5b51468ab1f8d3637c14fe39e72cb92cd24ea 0.8.x
2014-04-03 21:59:17 -10:00
Micha
a8f8323fa9 Change release-process.md to sign release tags
Conflicts:
	doc/release-process.md

Rebased-from: b586637108dbb7cfcd8f6fa6d74d6a7768eee021 0.8.x
2014-04-03 21:59:17 -10:00
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