Commit graph

3558 commits

Author SHA1 Message Date
Wladimir J. van der Laan 5c99323459
Merge pull request #3693
f05fa03 [Qt] small .ui cleanup for optionsdialog and coincontrol (Philip Kaufmann)
2014-02-18 14:37:58 +01:00
Wladimir J. van der Laan bd8e3751d7
Merge pull request #3687
82e9600 add constants for shared (GUI/core) -dbcache settings (Philip Kaufmann)
879b390 Increase default dbcache to 100 MiB (Pieter Wuille)
2014-02-18 08:35:45 +01:00
Wladimir J. van der Laan 0a0cf14337
Merge pull request #3691
a143d4c Fix crash in importwallet and dumpwallet formatting (Wladimir J. van der Laan)
2014-02-17 18:45:10 +01:00
Wladimir J. van der Laan a143d4ce58 Fix crash in importwallet and dumpwallet formatting
- DecodeDumpTime was passing a statically allocated facet object to
  std::locale. However, "The constructed locale object takes over
  responsibility for deleting this facet object." causing a free()
  crash on scope exit. Fixes #3670.

- EncodeDumpTime was using the wrong format character for dates
  (appears accidentally introduced in 51ed9ec9)
2014-02-17 18:42:05 +01:00
Gavin Andresen b25d1c0509 Merge pull request #3679 from laanwj/2014_02_walletpassphrase_behavior
Document new `walletpassphrase` behavior in 0.9
2014-02-17 12:11:13 -05:00
Gavin Andresen e7d854c8ba Merge pull request #3690 from laanwj/2014_02_gettransaction_serialize_only_tx
Serialize only CTransaction data in gettransaction RPC hex
2014-02-17 10:18:34 -05:00
Philip Kaufmann f05fa03e8b [Qt] small .ui cleanup for optionsdialog and coincontrol 2014-02-17 15:50:40 +01:00
Philip Kaufmann 82e96006ae add constants for shared (GUI/core) -dbcache settings
- adds nDefaultDbCache, nMaxDbCache and nMinDbCache in txdb.h
2014-02-17 15:44:21 +01:00
Pieter Wuille 879b390758 Increase default dbcache to 100 MiB 2014-02-17 15:11:06 +01:00
Wladimir J. van der Laan 29ecccb597
Merge pull request #3587
ceb8e22 [Qt] allow translation of client bitness (Philip Kaufmann)
2014-02-17 14:04:55 +01:00
Wladimir J. van der Laan 047ee427e7
Merge pull request #3666
bbfce8a fix non-standard reason string in main.cpp (Philip Kaufmann)
2014-02-17 13:59:50 +01:00
Wladimir J. van der Laan 7abcd1a1c9
Merge pull request #3614
b920148 [Qt] Improve single step in bitcoinamountfield (Cozz Lovan)
2014-02-17 12:30:30 +01:00
Wladimir J. van der Laan 129429dd8f
Merge pull request #3643
d54e819 Log warnings when bootstrap files are specified but cannot be opened (Wladimir J. van der Laan)
2014-02-17 10:59:03 +01:00
Wladimir J. van der Laan 05add3fe0e Serialize only CTransaction data in gettransaction RPC hex
Don't include trailing implementation-specific wallet metadata.
Fixes 3a1c20b.
2014-02-17 08:53:16 +01:00
Philip Kaufmann 7f1b6a6316 remove orphan fHaveGUI from main.h 2014-02-16 22:05:24 +01:00
Wladimir J. van der Laan b8d9058a4d
Merge pull request #3646
5770254 Copyright header updates s/2013/2014 on files whose last git commit was done in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does. (gubatron)
2014-02-16 11:44:48 +01:00
Wladimir J. van der Laan 6c0db81c09 Document new walletpassphrase behavior in 0.9
Also add a note to the release notes.
Fixes #3672.
2014-02-16 10:26:12 +01:00
Wladimir J. van der Laan 25d816110b
Merge pull request #3676
29d4507 qt: Add option to (not) spend unconfirmed change (Wladimir J. van der Laan)
2014-02-16 09:29:12 +01:00
Wladimir J. van der Laan 29d45073c9 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
2014-02-16 09:23:08 +01:00
Philip Kaufmann ceb8e226ef [Qt] allow translation of client bitness 2014-02-16 03:01:34 +01:00
Gavin Andresen 085c62149a Merge pull request #3671 from gavinandresen/txn_conflicts
Report transaction conflicts, and tentative account balance fix
2014-02-15 08:56:55 -05:00
Gavin Andresen 731b89b8b5 Track and report wallet transaction clones
Adds a "walletconflicts" array to transaction info; if
a wallet transaction is mutated, the alternate transaction id
or ids are reported there (usually the array will be empty).

