Commit Graph

3799 Commits

Author SHA1 Message Date
Wladimir J. van der Laan 098316c70f English translation update
A few new messages have been added since last update.
2014-03-01 09:06:10 +01:00
Gavin Andresen 7be6ebcf08 Merge pull request #3744 from petertodd/document-isvalid-is-consensus-critical
Document that CPubKey.IsValid() is consensus critical
2014-02-28 15:27:58 -05:00
Gavin Andresen 829f822267 Merge pull request #3767 from laanwj/2014_02_tinyformat_errors_non_fatal
Make tinyformat errors raise an exception instead of assert()ing
2014-02-28 15:17:28 -05:00
Gavin Andresen f60e49d49c Merge pull request #3694 from gavinandresen/vfspent
Remove CWalletTx::vfSpent
2014-02-28 15:16:25 -05:00
Wladimir J. van der Laan f642fd9dd6 qt: Modernize 'confirmed' terminology in shown tx status
These days we regard transactions with one confirmation to be
'Confirmed'.
Waiting for 6 confirmations is a recommendation but should not
keep the transaction shown as unconfirmed.

Misc code sanity:

- Merge maturity/status enums, they had become completely disjunct
- 'confirmed' flag is now called 'countsForBalance' for clarity
2014-02-28 13:04:50 +01:00
Wladimir J. van der Laan 1b8fd35aad Make tinyformat errors raise an exception instead of assert()ing
By default tinyformat errors such as 'wrong number of conversion
specifiers in format string' cause an assertion failure.

Raise an exception instead so that error handling can recover or can
show an appropriate error.
2014-02-28 09:25:00 +01:00
Wladimir J. van der Laan a270ca2b42 Transifex pull pre-0.9.0rc2 2014-02-27 14:18:53 +01:00
Wladimir J. van der Laan dcb1280d8e
Merge pull request #3752
5d5b0d2 Add shell null to else block (Wil Bown)
2014-02-27 12:35:11 +01:00
Daniel Newton a00ebb5117 move wallet info stuff to "getwalletinfo" rpc (left original wallet
stuff in getinfo call for backwards compatibility)

add wallet transaction count to getwalletinfo rpc call
2014-02-27 14:46:58 +13:00
Wladimir J. van der Laan b81f9718df
Merge pull request #3749
4423571 Replace PrintException with PrintExceptionContinue + throw (Wladimir J. van der Laan)
2014-02-26 20:52:39 +01:00
Wil Bown 5d5b0d284a Add shell null to else block
MinGW-W64-builds-4.2.0 shell doesn't like the empty else blocks.
2014-02-26 12:39:57 -07:00
Gavin Andresen ae7e5d7ceb Merge pull request #3737 from jgarzik/op-return-size
script: reduce OP_RETURN standard relay bytes to 40
2014-02-26 13:52:56 -05:00
Jeff Garzik 8175c790eb script: reduce OP_RETURN standard relay bytes to 40
Per mailing list discussion.
2014-02-26 12:58:08 -05:00
Gavin Andresen e3e65d29b7 Merge pull request #3735 from laanwj/2014_02_remove_PRIx64_completely
Remove PRIx64 usage completely
2014-02-26 12:16:03 -05:00
Gavin Andresen 93a18a3650 Remove CWalletTx::vfSpent
Use the spent outpoint multimap to figure out which wallet transaction
outputs are unspent, instead of a vfSpent array that is saved
to disk.
2014-02-26 11:53:51 -05:00
Wladimir J. van der Laan 44235713ed Replace PrintException with PrintExceptionContinue + throw
Just a pet peeve.

(PrintException has exactly the same body as PrintExceptionContinue but
does a re-throw at the end. Move these re-throws to the call
site, this aids understanding what is going on as well as eliminates a
bit of code duplication in util.cpp)
2014-02-26 13:23:52 +01:00
Cozz Lovan a719903804 Fix bitcoin-cli exit status code 2014-02-26 13:12:47 +01:00
Wladimir J. van der Laan 12f5787d45
Merge pull request #3559
e6c6bc9 Adds additional zero checks for setCompact  These encoded values should all decode to zero (Noel Tiernan)
2014-02-25 16:25:52 +01:00
Wladimir J. van der Laan 3198604293
Merge pull request #3712
a3138ed add test of DecodeBase58 skipping whitespace (Christian von Roques)
2014-02-25 16:24:03 +01:00
Peter Todd 5a986edac8
Document that CPubKey.IsValid() is consensus critical 2014-02-25 09:31:43 -05:00
Gavin Andresen a16ad1c0f4 Merge pull request #3704 from gavinandresen/wallet_lock_fixes
Wallet locking fixes for -DDEBUG_LOCKORDER
2014-02-24 14:39:23 -05:00
Jeff Garzik beabca2be0 Merge pull request #3305 from mikehearn/fee_drop
Drop fees by 10x due to the persistently higher exchange rate.
2014-02-24 14:05:54 -05:00
Jeff Garzik c72204e568 Merge pull request #3718 from jgarzik/pubkey-size
script: tighten multisig non-standard rules: do not relay pubkeys above 65 bytes
2014-02-24 11:59:27 -05:00
Wladimir J. van der Laan 2f5da74362 Remove definition of PRI?64 in util.h
This was a bad idea. This can't be solved with macros as any
other library that includes inttypes.h will get in the way.

The parent commit has removed all usages from the source, this commit
removes the definition.
2014-02-24 09:11:33 +01:00
Wladimir J. van der Laan f48742c2bf Get rid of C99 PRI?64 usage in source files
Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h
indirectly, so we cannot fix this with just macros.

Trivial commit: apply the following script to all .cpp and .h files:

    # Middle
    sed -i 's/"PRIx64"/x/g' "$1"
    sed -i 's/"PRIu64"/u/g' "$1"
    sed -i 's/"PRId64"/d/g' "$1"
    # Initial
    sed -i 's/PRIx64"/"x/g' "$1"
    sed -i 's/PRIu64"/"u/g' "$1"
    sed -i 's/PRId64"/"d/g' "$1"
    # Trailing
    sed -i 's/"PRIx64/x"/g' "$1"
    sed -i 's/"PRIu64/u"/g' "$1"
    sed -i 's/"PRId64/d"/g' "$1"

