2815 Commits

Author SHA1 Message Date
Warren Togami
e77aede122 Litecoin v0.8.7.3 2014-09-11 18:01:37 -10:00
Warren Togami
ea4717af74 Litecoin: Lock in v2 blocks at height 700000 2014-09-11 18:01:22 -10:00
Warren Togami
57ab38f589 Litecoin: Checkpoint at block 638902 2014-09-11 18:01:22 -10:00
Warren Togami
5dfe402720 Litecoin: Reduce DEFAULT_MAX_ORPHAN_TRANSACTIONS to 25 2014-09-11 18:01:22 -10:00
Gavin Andresen
e0199e9ae8 Store fewer orphan tx by default, add -maxorphantx option
There is no reason to store thousands of orphan transactions;
normally an orphan's parents will either be broadcast or
mined reasonably quickly.

This pull drops the maximum number of orphans from 10,000 down
to 100, and adds a command-line option (-maxorphantx) that is
just like -maxorphanblocks to override the default.

Rebased-from: aa3c697e90c02d5797a59a7bfb1ecac6fbd918cf
2014-09-11 18:01:22 -10:00
Jeff Garzik
056353a2e3 Avoid returning many "inv" orphans
Rebased-from: 540ac4514dbe4e077917bad1750768218ef5f9cf
2014-09-11 18:01:22 -10:00
Wladimir J. van der Laan
4f7e47a64e Limit CNode::mapAskFor
Tighten resource constraints on CNode.

Rebased-From: d4168c82bef0d86fd254a9d993906a09f5fd7fc0 for 0.8
2014-09-11 18:01:22 -10:00
Gavin Andresen
826cd8b909 Fix crashing bug caused by orphan(s) with duplicate prevout.hash
Rebased-From: def2fdb
Rebased-By: Wladimir J. van der Laan
2014-09-11 18:01:22 -10:00
Wladimir J. van der Laan
f8d9593ce0 Avoid repeated lookups in mapOrphanTransactions and mapOrphanTransactionsByPrev
Rebased-From: 89d91f6
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-09-11 18:01:22 -10:00
Wladimir J. van der Laan
85a4b6da55 Don't poll showmyip.com, it doesn't exist anymore
Fixes #4679.

This leaves us with only one candidate, checkip.dyndns.org.
GetMyExternalIP should be phased out as soon as possible.

Rebased-from: c33b983903c64d88a2aef24da1827b86aadce596
2014-09-11 18:01:22 -10:00
pooler
91b6a2cd53 Litecoin: update pnSeed array 2014-09-12 04:24:18 +02:00
Warren Togami
fab1907372 Litecoin v0.8.7.2 2014-06-13 11:36:21 -10:00
Warren Togami
cc924b775c Litecoin: Checkpoint at block 585010 2014-06-13 11:32:29 -10:00
pooler
ccd9a1f5f7 Update testnet DNS seeds 2014-04-22 22:37:24 +02:00
Warren Togami
aa77ae3a8c Litecoin v0.8.7.1 2014-04-19 01:43:29 -10:00
Warren Togami
cbe869e153 Revert "RPC: prevent crash with walletpassphrase"
This crash seemed to have never happened in 0.8.x, and we are missing the later commit
in a8db31c83d6a43e07f741f7f61b1bf0df87621c7 so it seems better to just revert this.

This reverts commit 036a69c13c06670b46d3c02cb47e3fc7b2487854.
2014-04-18 20:57:04 -10:00
seikochan
9ec7b25cd6 Litecoin: Update more copyright notices. 2014-04-18 14:49:41 -10:00
Warren Togami
6ce2f0b2fb Litecoin v0.8.6.9 2014-04-09 01:20:21 -10:00
Warren Togami
06e78495d5 Litecoin: Checkpoint at block 541794 2014-04-03 22:03:45 -10:00
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
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
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
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