Metadata from the original transaction is copied to the mutant,
so the transaction time and "from" account of the mutant are
reported correctly.
2014-02-14 18:13:42 -05:00
Gavin Andresen 05d3ded072 Merge pull request #3669 from gavinandresen/dead_txns
Handle "conflicted" transactions properly
2014-02-14 14:40:32 -05:00
Wladimir J. van der Laan 9a3d936fc2 qt: GUI for conflicted transactions
- Exclamation mark icon for conflicted transactions
- Show mouseover status for conflicted transactions as "conflicted"
- Don't show inactive transactions on overview page overview
2014-02-14 13:25:24 -05:00
Jeff Garzik 518f3bdae3 Add -zapwallettxes cli/config option, used for wallet recovery
This diagnostic tool removes all "tx" records from the wallet db,
then forces a full rescan, to rebuild "tx" records accurately.
2014-02-14 11:33:07 -05:00
Gavin Andresen 2b72d46f42 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.
2014-02-14 11:08:40 -05:00
Wladimir J. van der Laan 6056c87d25
Merge pull request #3662
0542619 Rename IsConfirmed to IsTrusted to better match the intended behavior. (Gregory Maxwell)
2014-02-13 20:12:46 +01:00
Wladimir J. van der Laan 3a1c20b77a Add raw transaction hex to gettransaction wallet RPC
This allows getting raw transaction data from the wallet even if the
transaction is no longer in the blockchain / mempool (for example if it
got orphaned due to malleability abuse).
2014-02-13 17:30:00 +01:00
Philip Kaufmann bbfce8a4c9 fix non-standard reason string in main.cpp 2014-02-13 15:12:18 +01:00
Gregory Maxwell 0542619d93 Rename IsConfirmed to IsTrusted to better match the intended behavior.
This doesn't change the functionality at all.
2014-02-12 16:23:06 -08:00
b6393ce9-d324-4fe1-996b-acf82dbc3d53 fdbc2b142d If requested, actually treat uncomfirmed change as being uncomfirmed
This commit strengthens 1bbca249b2 by updating the CWalletTx::IsConfirmed() function.

If (bSpendZeroConfChange==false), then IsConfirmed() should actually treat unconfirmed change as being unconfirmed.
2014-02-12 05:41:32 +00:00
Wladimir J. van der Laan 19e5b9d2df
Merge pull request #3651
1bbca24 Add option to avoid spending unconfirmed change (Wladimir J. van der Laan)
2014-02-11 22:14:13 +01:00
Pieter Wuille 87fe71e1fc Add HasCanonicalPushes(), and use it in IsStandardTx 2014-02-11 21:11:59 +01:00
Pieter Wuille 9aea601b05 Move IsPushOnly() to script.cpp 2014-02-11 20:38:23 +01:00
Wladimir J. van der Laan 1bbca249b2 Add option to avoid spending unconfirmed change 2014-02-11 12:49:33 +01:00
gubatron 57702541a2 Copyright header updates s/2013/2014 on files whose last git commit was done in 2014.
contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
2014-02-09 21:06:06 -05:00
Wladimir J. van der Laan b19bcb752b
Merge pull request #3638
cdb6c16 remove setting methods in wallet/walletdb (Cozz Lovan)
44eb59e [Qt] remove broken OptionsModel::Upgrade() (Cozz Lovan)
2014-02-09 13:04:02 +01:00
Wladimir J. van der Laan 0514fb3b4c
Merge pull request #3606
6943cb9 small changes to rpc command help message strings (Philip Kaufmann)
2014-02-09 09:56:37 +01:00
Wladimir J. van der Laan d54e819f65 Log warnings when bootstrap files are specified but cannot be opened
- Log a warning when bootstrap files are specified using `-loadblock`
but cannot be opened.
- Log a warning when bootstrap.dat exists in the home directory
but cannot be opened.
2014-02-09 09:12:57 +01:00
Gavin Andresen 95e66247eb Merge pull request #3609 from sipa/limitorphanblocks
Limit the number of orphan blocks in memory
2014-02-08 10:49:49 -05:00
Cozz Lovan cdb6c16935 remove setting methods in wallet/walletdb 2014-02-07 12:59:46 +01:00
Cozz Lovan 44eb59e4a6 [Qt] remove broken OptionsModel::Upgrade() 2014-02-07 12:27:41 +01:00
Cozz Lovan b920148258 [Qt] Improve single step in bitcoinamountfield 2014-02-02 07:57:50 +01:00
Cozz Lovan eb0d9ecb6e [Qt] Fix nTransactionFee in qt-settings 2014-02-02 01:59:57 +01:00
Pieter Wuille bbde1e99c8 Limit the number of orphan blocks
In case the total number of orphan blocks in memory exceeds a limit
(currently set to 750), a random orphan block (which is not
depended on by another orphan block) is dropped. This means it will
need to be downloaded again, but it won't consume memory until then.
2014-01-31 14:16:06 +01:00
Wladimir J. van der Laan 19007cf552
Merge pull request #3592
c117d9e Support for error messages and a few more rejection reasons (Luke Dashjr)
14e7ffc Use standard BIP 22 rejection reasons where applicable (Luke Dashjr)
2014-01-30 16:45:26 +01:00
Philip Kaufmann 6943cb9b4f small changes to rpc command help message strings 2014-01-30 14:13:30 +01:00
Wladimir J. van der Laan 39d4eee96e
Merge pull request #3601
c32a486 Add more data-driven tests. (Matt Corallo)
2014-01-30 11:26:56 +01:00
Wladimir J. van der Laan f64b5de4e0 Final bitcoin_en update before 0.9.0rc1
Just for completeness. Only a few messages changed or moved since last time.