After this commit, `git grep` for PRI.64 should turn up nothing except
the defines in util.h.
2014-02-24 09:08:56 +01:00
Wladimir J. van der Laan 4fd082ded7
Merge pull request #3729
d5f1e72 Don't use PRIx64 formatting derives from inttypes.h (Wladimir J. van der Laan)
2014-02-23 09:04:07 +01:00
Gregory Maxwell 041f71bb38 Make the signrawtransaction docs explicit that the arguments can be 'null'. 2014-02-22 12:52:09 -08:00
Wladimir J. van der Laan d5f1e727a8 Don't use PRIx64 formatting derives from inttypes.h
As the tinyformat-based formatting system (introduced in b77dfdc) is
type-safe, no special format characters are needed to specify sizes.

Tinyformat can support (ignore) the C99 prefixes such as "ll" but
chokes on MSVC's inttypes.h defines prefixes such as "I64X". So don't
include inttypes.h and define our own for compatibility.

(an alternative would be to sweep the entire codebase using sed -i to
get rid of the size specifiers but this has less diff impact)
2014-02-22 11:36:37 +01:00
Wladimir J. van der Laan b96f6a77f8 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.
2014-02-21 16:34:06 +01:00
Jeff Garzik 595b6d88d4 script: tighten multisig non-standard rules: do not relay pubkeys above 65 bytes 2014-02-21 02:26:51 -05:00
Christian von Roques a3138ed42b add test of DecodeBase58 skipping whitespace 2014-02-21 01:01:48 +00:00
Wladimir J. van der Laan 76a77059f3
Merge pull request #2910
d8b4b49 Don't store or send side-chain blocks lower than last checkpoint. (Ashley Holman)
2014-02-20 12:32:32 +01:00
R E Broadley c4656e0d88 Add progress to initial display of latest block downloaded. 2014-02-19 18:23:13 -08:00
R E Broadley 75b8953a2c Display progress of rescan. 2014-02-19 18:23:12 -08:00
Wladimir J. van der Laan 7f080fbef7
Merge pull request #3703
ad54a9b Change new constants in txdb.h to int64_t (Wladimir J. van der Laan)
2014-02-19 09:04:09 +01:00
Wladimir J. van der Laan 38ebd0fee8
Merge pull request #3699
ddcabae qt: Rename 'Confirmed' balance to 'Spendable' on overview page (Wladimir J. van der Laan)
2014-02-19 08:50:22 +01:00
Wladimir J. van der Laan ddcabae0de qt: Rename 'Confirmed' balance to 'Spendable' on overview page
The word 'Spendable' more precisely says what the balance actually means.