Don't change any translatable messages until 0.9 final unless really necessary.
2014-01-30 10:14:00 +01:00
Matt Corallo c32a486f4b Add more data-driven tests. 2014-01-30 03:53:52 -05:00
Wladimir J. van der Laan 9b818ed8bf
Merge pull request #3588
df966d1 log parameter interactions to debug.log (Philip Kaufmann)
2014-01-30 08:47:10 +01:00
Gavin Andresen 3581abdd46 Merge pull request #3370 from sipa/headersfirst3
Prepare block connection logic for headers-first
2014-01-29 13:49:15 -08:00
Luke Dashjr c117d9e93a Support for error messages and a few more rejection reasons 2014-01-29 17:39:24 +00:00
Luke Dashjr 14e7ffcc64 Use standard BIP 22 rejection reasons where applicable 2014-01-29 17:39:18 +00:00
Wladimir J. van der Laan a7f3aedec3 Re-add BTC/KB in help message for settxfee
Commit a22eed6a got reverted in a RPC documentation update, redo it.
2014-01-29 17:25:04 +01:00
Wladimir J. van der Laan de9b4c7abc qt: Add closing newline to help message
`bitcoin-qt --help` was missing a final newline.
2014-01-29 17:20:26 +01:00
Wladimir J. van der Laan f9a2f08882 Bump version numbers for 0.9.0rc1 release 2014-01-29 16:09:11 +01:00
Wladimir J. van der Laan 9bbbfe188c qt: Fix Windows/Darwin executable metadata
.rc's should be linked into the executable directly,
not through a helper library.
2014-01-29 15:05:42 +01:00
Wladimir J. van der Laan c3d966690c
qt: Transifex pull before 0.9.0rc1 2014-01-29 14:51:44 +01:00
Wladimir J. van der Laan 4412c5a759 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.
2014-01-29 14:46:06 +01:00
Wladimir J. van der Laan 69d03bc6e2 qt: Fix tab order in send and receive tab 2014-01-29 14:41:41 +01:00
Cozz Lovan 79fb0557cf [Qt] minor receive tab improvements 2014-01-29 14:20:15 +01:00
Wladimir J. van der Laan 624154114f
Merge pull request #3597
3cf1f43 Mention `*` value for account in documentation for `getbalance` RPC (Wladimir J. van der Laan)
2014-01-29 14:17:20 +01:00
Philip Kaufmann c78bd93701
[Qt] extend validate line edit and btc address validator
- remove btc address length from address validator
- add an optional btc address check in validated line edit that defaults
  to off and is used in GUIUtil::setupAddressWidget()
- an isAcceptable() check is added to validated line edit on focus out
  which only kicks in, when a validator is used with that widget
- remove an isAcceptable() check from sendcoinsentry.cpp
- remove obsolete attributes from ui files, which are set by calling
  GUIUtil::setupAddressWidget()
- move some more things to GUIUtil::setupAddressWidget() and remove them
  from normal code e.g. placeholder text
2014-01-29 14:15:55 +01:00
Wladimir J. van der Laan 3cf1f43694 Mention * value for account in documentation for getbalance RPC 2014-01-29 13:43:47 +01:00
Wladimir J. van der Laan aab8fc58c6
Merge pull request #3450
4c0b2cd Win32: use a more modern API call in FileCommit() (Philip Kaufmann)
2014-01-29 09:09:50 +01:00
Wladimir J. van der Laan 2383e4883d
Re-add newline to error() messages
As reported by @Subo1978, error messages don't have a trailing newline
anymore after commit b77dfdc9. Add back this newline.
2014-01-29 08:46:15 +01:00
Wladimir J. van der Laan 0524bdd636
Merge pull request #3582
e5aadb2 Updated fallback seed nodes from sipa's DNS seeds (Gavin Andresen)
2014-01-29 07:50:45 +01:00
Wladimir J. van der Laan 6ebcec7d3c
Merge pull request #3593
c7f9332 Add check for valid keys in `importprivkey` (Wladimir J. van der Laan)
2014-01-28 18:38:31 +01:00
Wladimir J. van der Laan 7ff13ef2d2
Merge pull request #3590
edd735d [Qt] Fix coin control labels update (Cozz Lovan)
2014-01-28 11:00:40 +01:00
Wladimir J. van der Laan f9355f1f2b
Merge pull request #3594
d7aa1ec [Qt] fix bitcoin: URI strings (spelling fixes) (Philip Kaufmann)
2014-01-28 10:54:17 +01:00
Philip Kaufmann d7aa1ec8dd [Qt] fix bitcoin: URI strings (spelling fixes) 2014-01-28 10:48:41 +01:00
Wladimir J. van der Laan c7f9332596 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.
2014-01-28 09:57:57 +01:00
Wladimir J. van der Laan dfd0d38fae
Merge pull request #3591
6986861 build: use -mwindows for gui targets when linking with mingw (Cory Fields)
2014-01-28 09:40:12 +01:00
Philip Kaufmann b34e88a88f use english for all reason strings in IsStandardTx() 2014-01-28 07:45:42 +01:00
Cory Fields 6986861fda build: use -mwindows for gui targets when linking with mingw 2014-01-27 15:30:51 -05:00
Pieter Wuille 75f51f2a63 Prepare block connection logic for headers-first.
This changes the block processing logic from "try to atomically switch
to a new block" to a continuous "(dis)connect a block, aiming for the
assumed best chain".

This means the smallest atomic operations on the chainstate become
individual block connections or disconnections, instead of entire
reorganizations. It may mean that we try to reorganize to one block,
fail, and rereorganize again to the old block. This is slower, but
doesn't require unbounded RAM.

It also means that a ConnectBlock which fails may be no longer called
from the ProcessBlock which knows which node sent it. To deal with that,
a mapBlockSource is kept, and invalid blocks cause asynchronous "reject"
messages and banning (if necessary).
2014-01-27 21:20:41 +01:00
Pieter Wuille 0ec16f35d6 Move only: extract WriteChainState and UpdatedTip from SetBestChain. 2014-01-27 21:13:48 +01:00
Cozz Lovan edd735da4e [Qt] Fix coin control labels update 2014-01-27 19:16:31 +01:00
Philip Kaufmann df966d1b24 log parameter interactions to debug.log 2014-01-27 12:08:48 +01:00
Wladimir J. van der Laan ca1913e8f6
Merge pull request #2342
665bdd3 Fix off-by-one errors in use of IsFinalTx() (Peter Todd)
2014-01-27 10:16:54 +01:00
Wladimir J. van der Laan b571a8c708 qt: Translation update
Update English .ts file from source as well as pull changes from transifex
to current translation.
2014-01-27 09:56:35 +01:00
Wladimir J. van der Laan 86fa1c9cf2
Merge pull request #3579
f3005c8 [Qt] harmonize strings used when exporting in addressbookpage (Philip Kaufmann)
2014-01-27 09:53:51 +01:00
Philip Kaufmann f3005c82b1 [Qt] harmonize strings used when exporting in addressbookpage 2014-01-27 08:36:14 +01:00
Peter Todd 665bdd3bc9
Fix off-by-one errors in use of IsFinalTx()
Previously CreateNewBlock() didn't take into account the fact that
IsFinalTx() without any arguments tests if the transaction is considered
final in the *current* block, when both those functions really needed to
know if the transaction would be final in the *next* block.