Avoids the confirmed/unconfirmed confusion that can be caused by #3676.
2014-02-19 08:46:46 +01:00
Gavin Andresen ca4cf5cff6 Wallet locking fixes for -DDEBUG_LOCKORDER
Compiling with -DDEBUG_LOCKORDER and running the qa/rpc-test/ regression
tests uncovered a couple of wallet methods that should (but didn't)
acquire the cs_wallet mutext.

I also changed the AssertLockHeld() routine print to stderr and
abort, instead of printing to debug.log and then assert()'ing.
It is annoying to look in debug.log to find out which
AssertLockHeld is failing.
2014-02-18 12:11:46 -05:00
Wladimir J. van der Laan ad54a9b83f Change new constants in txdb.h to int64_t
A shift overflow was happening when using these to check against in init.cpp.
Fixes #3702.
2014-02-18 17:13:32 +01:00
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
Philip Kaufmann 3e0753b0f5 always show syncnode in getpeerinfo (fixes #2717) 2014-02-16 18:44:49 +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
Pieter Wuille f59d8f0b64 Per-peer block download tracking and stalled download detection.
Keep track of which block is being requested (and to be requested) from
each peer, and limit the number of blocks in-flight per peer. In addition,
detect stalled downloads, and disconnect if they persist for too long.

This means blocks are never requested twice, and should eliminate duplicate
downloads during synchronization.
2014-02-08 16:52:19 +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
Wladimir J. van der Laan ceab53b41d
Merge pull request #3521
4d90102 [Qt] Add sorting feature to the requested payments table (Cozz Lovan)
8476d5d [Qt] Permanently store requested payments in wallet (Cozz Lovan)
b10e147 wallet: add interface for storing generic data on destinations (Wladimir J. van der Laan)
2014-01-22 08:07:56 +01:00
Wladimir J. van der Laan 6586bc3b51
Merge pull request #3502
1f12844 Fix importprivkey / rescan (Cozz Lovan)
2014-01-22 08:06:11 +01:00
Cozz Lovan 22a51207ae [Qt] Show and store message of normal bitcoin:URI 2014-01-21 23:54:49 +01:00
Wladimir J. van der Laan d0a7c682c6
build: Fix warning about space after trailing backslash 2014-01-21 14:32:05 +01:00
Wladimir J. van der Laan f622232bcf gitian: Windows 64 bit support
- Build a 64 bit version of all dependencies
- Show 32/64 bit version in "About..." for x86
- Export 64-bit .exes and installer from gitian build
2014-01-21 14:02:13 +01:00
Wladimir J. van der Laan 77a1607ce8
Merge pull request #3548
7b50bb2 [Qt] add utilitydialog.cpp/h and helpmessage class (Philip Kaufmann)
2014-01-21 09:01:38 +01:00
Wladimir J. van der Laan a682bc7e46
Merge pull request #3242
2041365 Bugfix: Use BOOST_CPPFLAGS when testing for boost sleep vs sleep_for (Luke Dashjr)
e18e100 configure: Minor grammatical changes to be more clear (Luke Dashjr)
a9dbcf0 configure: Change --with[out]-qt to --with[out]-gui and add --with[out]-cli and --with[out]-daemon to support more build configurations (Luke Dashjr)
f472990 Bugfix: Correct captitalisation of Qt (Luke Dashjr)
f930341 configure: Internal changes to make building bitcoind and bitcoin-cli optional (Luke Dashjr)
4a290b5 Cleanup LevelDB library dependencies (Luke Dashjr)
9b4e03b Bugfix: Undefine _FORTIFY_SOURCE before redefining it, to avoid warnings on compilers that define it by default (Luke Dashjr)
123e4f8 Bugfix: configure: Allow user-provided CXXFLAGS to override default optimisation, debug, and warning flags (Luke Dashjr)
2014-01-21 08:55:07 +01:00
Ashley Holman d8b4b49667 Don't store or send side-chain blocks lower than last checkpoint. 2014-01-19 18:15:38 -06:00
Cozz Lovan 4d901023b7 [Qt] Add sorting feature to the requested payments table 2014-01-19 18:21:54 +01:00
Cozz Lovan 8476d5d407 [Qt] Permanently store requested payments in wallet 2014-01-19 18:21:54 +01:00
Wladimir J. van der Laan b10e147096 wallet: add interface for storing generic data on destinations 2014-01-19 18:21:54 +01:00
Noel Tiernan e6c6bc92f4 Adds additional zero checks for setCompact
These encoded values should all decode to zero

   Positive Numbers
    0x01003456 (1 byte  0x00)
    0x02000056 (2 bytes 0x0000)
    0x03000000 (3 bytes 0x000000)
    0x04000000 (4 bytes 0x000000_00)

   Negative Numbers
    0x00923456 -(0 bytes, so zero)
    0x01803456 -(1 byte  0x00)
    0x02800056 -(2 bytes 0x0000)
    0x03800000 -(3 bytes 0x000000)
    0x04800000 -(4 bytes 0x000000_00)
2014-01-19 13:55:08 +00:00
Luke Dashjr 2041365c8c Bugfix: Use BOOST_CPPFLAGS when testing for boost sleep vs sleep_for 2014-01-18 21:10:56 +00:00
Luke Dashjr e18e1001eb configure: Minor grammatical changes to be more clear 2014-01-18 21:10:52 +00:00
Luke Dashjr a9dbcf036b configure: Change --with[out]-qt to --with[out]-gui and add --with[out]-cli and --with[out]-daemon to support more build configurations 2014-01-18 20:11:05 +00:00
Luke Dashjr f47299038d Bugfix: Correct captitalisation of Qt 2014-01-18 20:10:07 +00:00
Luke Dashjr f930341d81 configure: Internal changes to make building bitcoind and bitcoin-cli optional 2014-01-18 19:54:50 +00:00
Micha e7906d18cf
Add a new checkpoint at block 279,000
From a cursory glance, it looks like block 279,000 meets the criteria for
a checkpoint block, and it's also what the bootstrap.dat torrent is at. This closes #3530.
2014-01-18 21:52:46 +02:00
Luke Dashjr 4a290b526c Cleanup LevelDB library dependencies 2014-01-18 19:47:21 +00:00
Cozz Lovan 1f12844fc0 Fix importprivkey / rescan 2014-01-18 18:47:32 +01:00
Philip Kaufmann 7b50bb2f1b [Qt] add utilitydialog.cpp/h and helpmessage class
- adds a nice and well formated dialog, which displays our -? help message
  (all options/paramaters)
- moves aboutdialog.cpp/h to the new utilitydialog
- move GUI shutdown window to utilitydialog
2014-01-18 16:57:02 +01:00
Pieter Wuille b9d384a45d Merge src/leveldb changes: temporarily revert to writing .sst files. 2014-01-18 14:32:29 +01:00
Wladimir J. van der Laan 6c19ca1f92
Merge pull request #3490
7e08e29 better std::exception logging for block/undo files (Philip Kaufmann)
2014-01-18 12:25:05 +01:00
Wladimir J. van der Laan a8db31c83d qt: allow `walletpassphrase` in debug console without -server
Currently it is only possible to use `walletpassphrase` to unlock the
wallet when bitcoin is started in server mode.

Almost everything that manipulates the wallet in the RPC console
needs the wallet to be unlocked and is thus unusable without -server.

This is pretty unintuitive to me, and I'm sure it's even more confusing
to users.

Solve this with a very minimal change: by making the GUI start a
dummy RPC thread just to handle timeouts.
2014-01-17 16:55:20 +01:00
Philip Kaufmann 1ba3560fe8 [Qt] let OptionsModel::getProxySettings() directly query proxy
- as a proxy set via GUI can be overridden via -proxy, directly query the
  core to get active proxy
- give a warning, if active proxy is not SOCKS5 (needs to be SOCKS5 for
  the Qt networking code to work)
- also remove an obsolete connect() call from optionsdialog.cpp and a
  reference to Bitcoin-Qt (now just GUI)
2014-01-17 15:43:44 +01:00
Wladimir J. van der Laan 08ede8ef5e
Merge pull request #3512
04aa828 [Qt] don't regenerate autostart link on every client startup (Philip Kaufmann)
2014-01-17 10:11:46 +01:00
Gavin Andresen 8c31f037b1 Merge pull request #3527 from laanwj/2014_01_gitian_win32_qt5
build: update win32 deps
2014-01-15 04:20:58 -08:00
Wladimir J. van der Laan f8b48ed297
Merge pull request #3426
16ec904 Don't create empty transactions when reading corrupted wallet (Wladimir J. van der Laan)
2014-01-14 18:59:07 +01:00
Wladimir J. van der Laan 1aac1448de
Merge pull request #3538
81bad8b [Qt] 2 minor translation changes (Philip Kaufmann)
2014-01-14 18:55:39 +01:00
Wladimir J. van der Laan 6b5fbc9073
Merge pull request #3541
c704532 [Qt] small paymentserver header cleanup (Philip Kaufmann)
2014-01-14 18:48:02 +01:00
Wladimir J. van der Laan b0e8c4b0b9
Merge pull request #3540
57d8e3f [Qt] add missing lock in walletmodel (Cozz Lovan)
2014-01-14 18:33:27 +01:00
Philip Kaufmann c704532294 [Qt] small paymentserver header cleanup 2014-01-14 17:57:32 +01:00
Philip Kaufmann 81bad8b386 [Qt] 2 minor translation changes 2014-01-14 17:43:38 +01:00
Cozz Lovan 57d8e3f88f [Qt] add missing lock in walletmodel 2014-01-14 17:41:57 +01:00
Philip Kaufmann 8c20bbbed9 update copyright year to 2014 2014-01-14 17:11:38 +01:00
Wladimir J. van der Laan b26de9d951
qt: Update remaining "The Bitcoin Core Developers" 2014-01-14 11:19:52 +01:00
Wladimir J. van der Laan 1e3abb4e3d build: upgrade Qt used by windows build to 5.2.0 2014-01-14 11:03:21 +01:00
Wladimir J. van der Laan dbafb99472
Merge pull request #3526
f10b2d7 qt: use series of pngs for spinner (Wladimir J. van der Laan)
2014-01-14 07:55:47 +01:00
Gavin Andresen 266921e70f Merge pull request #3516 from sipa/serorphans-head
Store orphan blocks in serialized form
2014-01-13 08:54:33 -08:00
Wladimir J. van der Laan f087ce8891 qt: English translation update 2014-01-13 17:36:24 +01:00
Wladimir J. van der Laan c7930c859e
Merge pull request #3528
66a8829 qt: Minor message updates (Wladimir J. van der Laan)
2014-01-13 17:35:17 +01:00
Wladimir J. van der Laan f126973fd0
Merge pull request #3374
bd70562 [Qt] add messages when handling local payment request files (Philip Kaufmann)
2014-01-13 17:11:05 +01:00
Wladimir J. van der Laan 66a8829a33 qt: Minor message updates
Used sending/receiving addresses -> Sending/receiving addresses
Previously requested payments -> Requested payments (idea from @cozz in #3521)
2014-01-13 17:05:55 +01:00
Wladimir J. van der Laan f10b2d70d0 qt: use series of pngs for spinner
Use a series of .png frames for the spinner instead of a .mng.
`mng` is an obscure image format and is not built by default into Qt5.

This appears to improve the crispness of the spinner as well.

Does not noticably increase the size (still ~27k) and the code
is not more complicated either.
2014-01-13 14:45:23 +01:00
Wladimir J. van der Laan 67d60f7031 build: fix MacOSX build after ec41342
Fix regression introduced in ec41342.

Also use a less ugly solution, by defining the value of
`MOC_DEFS` in the configure script instead of `Makefile.include`.
2014-01-13 10:33:12 +01:00
Wladimir J. van der Laan 0e469b5167
Merge pull request #3513
d464edf [Qt] fix alphabetical ordering in Makefile.am (Philip Kaufmann)
2014-01-12 10:03:02 +01:00
Wladimir J. van der Laan 0a4fefe18f
Merge pull request #3511
245a6ab [Qt] guard bitcoin-config.h and remove dublicated help message code (Philip Kaufmann)
2014-01-12 10:01:31 +01:00
Wladimir J. van der Laan b68c618c6d
Merge pull request #3507
9b146cd GUI: Fix design in overview page (Cozz Lovan)
2014-01-12 10:00:39 +01:00
Philip Kaufmann d464edfb8c [Qt] fix alphabetical ordering in Makefile.am
- also change to 1 file per line for more stuff in Makefile.am
2014-01-12 03:00:53 +01:00
Pieter Wuille da0fecffa7 Store orphan blocks in serialized form 2014-01-11 23:39:29 +01:00
Philip Kaufmann 04aa828728 [Qt] don't regenerate autostart link on every client startup
- allows users to add additional paramaters via the autostart link
- related to #2197
2014-01-11 18:58:26 +01:00
Philip Kaufmann 245a6ab1ae [Qt] guard bitcoin-config.h and remove dublicated help message code 2014-01-11 18:56:24 +01:00
Philip Kaufmann c037531d69 small headers ordering cleanup
- keep headers in alphabetical order
- fix Makefile.am (2 files in 1 line - leftover)
- remove some spaces etc.
2014-01-11 18:17:09 +01:00
Cozz Lovan 9b146cd3ca GUI: Fix design in overview page 2014-01-11 16:30:14 +01:00
Wladimir J. van der Laan 5a407bd095
makefile.am: split long lines into one file per line
This makes it easier to read diffs.
Cosmetic change to build system only.
2014-01-11 15:23:15 +01:00
Wladimir J. van der Laan b7f4b6d35d GUI for --disable-wallet compiles and -disablewallet mode
There is not much in the GUI to be done without wallet,
though it's possible to change options, watch the sync process,
and use the debug console.

So embed the debug console in the main window.
2014-01-11 12:36:20 +01:00
Wladimir J. van der Laan ec41342e3d build: pass correct defs and include path to moc
To make sure the right slots are generated, MOC needs -DHAVE_CONFIG_H
and correct include path to include bitcoin-config.h.
2014-01-11 12:23:00 +01:00
Wladimir J. van der Laan 9a2305a1b3 qt: Stop shutdown detection timer during shutdown
Stop the shutdown timer from exiting the main loop
when shutdown is already in progress.

Fixes seeming hanging window after typing 'stop' in debug console.

Also hide the debug console during shutdown as it is useless without
a core to connect to.
2014-01-11 10:20:28 +01:00
Wladimir J. van der Laan 35ecf854c0 qt: Remove global references in bitcoin.cpp
Remove the need for global references `guiref` and
`splashref` by making the BitcoinGUI and SplashScreen
classes register for the UI interface signals themselves.
2014-01-11 10:20:28 +01:00
Wladimir J. van der Laan 55fe4de960 qt: Show window while shutting down
Makes it clear to the user that the application is still wrapping up
and the computer should not be turned off until it is finished.
2014-01-11 10:20:28 +01:00
Wladimir J. van der Laan 202d853bbe qt: Move initialization/shutdown to a thread
Move AppInit2 and Shutdown to a thread.

This allows a more responsive splash screen, prevents 'process does not respond'
messages from the window system and will allow for showing a user friendly
window while shutting down.
2014-01-11 10:20:28 +01:00
Cory Fields 42cc96737c qt5: fix typo causing broken selection logic 2014-01-10 16:30:34 -05:00
Cory Fields 371f3f6ba5 qt5: fix --with-qt with no arguments 2014-01-10 16:30:33 -05:00
Cory Fields 8b0f608815 qt5: tests: Make sure static plugin symbols are pulled in
Since we're now properly linking against static plugins for qt binaries,
we need to ensure that they're Imported properly.

Without these Imports, the linker drops some of the unused linked libs, causing
undefined symbols in QtCore.
2014-01-10 16:30:33 -05:00
Cory Fields 47ffb50533 qt5: Use QT_SELECT for debian-based distros.
At least Debian/Ubuntu use 'qtchooser' for switching between qt4/qt5 binaries.
It is a wrapper for all qt tools, and calls the named tool of the default
version unless overridden by the -qt= option or QT_SELECT environment variable.
QT_SELECT is set by configure once the qt version has been chosen.

Take for example, moc.

$ which moc
    /usr/bin/moc

$ ls -go /usr/bin/moc
    lrwxrwxrwx 1 9 Jul  3 21:33 /usr/bin/moc -> qtchooser

$ qtchooser -print-env
    QT_SELECT="default"
    QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt4/bin"
    QTLIBDIR="/usr/lib/x86_64-linux-gnu"

$ QT_SELECT=qt5 qtchooser -print-env
    QT_SELECT="qt5"
    QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt5/bin"
    QTLIBDIR="/usr/lib/x86_64-linux-gnu"

$ moc -v
    Qt Meta Object Compiler version 63 (Qt 4.8.4)

$ QT_SELECT=qt5 moc -v
    Qt Meta Object Compiler version 67 (Qt 5.0.1)

This should be harmless elsewhere.
2014-01-10 16:30:33 -05:00
Cory Fields 60dc589477 qt5: Use the info gleaned from configure for plugin importing 2014-01-10 16:30:33 -05:00
Cory Fields c8ba8ef654 qt5: split out qt config and add qt5 support
Qt5 detection is a big ugly mess, but at least we can fence it off.
2014-01-10 16:30:33 -05:00
Cory Fields c614bd718b qt5: fix a build issue with osx and qtdbus
See comment in notificator.cpp for details.
2014-01-10 16:30:33 -05:00
Cory Fields 328bdb1cd6 qt5: Ensure correct link order
If optional libs don't appear in QT_LIBS, they need to be listed first for
proper static linking.
2014-01-10 16:30:33 -05:00
Wladimir J. van der Laan a036b796d1
Merge pull request #3347
7e195e8 [Qt] massive options/settings rework (no core changes) (Philip Kaufmann)
2014-01-10 12:55:12 +01:00
Philip Kaufmann 6a1bf00425 [Qt] display native dir separators in select dadatir dialog
- fixes display on Windows now \ instead of / before
2014-01-10 11:43:29 +01:00
Wladimir J. van der Laan 5b45bf400e
Merge pull request #3488
2102ab9 ui: Fix GUI initialization order (Wladimir J. van der Laan)
2014-01-10 11:39:42 +01:00
Wladimir J. van der Laan c07dd453e4
Merge pull request #3432
b960fcb [Qt] update bitcoin-qt.pro and assets-attribution.md (Philip Kaufmann)
2014-01-10 08:56:33 +01:00
Wladimir J. van der Laan eaafa23cbd Add test for GetTime()
Test for mingw/wine issue #3494, where the upper word of time(NULL)
return value gets clobbered.
2014-01-09 11:35:38 +01:00
Wladimir J. van der Laan 13e99e463d
Merge pull request #3491
04f58ff qt: Better status text for mined transactions (Wladimir J. van der Laan)
2014-01-09 10:08:41 +01:00
Philip Kaufmann b960fcb86a [Qt] update bitcoin-qt.pro and assets-attribution.md
- remove unused and unmentioned file notsynced.png (we use an animation
  for this)
- add missing coincontroldialog.ui to bitcoin-qt.pro
- also unify formating in assets-attribution.md
2014-01-09 07:38:08 +01:00
Wladimir J. van der Laan 6d697e9fa4
qt: Update translations
Update current translations, and add new languages:

- es_MX: Spanish (Mexico)
- pam: Kapampangan

Also update translation process for autoconf-based build system.
2014-01-08 18:48:39 +01:00
Wladimir J. van der Laan 549e69a558
Merge pull request #3449
8b9adca Allow `-noserver` with bitcoind (Wladimir J. van der Laan)
2014-01-08 14:42:07 +01:00
Wladimir J. van der Laan d696820b45
build: Correctly put boost at end of LDADD
This fixes linking issues when statically linking
(thanks @imwuzhh).
2014-01-07 09:12:56 +01:00
Wladimir J. van der Laan 04f58ffd9d qt: Better status text for mined transactions
Fixes ancient issue #614.
2014-01-06 16:30:19 +01:00
Philip Kaufmann 7e195e8459 [Qt] massive options/settings rework (no core changes)
- add new options for database cache and script verification threads
- add label which displays options that are overridden by command-line
  parameters
- proxy settings are not applied on-the-fly anymore and require a client
  restart (ApplyProxySettings() was removed and was not working very well
  anyway)
- re-work options reset and require a client shutdown (as it is much
  easier to do it this way without having to mess with what can be changed
  on-the-fly and what needs a restart anyway)
- options reset now writes default values for every single option
- when changing an option which requires a client restart display a 10
  second warning message in statusLabel (via a QTimer)
- when applying the changes via ok change that to a persistent message,
  which is displayed even after closing optionsdialog and re-open it, when
  no client restart was made
- remove dialog boxes used when changing language or proxy settings
- add setRestartRequired() and isRestartRequired() to OptionsModel and
  use the set function when updating options to signal OptionsDialog
  when a restart is needed
- resize optionsdialog a little and add some min sizes for certain GUI
  elements
- remove apply button from optionsdialog
- save and restore optionsdialog window position
- update nTransactionFee in QSettings with a set -paytxfee value when
  opening optionsdialog (I'm not sure about this yet, perhaps revert to
  not updating QSettings and just display current -paytxfee value in
  optionsdialog.)
2014-01-06 16:19:04 +01:00
Wladimir J. van der Laan 2a7201570b qt: Remove unused method OptionsModel::getTransactionFee 2014-01-06 15:10:21 +01:00
Philip Kaufmann 7e08e29117 better std::exception logging for block/undo files 2014-01-06 15:09:26 +01:00
Wladimir J. van der Laan d31ad26550 qt: Add missing lock in WalletModel::listCoins
Another problem detected by cs_wallet lock detection (#3401).
2014-01-06 13:36:24 +01:00
Wladimir J. van der Laan 28352af060 qt: protect SetAddressBook with cs_wallet lock everywhere 2014-01-06 13:36:24 +01:00
Wladimir J. van der Laan aaf8d15708 qt: Add missing LOCKs for locked coin functions
These don't aquire the wallet lock internally, so the caller has to do
it.
2014-01-06 10:34:34 +01:00
Wladimir J. van der Laan 4757e92318 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.
2014-01-06 10:34:33 +01:00
Wladimir J. van der Laan 7aedb91476
Merge pull request #3401
012ca1c LoadWallet: acquire cs_wallet mutex before clearing setKeyPool (Wladimir J. van der Laan)
9569168 Document cs_wallet lock and add AssertLockHeld (Wladimir J. van der Laan)
19a5676 Use mutex pointer instead of name for AssertLockHeld (Wladimir J. van der Laan)
2014-01-06 10:34:01 +01:00
Wladimir J. van der Laan ab086e0bd3
Merge pull request #3422
daa6b20 Unittests for uint256.h (Thomas Holenstein)
e85e19b Changed Get64(.) to GetLow64() (Thomas Holenstein)
2014-01-06 10:29:08 +01:00
Wladimir J. van der Laan 2102ab9f5c ui: Fix GUI initialization order
Fixes at least #3478.

Splits and documents the phases:
1. Parse command-line options. These take precedence over anything else.
2. Basic Qt initialization (not dependent on parameters or configuration)
3. Application identification
4. Initialization of translations
5. Now that settings and translations are available, ask user for data directory
6. Determine availability of data directory and parse bitcoin.conf
7. URI IPC sending
8. Main GUI initialization

Splits command line parsing logic from ipcSendCommandLine into
ipcParseCommandLine, as isTestNet() can only be overridden in the early
stages before choosing a data directory. Sending however needs to happen
after choosing a data directory.
2014-01-05 12:55:03 +01:00
Wladimir J. van der Laan 16403b4275
Merge pull request #3474
aec55a0 "getnetworkhashps" with defaults was yielding "0", the hashrate is not 0. (Gregory Maxwell)
2014-01-05 10:43:10 +01:00
Wladimir J. van der Laan 51947e4972
Merge pull request #3480
340bff3 ui: Better tab order in send coins entry (Wladimir J. van der Laan)
2014-01-04 13:13:37 +01:00
Christian Decker cdc11b3228 Added new DNS seed from bitcoinstats.com. 2014-01-03 14:01:39 +01:00
Wladimir J. van der Laan 340bff34b7 ui: Better tab order in send coins entry
Pressing <tab> after entering a label now brings the focus to the
address entry, instead of the row of buttons. In my experience this
is more useful, as I usually want to paste an address after
entering the label.

The buttons are mostly useless anyway:

- Choosing a previously used address should be discouraged

- When I'm already using the keyboard the 'paste address' button is
useless - just use the Ctrl-V. Maybe it would be an idea to remove it
completely

- I usually don't want to remove the entry I'm typing now! So makes
sense to have it at the end of the tab chain.
2014-01-02 09:36:46 +01:00
Gregory Maxwell aec55a073d "getnetworkhashps" with defaults was yielding "0", the hashrate is not 0.
This was broken in 4c6d41b8b6.
2013-12-29 03:14:06 -08:00
Thomas Holenstein daa6b20e29 Unittests for uint256.h
Unit tests for uint256.h. The file uint160_tests.cpp is no longer
needed. The ad-hoc tests which were in uint256.h are also no longer
needed. The new tests achieve 100% coverage.
2013-12-25 11:07:21 +01:00
Thomas Holenstein e85e19be06 Changed Get64(.) to GetLow64()
The function Get64(.) has a bug in case the width is not divisible by 64.
Since it is only ever used as Get64(0) this simply changes it to this
special case. Additionally, an assert is added, and a cast to prevent
a compiler error.
2013-12-25 11:07:21 +01:00
Wladimir J. van der Laan 6e7792003b
Merge pull request #3453
96e5f61 extend std::exception logging in txdb.cpp (Philip Kaufmann)
2013-12-24 10:06:58 +01:00
Wladimir J. van der Laan 086d7ec2b8
Merge pull request #3457
d78f35a Explicitly ensure that wallet is unlocked in `importprivkey` (Wladimir J. van der Laan)
2013-12-24 09:43:05 +01:00
Wladimir J. van der Laan 362755d018
Merge pull request #3427
1ad2636 qt: Prevent non-functional GUI from popping up during Init (Wladimir J. van der Laan)
2013-12-23 09:53:30 +01:00
Wladimir J. van der Laan d78f35a909 Explicitly ensure that wallet is unlocked in `importprivkey`
This makes for a more useful error reply (fixes #957).
2013-12-23 07:49:32 +01:00
Philip Kaufmann 96e5f61d6c extend std::exception logging in txdb.cpp 2013-12-20 18:58:15 +01:00
Philip Kaufmann 4c0b2cde3a Win32: use a more modern API call in FileCommit()
- this seems to be a more recent API call and also supports e.g. SMB3,
  ReFS, which is not guaranteed for commit_()
- link to MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364439%28v=vs.85%29.aspx
2013-12-20 18:42:27 +01:00
Wladimir J. van der Laan 365350140a
Merge pull request #3391
3380713 [Qt] coin control change address handling update (Philip Kaufmann)
2013-12-20 16:23:33 +01:00
Wladimir J. van der Laan 8b9adca446 Allow `-noserver` with bitcoind
Allow running bitcoind without server.

- Default to -server mode (of course) for bitcoind with SoftSetBoolArg
- Remove fForceServer argument from AppInit2
- Move fDaemon to a static variable in bitcoind
2013-12-20 16:07:33 +01:00
Philip Kaufmann 3380713af5 [Qt] coin control change address handling update
- re-work change address handling so that default is CNoDestination(),
  until a verified and known change address was entered (easier code flow)
- add a missing NULL pointer check for adresstablemodel
- add a missing text when opening coin control address selection for
  priority and ensure the label is black
- add a missing . at the end of a sentence
2013-12-20 15:50:21 +01:00
Philip Kaufmann 3c955993a4 init: add better formating for some command-line options 2013-12-20 15:44:14 +01:00
Wladimir J. van der Laan f498d43ee2
Merge pull request #3416
9e9056c Remove -logtodebugger (Wladimir J. van der Laan)
2013-12-20 15:03:41 +01:00
Wladimir J. van der Laan 23981b1f47
Merge pull request #3369
6027b46 Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance (Michael Bauer)
2013-12-20 14:43:01 +01:00
Wladimir J. van der Laan 326b5bb9d0
Merge pull request #3437
2ea980a qt: Treat regtest as testnet (Wladimir J. van der Laan)
2013-12-20 11:20:36 +01:00
Wladimir J. van der Laan 2ea980a77c qt: Treat regtest as testnet
No need to do anything special in the GUI for regtest mode,
but do treat it at testnet not mainnet to prevent confusion.
2013-12-20 11:18:50 +01:00
Wladimir J. van der Laan d2b6de031f qt: Make sure overviewpage button is pressed at startup
Due to walletframe changes, the overview page button is no longer
automatically selected at startup even though the overview page is shown.
2013-12-20 09:33:44 +01:00
Thomas Holenstein df840de5da
Make bitcoin compile without wallet if "db_cxx.h" is not present
Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove
them.
2013-12-19 10:46:41 +01:00
Wladimir J. van der Laan 285cf7a1a6
Merge pull request #3412
c3a7f51 Move `verifymessage` from rpcwallet to rpcmisc (Wladimir J. van der Laan)
723a03d Move `createmultisig` from rpcwallet to rpcmisc (Wladimir J. van der Laan)
452955f Move `validateaddress` from rpcwallet to rpcmisc (Wladimir J. van der Laan)
cd7fa8b Move `nTransactionFee` from main.cpp to wallet.cpp (Wladimir J. van der Laan)
a943bde Move `settxfee` from rpcblockchain to rpcwallet (Wladimir J. van der Laan)
16bc9aa Move `getinfo` from rpcnet to rpcmisc (Wladimir J. van der Laan)
652e156 add new RPC implementation file `rpcmisc.cpp` (Wladimir J. van der Laan)
2013-12-19 10:11:13 +01:00
Wladimir J. van der Laan 012ca1c9e4 LoadWallet: acquire cs_wallet mutex before clearing setKeyPool
Make the function mutex-aware, to prevent having to lock cs_wallet
at the call site in Init.
2013-12-19 10:00:58 +01:00
Wladimir J. van der Laan 956916806a Document cs_wallet lock and add AssertLockHeld
Add locking assertions to wallet to all methods that
access internal fields and do not aquire the cs_wallet mutex.
2013-12-19 09:46:11 +01:00
Wladimir J. van der Laan 19a5676280 Use mutex pointer instead of name for AssertLockHeld
This makes it useable for non-global locks such as the wallet and
keystore locks.
2013-12-19 09:46:11 +01:00
Wladimir J. van der Laan 636a42bd0e
Remove ui_interface ThreadSafeAskFee residue
Missed these in ca2c83d (#3415).
2013-12-18 13:46:10 +01:00
Wladimir J. van der Laan a5824bb3c6
Merge pull request #3433
6c1bf19 [Qt] style-police, add missing license headers (Philip Kaufmann)
2013-12-18 11:27:14 +01:00
Wladimir J. van der Laan 57fdd68aac
Merge pull request #3415
4a61c39 qt: status WalletModel::Aborted is no longer used (Wladimir J. van der Laan)
ca2c83d Remove unused ThreadSafeAskFee from ui_interface (Wladimir J. van der Laan)
37e67d3 Remove unused ThreadSafeHandleURI from ui_interface (Wladimir J. van der Laan)
2013-12-18 08:56:37 +01:00
Wladimir J. van der Laan 03d9dd47f6
Merge pull request #3424
06eb2f2 Seperate out wallet options in help message (Wladimir J. van der Laan)
2013-12-18 08:15:18 +01:00
Wladimir J. van der Laan 97203994a4
Merge pull request #3381
7df07b3 [Qt] fix RecentRequestsTableModel function ambiuguity (Philip Kaufmann)
2013-12-18 07:27:05 +01:00
Wladimir J. van der Laan cf920b657d
Merge pull request #3405
55c6890 Squashed 'src/leveldb/' changes from 936b461..e991315 (Pieter Wuille)
2013-12-17 09:50:39 +01:00
Philip Kaufmann 6c1bf199ca [Qt] style-police, add missing license headers
- add missing license headers in Mac files
- small code formating cleanups
2013-12-17 07:56:40 +01:00
Philip Kaufmann 46469d0f86 some more small re-branding changes (Bitcoin Core) 2013-12-16 23:36:22 +01:00
Wladimir J. van der Laan 1ad26362c9 qt: Prevent non-functional GUI from popping up during Init
When a InitError or InitWarning happens, the
GUI pops up but is unusable (until Init finishes).

This is caused by showNormalIfMinimized. Add a message
flag to skip this call for Init errors or warnings.
2013-12-16 18:51:30 +01:00
Wladimir J. van der Laan 16ec9044d1 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.
2013-12-16 17:36:04 +01:00
Wladimir J. van der Laan 88ba2643f0 qt: Update English language file for translators 2013-12-16 12:25:25 +01:00
Wladimir J. van der Laan 2ed38d11a8
Merge pull request #3408
22f0135 Rebrand to `Bitcoin Core` (Wladimir J. van der Laan)
2013-12-16 12:23:31 +01:00
Wladimir J. van der Laan 06eb2f215b Seperate out wallet options in help message
Seperate out the wallet options in HelpMessage, and
don't show them if compiled with --disable-wallet.

Also add documentation for `-disablewallet` option.
2013-12-16 10:23:39 +01:00
Wladimir J. van der Laan 4a61c39456 qt: status WalletModel::Aborted is no longer used
Aborting transactions happens in the GUI now as it should,
not the backend.
2013-12-16 09:46:55 +01:00
Wladimir J. van der Laan 3d7c66d75d
Merge pull request #3423
0205abd Improve unit test code not to compare with explanatory messages for each platform. Instead, use have an exception object to check if the string returned by what() on the raised exception matches the string returned by what() on the expected exception instance. This way, we do not need to list all different possible explanatory strings for different platforms in the test code, and make it simple. (The idea is by Cory Fields.) (Kangmo)
2013-12-16 07:59:07 +01:00
Kangmo 0205abd83d Improve unit test code not to compare with explanatory messages for each platform.
Instead, use have an exception object to check if the string returned by what() on the raised exception matches the string returned by what() on the expected exception instance.
This way, we do not need to list all different possible explanatory strings for different platforms in the test code, and make it simple. (The idea is by Cory Fields.)
2013-12-16 09:26:04 +09:00
Wladimir J. van der Laan a5a65bbc90
Merge pull request #3420
bccd532 Fix unit test error on OSX 10.9 using Apple LLVM v5.0. (Kangmo)
2013-12-15 17:35:28 +01:00
Wladimir J. van der Laan 93a5d0bb98 qt: use GUIUtil::dateTimeStr in coincontrol 2013-12-15 15:39:09 +01:00
Kangmo bccd5324ab Fix unit test error on OSX 10.9 using Apple LLVM v5.0.
Before the fix, there were 6 errors such as :
serialize_tests.cpp:77: error in "noncanonical": incorrect exception std::ios_base::failure is caught

It turns out that ex.what() returns following string instead of "non-canonical ReadCompactSize()"
"non-canonical ReadCompactSize(): unspecified iostream_category error"

After the fix, unit test passed.

The test ran using Apple LLVM v5.0 on OSX 10.9 and the unit test error happened because of different error messages by different compilers.

g++ --version on my development environment.

```
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
```
2013-12-15 23:25:41 +09:00
Wladimir J. van der Laan 9e9056cd1a Remove -logtodebugger
`-logtodebugger` is a strange, obscure, WIN32-only (mostly MSVC) thing.
Let's clean up the options a bit get rid of it.

test_bitcoin was using fLogToDebugger as a way to prevent logging to
debug.log. For this, add a boolean (not exposed as option) fLogToDebugLog that
defaults to true and is disabled in the tests.
2013-12-15 10:12:38 +01:00
Wladimir J. van der Laan 8a7606f35b
Merge pull request #3377
0b238b2 Use thread-local storage for LogPrint(category...) (Gavin Andresen)
962b1cf Fix infinite loop with LogPrint on Windows (Gavin Andresen)
2013-12-14 13:28:22 +01:00
Wladimir J. van der Laan ca2c83da50 Remove unused ThreadSafeAskFee from ui_interface
ThreadSafeAskFee is effectively unused. It is only called
when the fAskFee parameter on SendMoney or SendMoneyToDestination
is true, which never happens. Remove it.
2013-12-14 12:30:08 +01:00
Wladimir J. van der Laan 37e67d37c1 Remove unused ThreadSafeHandleURI from ui_interface 2013-12-14 11:30:50 +01:00
Wladimir J. van der Laan c3a7f516e7 Move `verifymessage` from rpcwallet to rpcmisc
Enables it in --disable-wallet compiles.
2013-12-13 16:34:57 +01:00
Wladimir J. van der Laan 723a03d2de Move `createmultisig` from rpcwallet to rpcmisc
Enables it in --disable-wallet compiles.
2013-12-13 16:34:57 +01:00
Wladimir J. van der Laan 452955f5be Move `validateaddress` from rpcwallet to rpcmisc
Enables it in --disable-wallet compiles.
Delimit wallet-using part using #ifdef ENABLE_WALLET.
2013-12-13 16:34:57 +01:00
Wladimir J. van der Laan cd7fa8bb43 Move `nTransactionFee` from main.cpp to wallet.cpp
Transaction fee is only used by the wallet.
No need for it to be in main.cpp.
2013-12-13 16:34:57 +01:00
Wladimir J. van der Laan a943bde6f0 Move `settxfee` from rpcblockchain to rpcwallet
`settxfee` only affects the wallet, not the block chain.
2013-12-13 16:06:32 +01:00
Wladimir J. van der Laan 16bc9aaf8a Move `getinfo` from rpcnet to rpcmisc
`getinfo` is a general info method which shows information
from multiple sources, it doesn't belong in rpcnet.cpp or
any of the other current RPC implementation files.
2013-12-13 16:03:57 +01:00
Wladimir J. van der Laan 652e156951 add new RPC implementation file `rpcmisc.cpp` 2013-12-13 16:03:16 +01:00
Philip Kaufmann a9a37c8bb5 update help for -blockmaxsize and blockprioritysize
- was left out in #3326
2013-12-13 10:01:21 +01:00
Wladimir J. van der Laan 22f0135df0 Rebrand to `Bitcoin Core`
Only messages for now, executable names and other file names
can be changed later if necessary and safe.

Do not do an all-sweeping change. Some occurences of Bitcoin-Qt need to
be kept:

- Applicationname: this is used to determine the registry entry names,
  we don't want to lose settings over a silly name change.
- Where it refers to the executable name instead of the product name.
2013-12-13 07:51:16 +01:00
Wladimir J. van der Laan 666225f687
Merge pull request #3387
3e01c00 Add tests for correct and incorrect order of signatures for a multisig (P2SH) (Tamas Blummer)
2013-12-13 06:03:40 +01:00
Wladimir J. van der Laan 150771c4f3
Merge pull request #3326
ad898b4 Increase default -blockmaxsize/prioritysize to 750K/50K (Gavin Andresen)
2013-12-13 05:39:35 +01:00
Cory Fields efdfee423f build: fix detection of boost libs on multi-arch distros
Fixes #3219.
2013-12-12 19:09:00 -05:00
Pieter Wuille ed873a301e Merge src/leveldb changes for LevelDB 1.15 2013-12-12 22:08:18 +01:00
Philip Kaufmann 7df07b3f45 [Qt] fix RecentRequestsTableModel function ambiuguity
- fixes a compiler ambiguity error with ::createIndex() called in
  RecentRequestsTableModel::index()
- also add some Q_UNUSED() macros
2013-12-11 14:45:25 +01:00
Philip Kaufmann 24646ee76f [Qt] fix possibilty to delete last sendcoins entry
- hide the entry about to be deleted, and if it is the last entry add a
  new one, so that we always have one entry in our list
2013-12-11 14:40:31 +01:00
Tamas Blummer 3e01c00f42 Add tests for correct and incorrect order of signatures for a multisig
(P2SH)
2013-12-11 00:03:50 +01:00
Wladimir J. van der Laan 6939a0d50e
Merge pull request #3350
fdbdb7f cleanup includes in rpcnet.cpp (Philip Kaufmann)
b6aafca some string and indentation updates in init/rpcclient (Philip Kaufmann)
2013-12-10 12:37:43 +01:00
Philip Kaufmann bd70562f66 [Qt] add messages when handling local payment request files
- important for the open URI dialog to give users feedback
  when a file is invalid etc.
2013-12-10 11:04:37 +01:00
Gavin Andresen d47bbbd261 Merge pull request #3368 from laanwj/2013_11_disable_wallet_mining
Allow mining RPCs with --disable-wallet
2013-12-09 19:36:39 -08:00