Additionally the UI had a similar misunderstanding.

Also adds some basic tests to check that CreateNewBlock() is in fact
mining nLockTime-using transactions correctly.

Thanks to Wladimir J. van der Laan for rebase.
2014-01-26 21:50:15 -05:00
Gavin Andresen e5aadb25c5 Updated fallback seed nodes from sipa's DNS seeds 2014-01-24 17:09:20 -05:00
Gavin Andresen fd67424c82 Unit test fixes for AssertLockHeld / -DDEBUG_LOCKORDER
Unit tests would fail if compiled with -DDEBUG_LOCKORDER (AssertLockHeld()
would fail; AssertLockHeld() relies on the DEBUG_LOCKORDER code to keep
track of locks held).

Fixed by LOCK'ing the wallet mutex in the unit tests that manipulate the
wallet.
2014-01-24 10:47:29 -05:00
Wladimir J. van der Laan d0a94f2c2f
Merge pull request #3571
57feb1b ui: Clarify help messages for 'message' fields (Wladimir J. van der Laan)
2014-01-24 11:38:13 +01:00
Wladimir J. van der Laan 57feb1ba5a ui: Clarify help messages for 'message' fields
Add or amend tooltips to clarify what the message is for and that it
doesn't go over the network.
2014-01-24 11:37:20 +01:00
Wladimir J. van der Laan 7d9d134bf9 Remove redundant .c_str()s
After the tinyformat switch sprintf() family functions support passing
actual std::string objects.

Remove unnecessary c_str calls (236 of them) in logging and formatting.
2014-01-23 16:05:01 +01:00
Wladimir J. van der Laan b77dfdc9e3 Typesafe strprintf/error/LogPrint functions
Switch to tinyformat-based formatting.

Tinyformat is a typesafe drop-in replacement for C99 printf functions:
https://github.com/c42f/tinyformat
2014-01-23 16:05:00 +01:00
Wladimir J. van der Laan 53e9d3aa44
build: fix typo in configure help message
--with-qt-libdir etc, not --with-gui-libdir.
The typo was introduced in a9dbcf036b.
2014-01-23 14:05:43 +01:00
Wladimir J. van der Laan 17b409b2e6 qt: Fix richtext detection hang issue on very old Qt versions
Alternative implementation. Thanks to @awoland for the original.
Fixes #3486.
2014-01-23 12:44:28 +01:00
Wladimir J. van der Laan 8b2cf12b53
Merge pull request #3553
a8db31c qt: allow `walletpassphrase` in debug console without -server (Wladimir J. van der Laan)
2014-01-23 08:44:31 +01:00
Wladimir J. van der Laan 6746787a0c
Merge pull request #3560
fe14e8d build: Change package name to Bitcoin Core (Wladimir J. van der Laan)
6c980c7 build: Package docs/ and don't package source. (Wladimir J. van der Laan)
39db27c build: Add bitcoin-cli.exe to installer (Wladimir J. van der Laan)
2f87b38 Adapt Windows installer for 64 bit (Wladimir J. van der Laan)
f622232 gitian: Windows 64 bit support (Wladimir J. van der Laan)
2014-01-23 08:26:11 +01:00
Philip Kaufmann f0219813d5 [Qt] move helpmessage from debug window to main menu
- the option to show our help message dialog resides now in main menu
  under help
2014-01-22 15:28:50 +01:00
Wladimir J. van der Laan fe87b20717
Merge pull request #3568
4bee715 [Qt] very minor style cleanups (Philip Kaufmann)
2014-01-22 13:36:31 +01:00
Wladimir J. van der Laan 7dbe9ac1f3
Merge pull request #3567
22a5120 [Qt] Show and store message of normal bitcoin:URI (Cozz Lovan)
2014-01-22 13:33:15 +01:00
Philip Kaufmann 4bee715bfd [Qt] very minor style cleanups
- rebuilt some ui file layout to remove unreal values from the files
- remove an unneeded attribute from an ui file
- add / remove some spaces in files
2014-01-22 09:46:15 +01:00
Wladimir J. van der Laan 2f06b5965a
Merge pull request #3452
1ba3560 [Qt] let OptionsModel::getProxySettings() directly query proxy (Philip Kaufmann)
2014-01-22 08:55:57 +01:00