Commit graph

3321 commits

Author SHA1 Message Date
Wladimir J. van der Laan
dcd0b0775e qt: Handle address purpose in incremental updates
Correctly use the purpose of addresses that are added after the start
of the client. Addresses with purpose "refund" and "change" should not
be visible in the GUI. This is now handled correctly.
2013-08-29 16:25:51 +02:00
Pieter Wuille
ae6eac667b Merge pull request #2940 from Diapolo/checkpoint
move Checkpoints:fEnabled from step 2 to step 3 in init
2013-08-29 01:59:35 -07:00
Philip Kaufmann
bdd0c59ab0 Bitcoin-Qt: fixes for using display unit from options
- extend PaymentServer with setOptionsModel() and rework initNetManager()
  to make use of that
- fix all other places in the code to use display unit from options and no
  hard-coded unit
2013-08-29 10:38:51 +02:00
patrick s
a42eef6f10 verify vchPubKey matches calculated public key unless fSkipCheck is set 2013-08-29 01:11:47 -07:00
patrick s
6e51b3bddf improve wallet load time by removing duplicated calls to EC_KEY_check_key and adding a hash for vchPubKey/vchPrivKey entries in wallet.dat
backwards compatible with previous wallet.dat format
2013-08-28 23:53:26 -07:00
Gregory Maxwell
9d14e689c8 [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.
2013-08-28 15:49:51 -07:00
Jeff Garzik
e5e9904c1c RPC: add getrawchangeaddress, for raw transaction change destinations 2013-08-28 16:29:52 -04:00
Wladimir J. van der Laan
ff33a3470d Merge pull request #2931 from Diapolo/intro
Bitcoin-Qt: add testnet check and icon to intro dialog
2013-08-28 12:17:17 -07:00
Gregory Maxwell
1ef0067eab Merge pull request #2904 from gmaxwell/newaddr-no-passphrase
[QT] Don't ask for a passphrase to getnewaddress.
2013-08-28 11:20:09 -07:00
Gregory Maxwell
bf3a20a6e8 [wallet] Consider generated coins mature at COINBASE_MATURITY+1
We're not seeing large reorgs that would justify waiting a large
 amount past the rule required maturity, and the extra three
 hours is just a nuisance. Take one more block to at least give
 the 100th block time to propagate.
2013-08-28 10:16:50 -07:00
Gavin Andresen
b773da064d Set Accept: application/bitcoin-paymentrequest header
Suggestion from BitPay: set an Accept: HTTP header when
fetching payment requests / payment ACKs.
2013-08-28 11:48:39 +10:00
Jeff Garzik
bb7d0fc12f Merge pull request #2928 from jgarzik/cnb-txout
CreateNewBlock / getblocktemplate cleaning
2013-08-25 18:49:25 -07:00
Gavin Andresen
b62dc051aa Merge pull request #2938 from petertodd/op-reserved-weirdness
Document and test OP_RESERVED weirdness
2013-08-25 18:17:59 -07:00
Jeff Garzik
f1dbed9233 miner: constify CreateNewBlock() arg scriptPubKeyIn 2013-08-25 20:16:23 -04:00
Peter Todd
214d45b6b9
Document and test OP_RESERVED weirdness
Seems it was forgotten about when IsPushOnly() and the unittests were
written. A particular oddity is that OP_RESERVED doesn't count towards
the >201 opcode limit unlike every other named opcode.
2013-08-25 12:37:07 -04:00
Pieter Wuille
8a9e538227 Merge pull request #2935 from sipa/obounds
Fix out-of-bounds check
2013-08-25 07:42:21 -07:00
Philip Kaufmann
60fc1b4034 move Checkpoints:fEnabled from step 2 to step 3 in init
- it belongs to parameter-to-internal flags step, not parameter
  interactions phase
2013-08-25 13:25:21 +02:00
Jeff Garzik
3d86e7cd48 Merge pull request #2618 from fcicq/solaris-support
Partial solaris support
2013-08-24 20:19:24 -07:00
Jeff Garzik
750ae29664 Merge pull request #2852 from petertodd/getblock-chainwork
Add 'chainwork' to getblock
2013-08-24 19:45:50 -07:00
Pieter Wuille
24e5d7d5ae Fix out-of-bounds check 2013-08-24 23:22:27 +02:00
Pieter Wuille
877b5e3653 Merge src/leveldb changes for LevelDB 1.13 2013-08-24 22:21:41 +02:00
Philip Kaufmann
d9baa28f92 Bitcoin-Qt: add testnet check and icon to intro dialog 2013-08-24 15:20:37 +02:00
Jeff Garzik
7bb0f6c5e8 RPC: getblocktemplate does not require a key, to create a block template
getblocktemplate only uses certain portions of the coinbase transaction,
notably ignoring the coinbase TX output entirely.

Use CreateNewBlock() rather than CreateNewBlockWithKey(), eliminating
the needless key passing.

Should be zero behavior changes.
2013-08-24 00:45:17 -04:00
Jeff Garzik
7e17018995 CreateNewBlock() now takes scriptPubKey argument,
rather than a key.

CreateNewBlockWithKey() helper is added to restore existing functionality,
making this an equivalent-transformation change.
2013-08-24 00:33:46 -04:00
Gregory Maxwell
71ac5052d8 Remove fAllowReuse from GetKeyFromPool.
With the GUI password fix this was always false.
2013-08-23 12:54:50 -07:00
Gregory Maxwell
20469d83dd [QT] Don't ask for a passphrase to getnewaddress.
With an encrypted wallet the GUI was prompting for a passphrase every time
 the user requested a new address.  This is unnecessary, increases the
 exposure to keyboard sniffers, and discourages using fresh addresses for
 every transaction.

Instead only prompt for a passphrase when the keypool runs out, also call
 the new address function with the flag that prevents reuse.

Thanks to AlexNagy on IRC for pointing this out and who wouldn't take any
 lip from a curmudgeonly developer and insisted on what he knew to be true.
2013-08-23 12:01:57 -07:00
Philip Kaufmann
6728e00776 Bitcoin-Qt: extend some checks for valid model pointers 2013-08-23 13:07:20 +02:00
Philip Kaufmann
dbc0a6aba2 Bitcoin-Qt: tweak Qt walletXXX.cpp/h code
WalletView:
- add new signal showNormalIfMinimized()
- emit the new signal in handleURI() to fix a bug, preventing the main
  window to show up when using bitcoin: URIs

WalletStack:
- connect the showNormalIfMinimized() signal from WalletView with the
  showNormalIfMinimized() slot in BitcoinGUI
- rework setCurrentWallet() to return a bool
- add check for valid walletModel in addWallet()
- add missing gui attribute initialisation in constructor

WalletFrame:
- remove unused or unneded class attributes gui and clientModel
- add a check for valid clientModel in setClientModel()

General:
- small code formatting changes
2013-08-23 09:10:31 +02:00
Gavin Andresen
e62f8d72f3 Merge pull request #2539 from gavinandresen/paymentrequest
Payment Protocol Work
2013-08-22 01:54:28 -07:00
Gavin Andresen
a41d5fe019 Payment Protocol: X509-validated payment requests
Add support for a Payment Protocol to Bitcoin-Qt.

Payment messages are protocol-buffer encoded and communicated over
http(s), so this adds a dependency on the Google protocol buffer
library, and requires Qt with OpenSSL support.
2013-08-22 16:18:25 +10:00
Gavin Andresen
47d0534368 Route qDebug() messages to debug.log 2013-08-22 11:05:45 +10:00
Gavin Andresen
a73aa68b84 Rework when payment server is started 2013-08-22 11:05:45 +10:00
Philip Kaufmann
a2189fbaf6 update SelectParamsFromCommandLine() handling/order
- move SelectParamsFromCommandLine() from init.cpp to bitcoin.cpp to allow
  to use TestNet() for Bitcoin-Qt instead of GetBoolArg("-testnet", false)
- change order in bitcoind.cpp to match bitcoin.cpp functionality
- hamonize error message strings for missing datadir and failing
  SelectParamsFromCommandLine() in bitcoin.cpp and bitcoind.cpp
- use TestNet() call in splashscreen.cpp
2013-08-22 11:05:45 +10:00
Gavin Andresen
3624356e82 Refactor: Move GetAccountAddresses to CWallet 2013-08-22 11:05:45 +10:00
Gavin Andresen
618855133d Refactor: CAddressBookData for mapAddressBook
Straight refactor, so mapAddressBook stores a CAddressBookData
(which just contains a std::string) instead of a std::string.

Preparation for payment protocol work, which will add the notion
of refund addresses to the address book.
2013-08-22 11:05:45 +10:00
Gavin Andresen
b94595bb7f GetDataDir(): cache paths for each network separately 2013-08-22 11:05:44 +10:00
Gavin Andresen
57d80467f1 Reject dust amounts during validation
Replaces the validation check for "amount == 0" with an isDust check,
so very small output amounts are caught before the wallet
is unlocked, a transaction is created, etc.
2013-08-22 11:05:44 +10:00
Philip Kaufmann
88ff655987 translations update for 0.8.4
- update translation master files
- include current translations from Transifex
- add several new languages
- fix a bug in bitcoin.qrc, which prevents some languages from beeing used
  (wrong file extension .ts instead of .qm was used)
2013-08-21 15:35:50 +02:00
Gavin Andresen
b986663ccd Merge pull request #2919 from gmaxwell/bloom_faster
Update the bloom state on the real object, not the temporary one.
2013-08-20 20:12:51 -07:00
Gregory Maxwell
a7f533a972 Update the bloom state on the real object, not the temporary one.
This resulted in just passing all transactions to filtered wallets
which worked surprisingly well, except where it didn't.
2013-08-20 17:46:07 -07:00
Gavin Andresen
449fb40aa9 Merge pull request #2915 from petertodd/murmurhash-tests
Add MurmurHash3() unit test
2013-08-20 17:19:28 -07:00
Gavin Andresen
5250fdcc6c Merge pull request #2914 from gmaxwell/bloom_faster
Performance optimization for bloom filters.
2013-08-20 15:52:49 -07:00
Pieter Wuille
b28d8b423b Merge leveldb subtree change.
* On Mac OS X fsync does not guarantee write to disk. Use fcntl F_FULLFSYNC instead.
2013-08-20 15:13:34 +02:00
Peter Todd
4eecdcacaf
Add MurmurHash3() unit test
Useful as a source of test vectors to anyone re-implementing bloom
filters.
2013-08-20 07:30:39 -04:00
Gregory Maxwell
37c6389c5a Performance optimization for bloom filters.
This reduces a peer's ability to attack network resources by
 using a full bloom filter, but without reducing the usability
 of bloom filters.  It sets a default match everything filter
 for peers and it generalizes a prior optimization to
 cover more cases.
2013-08-20 02:27:26 -07:00
Gavin Andresen
bb237705d0 Checkpoint at block 250,000 2013-08-20 17:30:33 +10:00
phelixbtc
d1862bf309 makefile.mingw: Fix Win32 RPC Crashes.
8864019f6d
2013-08-19 17:19:08 +02:00
Pieter Wuille
4a9a8f3f48 Merge commit '84d6d69fc69662b2709fffbeaf3c3b4f53c535b1' 2013-08-18 00:58:04 +02:00
Gavin Andresen
317f57ec87 Merge pull request #2903 from Michagogo/listsinceblock-help
Clarified the listsinceblock help test
2013-08-15 20:34:00 -07:00
Gavin Andresen
31b28082fe Merge pull request #2891 from gavinandresen/leveldb_printerror
Use HandleError() consistently to handle leveldb errors
2013-08-15 19:02:32 -07:00
Gavin Andresen
3f20f82209 Merge pull request #2880 from gavinandresen/test_numequal
More unit tests for OP_NUMEQUAL
2013-08-15 18:53:49 -07:00
Gavin Andresen
a0bb001431 Merge pull request #2886 from gavinandresen/rpctiming
Make RPC password resistant to timing attacks
2013-08-15 18:53:26 -07:00
Gavin Andresen
9be4cff5f6 Merge pull request #2876 from sipa/fixreorgcrash
Fix reorganization crash
2013-08-15 18:51:06 -07:00
Gregory Maxwell
47491a90b6 Merge pull request #2131 from sipa/evens
Only create signatures with even S, and verification mode to check.
2013-08-15 18:42:28 -07:00
Gavin Andresen
13d3b1c144 Merge pull request #2829 from sipa/bip32
BIP 32 derivation + test vectors
2013-08-15 16:40:03 -07:00
Pieter Wuille
a81cd96805 Only create signatures with even S, and verification mode to check.
To fix a minor malleability found by Sergio Lerner (reported here:
https://bitcointalk.org/index.php?topic=8392.msg1245898#msg1245898)

The problem is that if (R,S) is a valid ECDSA signature for a given
message and public key, (R,-S) is also valid. Modulo N (the order
of the secp256k1 curve), this means that both (R,S) and (R,N-S) are
valid. Given that N is odd, S and N-S have a different lowest bit.
We solve the problem by forcing signatures to have an even S value,
excluding one of the alternatives.

This commit just changes the signing code to always produce even S
values, and adds a verification mode to check it. This code is not
enabled anywhere yet. Existing tests in key_tests.cpp verify that
the produced signatures are still valid.
2013-08-16 00:17:50 +02:00
Pieter Wuille
2461aba1ac Mempool consistency check 2013-08-15 23:55:35 +02:00
Pieter Wuille
f0784ac470 Fix non-standard disconnected transactions causing mempool orphans 2013-08-15 23:53:55 +02:00
Micha
9afe5a2c32 Clarified the listsinceblock help test
Specifically, the fact that the command
relates to wallet transactions.
2013-08-16 00:15:39 +03:00
Gavin Andresen
4323bfeafd Merge pull request #2776 from jgarzik/keypoolsize
RPC: keypoolrefill now permits optional size parameter, to bump keypool
2013-08-14 22:01:22 -07:00
Gavin Andresen
8fa9b5cc45 Merge pull request #2658 from TheBlueMatt/forkalert
Detect any sufficiently long fork and alert the user just like any other alert
2013-08-12 23:33:40 -07:00
Roman Mindalev
2b6a8993fb Add missing 0x prefix in chainparams.cpp 2013-08-12 18:28:23 +04:00
Gavin Andresen
b35e993200 Use HandleError() consistently to handle leveldb errors 2013-08-12 18:06:17 +10:00
Cozz Lovan
c7fa1a3586 do not call BuildMerkleTree() unnecessarily twice 2013-08-10 15:27:25 +02:00
Gavin Andresen
8dc206a1e2 Reject non-canonically-encoded sizes
The length of vectors, maps, sets, etc are serialized using
Write/ReadCompactSize -- which, unfortunately, do not use a
unique encoding.

So deserializing and then re-serializing a transaction (for example)
can give you different bits than you started with. That doesn't
cause any problems that we are aware of, but it is exactly the type
of subtle mismatch that can lead to exploits.

With this pull, reading a non-canonical CompactSize throws an
exception, which means nodes will ignore 'tx' or 'block' or
other messages that are not properly encoded.

Please check my logic... but this change is safe with respect to
causing a network split. Old clients that receive
non-canonically-encoded transactions or blocks deserialize
them into CTransaction/CBlock structures in memory, and then
re-serialize them before relaying them to peers.

And please check my logic with respect to causing a blockchain
split: there are no CompactSize fields in the block header, so
the block hash is always canonical. The merkle root in the block
header is computed on a vector<CTransaction>, so
any non-canonical encoding of the transactions in 'tx' or 'block'
messages is erased as they are read into memory by old clients,
and does not affect the block hash. And, as noted above, old
clients re-serialize (with canonical encoding) 'tx' and 'block'
messages before relaying to peers.
2013-08-09 10:01:35 +10:00
Gavin Andresen
42656ea2e5 Make RPC password resistant to timing attacks
Fixes issue#2838; this is a tweaked version of pull#2845 that
should not leak the length of the password and is more generic,
in case we run into other situations where we need
timing-attack-resistant comparisons.
2013-08-08 19:58:57 +10:00
Gavin Andresen
6cc766fa55 Merge pull request #2856 from Diapolo/crypter_headers
remove windows.h from crypter.cpp includes
2013-08-08 02:16:56 -07:00
Gavin Andresen
9d23db58c1 Merge pull request #2883 from codler/patch-5
Replace with existing constants
2013-08-07 04:44:57 -07:00
Han Lin Yap
1511769239 Use existing RPC_INVALID_PARAMETER constant 2013-08-07 10:14:33 +02:00
Gavin Andresen
ddd0e2f616 Merge pull request #2871 from gavinandresen/simplify_maporphan
Simplify storage of orphan transactions, fix CVE-2013-4627
2013-08-06 17:11:48 -07:00
Philip Kaufmann
265e2657b4 remove a newline from a string in init.cpp
- to match all other translatable strings in init.cpp and to simplify
  translations via Transifex
2013-08-06 10:28:52 +02:00
Gavin Andresen
bdd34642dc More unit tests for NUMEQUAL 2013-08-06 16:06:07 +10:00
Wladimir J. van der Laan
e07d9f77e9 Merge pull request #2879 from Diapolo/translations
translations update for Transifex 2013-08-05
2013-08-05 03:34:55 -07:00
Philip Kaufmann
0f1c8f23eb translations update for Transifex 2013-08-05 2013-08-05 11:06:45 +02:00
Gavin Andresen
ae759b3788 Merge pull request #2849 from petertodd/if-else-else
Add unittests for multiple ELSEs in a row
2013-08-05 01:53:57 -07:00
Gavin Andresen
15047f5af0 Merge pull request #2851 from TheBlueMatt/master
Prepare for mempool testing in pull-tester and fix multi-block transaction resurrection
2013-08-05 01:53:17 -07:00
Gavin Andresen
2af267c150 Merge pull request #2857 from Diapolo/compat_cleanup
cleanup compat.h Windows stuff
2013-08-05 01:48:35 -07:00
Gavin Andresen
e622f3f195 Merge pull request #2855 from Diapolo/guard_CreatePidFile
exclude CreatePidFile() function on WIN32 as it is unused
2013-08-05 01:05:59 -07:00
Gavin Andresen
a4ae02969e Merge pull request #2827 from Diapolo/rpccon_winpos
Bitcoin-Qt: save and restore position of debug window
2013-08-05 00:58:05 -07:00
Gavin Andresen
d687aaa311 Merge pull request #2865 from Diapolo/fix_intro_translation
fix string in intro.cpp, which is untranslatable on Transifex
2013-08-05 00:24:49 -07:00
Gavin Andresen
159bc48193 Simplify storage of orphan transactions
Orphan transactions were stored as a CDataStream pointer;
this changes the mapOrphanTransactions data structures to
store orphans as a CTransaction.

This also fixes CVE-2013-4627 by always re-serializing
transactions before relaying them.
2013-08-02 16:10:25 +10:00
Gavin Andresen
8f6f92c72b Revert "Truncate oversize 'tx' messages before relaying/storing."
This reverts commit c40a5aaaf4.
2013-08-02 15:50:04 +10:00
Wladimir J. van der Laan
6d89611c3a Merge pull request #2850 from Diapolo/fix_intro
fix possible infinite loop in intro.cpp thread
2013-07-31 22:15:05 -07:00
Jeff Garzik
d247a5d130 Move internal miner/block creation to separate miner.cpp module.
Public functions referenced elsewhere are added to miner.h.
2013-07-31 09:43:35 -04:00
Jeff Garzik
18946846d5 Minor miner fixes (hey hey it's fun to say)
* Fix UpdateCoins() definition in main.h
* Remove pwalletMain reference from BitcoinMiner(), as it is passed
  a wallet argument.
2013-07-31 08:45:49 -04:00
Gavin Andresen
050d2e953f Remove #define loop from util.h
Replace the loop macro with while (true). The #define caused
problems for Qt.
2013-07-31 14:06:44 +10:00
Philip Kaufmann
bef9f573b5 fix string in intro.cpp, which is untranslatable on Transifex
- seems the code tags in the original string cause errors, when using the
  Transifex site for translation
2013-07-29 16:56:03 +02:00
Philip Kaufmann
c431e9f1f0 Bitcoin-Qt: save and restore position of debug window
- move the code for saving and restoring window positions from BitcoinGUI
  to GUIUtil, make it more generic and also use it for saving/restoring
  debug window positions
2013-07-29 16:22:46 +02:00
Pieter Wuille
c4316fefa5 Make sure new wallet variables are initialized 2013-07-29 02:34:01 +02:00
Pieter Wuille
4bb77b4963 Merge pull request #2541 from luke-jr/bugfix_wallet_resend
Bugfix: Store last/next wallet resend times unique per CWallet object
2013-07-28 17:21:21 -07:00
Pieter Wuille
83a3597071 Merge pull request #2702 from vinniefalco/leveldb-subtree-at-1-10-0
Leveldb subtree at 1 12 0
2013-07-28 03:57:17 -07:00
Philip Kaufmann
5bc6d8e580 fix possible infinite loop in intro.cpp thread
- it was possible to trigger an infinite loop in FreespaceChecker::check() by
  simply removing the drive letter on Windows (which leads to an infinite
  loop in the FreespaceChecker thread)
- this was caused by not checking if we make progress with
  parentDir.parent_path()
2013-07-26 09:17:24 +02:00
Wladimir J. van der Laan
2b894bceac Merge pull request #2847 from Diapolo/fix_QApplication_include
Bitcoin-Qt: fix QApplication includes to match our include defaults
2013-07-25 22:42:16 -07:00
Wladimir J. van der Laan
7d3a50ddbe Merge pull request #2848 from Diapolo/translations
update bitcoin_en.ts to current master (2013-07-23)
2013-07-25 22:41:51 -07:00
Gavin Andresen
5e67e124cf Merge pull request #1889 from tcatm/multi-wallet
let user select wallet file with -wallet=foo.dat
2013-07-24 22:52:21 -07:00
Philip Kaufmann
852605d8d1 remove windows.h from crypter.cpp includes
- remove an unneeded windows.h include (comes from allocators.h, which is
  included in crypter.h)
2013-07-24 22:35:44 +02:00
Philip Kaufmann
dd833a4cd8 cleanup compat.h Windows stuff
- remove an unneded include for mswsock.h as we use winsock2.h anyway
- move typedef u_int SOCKET; into the #ifndef WIN32 part
- remove typedef int socklen_t;  as this is defined in ws2tcpip.h
2013-07-24 16:24:38 +02:00
Philip Kaufmann
a034c7ebb6 exclude CreatePidFile() function on WIN32 as it is unused 2013-07-24 09:30:09 +02:00
Peter Todd
1b3656d50b Add 'chainwork' to getblock
Returns nChainWork from the block index, the total work done by all
blocks since the genesis block.
2013-07-24 01:58:23 -04:00
Matt Corallo
9bf2a4aba2 Fix multi-block reorg transaction resurrection 2013-07-23 18:02:27 +02:00
Matt Corallo
d9ace8abe8 Don't use checkpoints and accept nonstd txn on -regtest 2013-07-23 18:02:26 +02:00
Peter Todd
aff83e9c02 Add unittests for multiple ELSEs in a row
IF ELSE ELSE ENDIF is a valid construct; execution or non-execution
inverts on each ELSE encountered.
2013-07-23 05:12:38 -04:00
Philip Kaufmann
3960d2e4ab update bitcoin_en.ts to current master (2013-07-23) 2013-07-23 09:10:57 +02:00
Philip Kaufmann
84ef729aa1 Bitcoin-Qt: fix QApplication includes to match our include defaults
- move all QApplication includes to top of included Qt headers
- undef our loop macro where it would cause compilation errors otherwise
2013-07-23 08:52:24 +02:00
constantined
2ecb7555a9 Switch to using raw_utf8 2013-07-23 04:51:29 +03:00
constantined
2227389fa8 JSON Spirit updated to v4.06 2013-07-23 04:48:14 +03:00
Jeff Garzik
0a740650a5 Merge pull request #2795 from fanquake/log_aborted_rebuilds
Log aborted block database rebuilds
2013-07-22 08:32:59 -07:00
Jeff Garzik
0cb6d67e46 Merge pull request #2832 from luke-jr/bugfix_wdb_boostver
Bugfix: Move boost/version include from db.cpp to walletdb.cpp where BOOST_VERSION is used
2013-07-22 08:08:27 -07:00
Jeff Garzik
6c6255edb5 Merge pull request #2826 from Diapolo/fix_mingw481
fix invalid conversion error with MinGW 4.8.1 in net.cpp
2013-07-22 08:05:05 -07:00
Jeff Garzik
ac6561322f Merge pull request #2836 from phelixbtc/patch-3
makefile.mingw: Use normal boost libraries instead of debug for Windows
2013-07-22 08:02:53 -07:00
Matt Corallo
f65e7092a2 Better warning/"alert" messages for large-work forks. 2013-07-22 12:12:45 +02:00
Matt Corallo
f89faa2584 Call the -alertnotify script when we see a long or invalid fork. 2013-07-22 12:11:46 +02:00
Matt Corallo
b8585384da Detect any sufficiently long fork and add a warning.
Such a fork is defined as being at least 7 blocks long and
having a tip which is within 72 blocks of our best block.
2013-07-22 12:10:57 +02:00
Luke Dashjr
dabd4bd48e Bugfix: Include block creation and SSL options headings in usage 2013-07-21 16:13:00 +00:00
phelixbtc
eda7605dfe makefile.mingw: Use normal boost libraries instead of debug for Windows
https://github.com/bitcoin/bitcoin/pull/2835#issuecomment-21231694
2013-07-19 10:20:13 +02:00
Wladimir J. van der Laan
4eab2dcc81 Merge pull request #2670 from laanwj/2013_05_datadir
qt: allow user to choose data directory
2013-07-18 22:42:50 -07:00
fcicq
98148a713e Fix fcntl include in net.cpp & netbase.cpp 2013-07-17 16:51:40 +08:00
fcicq
b34255b758 Ignore SIGPIPE signal on Solaris 2013-07-17 16:50:51 +08:00
fcicq
9371403993 Add missing constant for solaris 2013-07-17 16:50:51 +08:00
fcicq
c391f9a47b Fix boost uint type bug by reordering the includes 2013-07-17 16:50:51 +08:00
fcicq
eb8397a03e Disable variadic template support in C++11 2013-07-17 16:50:44 +08:00
Luke Dashjr
cc6cfab38f Bugfix: Supress "address" key in transaction details, when the destination isn't recognized
Previously, it would pass corrupt/random through base58.
2013-07-17 03:05:38 +00:00
Luke Dashjr
96ed682176 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.
2013-07-17 03:03:13 +00:00
Luke Dashjr
203d1ae69b Bugfix: Store last/next wallet resend times unique per CWallet object 2013-07-17 03:00:59 +00:00
Luke Dashjr
d4e2b040ed Bugfix: Move boost/version include from db.cpp to walletdb.cpp where BOOST_VERSION is used 2013-07-15 22:16:42 +00:00
Pieter Wuille
a59db19ee3 BIP32 test vectors 2013-07-15 01:07:19 +02:00
Pieter Wuille
eb2c999050 BIP32 derivation implementation 2013-07-15 01:05:25 +02:00
Philip Kaufmann
b3e0aaf36e fix invalid conversion error with MinGW 4.8.1 in net.cpp
- fixes src\net.cpp:1601: Error:invalid conversion from 'void*' to
  'const char*' [-fpermissive] in a setsockopt() call on Win32 that was
  found by using MinGW 4.8.1 compiler suite
2013-07-13 13:05:04 +02:00
Pieter Wuille
fb83a79b21 Fix minor backward incompatibility
The key refactor changed the way unencrypted private keys with compressed
public key are stored in the wallet. Apparently older versions relied on
this to verify the correctness of stored keys.

Note that earlier pre-release versions do risk creating wallets that can
not be opened by 0.8.3 and earlier.
2013-07-13 12:57:19 +02:00
Jeff Garzik
d598872726 Merge pull request #2743 from jgarzik/reject-reason
Log reason for non-standard transaction rejection
2013-07-10 08:50:49 -07:00
Jeff Garzik
3b837d5679 Merge pull request #2812 from jgarzik/rpcbestblock
RPC: add getbestblockhash, to return tip of best chain
2013-07-10 08:49:50 -07:00
Pieter Wuille
ec84e81e83 Prune provably-unspendable outputs 2013-07-10 00:23:46 +02:00
Gregory Maxwell
204b8af6dc Merge pull request #2796 from gmaxwell/remove_overactive_rand_tests
Make the rand tests determinstic.
2013-07-07 10:09:03 -07:00
Gregory Maxwell
e5c4dfdfc0 Make the rand tests determinstic. (fixes #2714)
This avoids spurious errors with the old tests but still tests
 enough that if the rng is replaced with a totally broken one
 it should still fail.
2013-07-07 09:54:47 -07:00
Nils Schneider
674cb304b3 let user select wallet file with -wallet=foo.dat
use std::string instead of psz for WalletFile

only allow wallets within $DATADIR

Use strWalletFile in salvage/recover

fix: remove unused variable pszWalletFile

move strWalletFile to init.h/init.cpp

avoid conversion of strWalletfile to c-string
2013-07-04 17:19:36 +02:00
Jeff Garzik
091aa8dae9 RPC: add getbestblockhash, to return tip of best chain 2013-07-03 11:02:29 -04:00
Vinnie Falco
fb1da62318 Merge commit 'adae78ea9940f4d44382967d1296e7db0b54a4de' into leveldb-squashed 2013-07-01 08:36:32 -07:00
Pieter Wuille
21cc8bdcbe Fix build date for from-tarball builds 2013-06-29 14:16:50 +02:00
Pieter Wuille
a4f43075d6 Merge pull request #2793 from Diapolo/translations
translation update 2013-06-25
2013-06-26 15:02:28 -07:00
Pieter Wuille
1f2d739ac1 Merge pull request #2174 from CodeShark/sync_macro_clarification
Added comments to sync.h to make it easier to understand the macros
2013-06-26 10:51:33 -07:00
Eric Lombrozo
042da8bc0d Added comments to sync.h to make it easier to understand the macros 2013-06-25 16:54:58 -07:00
Pieter Wuille
4ad73c6b08 Merge pull request #2209 from CodeShark/WalletRegistrationLocks
Wallet registration locks in main.cpp + UnregisterAllWallet() function
2013-06-25 16:33:16 -07:00
Jeff Garzik
36bd46f1c4 RPC: keypoolrefill gains optional size parameter 2013-06-25 16:21:42 -04:00
Jeff Garzik
13dd2d090e CWallet::TopUpKeyPool() takes optional pool size argument
Also, GetKeyPoolSize() now returns an accurate type, unsigned int.
2013-06-25 16:07:29 -04:00
Jeff Garzik
481d899794 Merge pull request #2792 from sipa/coreimpl
Move core implementations to core.cpp
2013-06-25 11:52:18 -07:00
Michael Ford
664aeb2871 Log aborted block database rebuilds 2013-06-25 23:54:17 +08:00
Peter Todd
c40a5aaaf4 Truncate oversize 'tx' messages before relaying/storing.
Fixes a memory exhaustion attack on low-memory peers.
2013-06-25 10:37:50 -04:00
Gavin Andresen
2e01ec3207 Merge pull request #2679 from vhf/patch-1
Too many bitcoins allowed as amount. (Issue #2401)
2013-06-25 06:47:53 -07:00
Philip Kaufmann
dae158132d translation update 2013-06-25
- updates bitcoinstrings.cpp and bitcoin_en.ts so new translations can be
  made on Transifex
2013-06-25 11:31:29 +02:00
Pieter Wuille
f121db58e4 Move core implementations to core.cpp 2013-06-25 10:33:29 +02:00
Eric Lombrozo
e6fe8e77fb Calling UnregisterAllWallets() instead of UnregisterWallet(pwalletMain) in init.cpp 2013-06-24 09:33:15 -07:00
Eric Lombrozo
e5cefb9be1 Added locks on the setpwalletRegistered functions in main.cpp and added an UnregisterAllWallets function. 2013-06-24 09:25:23 -07:00
Jeff Garzik
79f6925fac main.h->core.h include dependency improvements. 2013-06-24 10:41:16 -04:00
Jeff Garzik
396485b14d Merge pull request #2789 from sipa/overdump
Dump addresses every 15 minutes instead of 10 seconds
2013-06-24 07:32:20 -07:00
Pieter Wuille
c43da3f183 Dump addresses every 15 minutes instead of 10 seconds 2013-06-24 11:48:14 +02:00
Eric Lombrozo
33944573ca Moved CBlock from main.h to core.h 2013-06-23 19:59:35 -07:00
Eric Lombrozo
2a4d3464fd Pulled AcceptBlock out of CBlock. 2013-06-23 19:59:35 -07:00
Eric Lombrozo
38991ffa8a Pulled CheckBlock out of CBlock. 2013-06-23 19:59:35 -07:00
Eric Lombrozo
1959997afb Pulled AddToBlockIndex out of CBlock. 2013-06-23 19:59:35 -07:00
Eric Lombrozo
f3ae51dcce Pulled ConnectBlock out of CBlock. 2013-06-23 19:59:35 -07:00
Eric Lombrozo
5c363ed622 Pulled DisconnectBlock out of CBlock. 2013-06-23 19:59:34 -07:00
Eric Lombrozo
8031399494 Moved ReadBlockFromDisk implementation to main.cpp 2013-06-23 19:59:34 -07:00
Eric Lombrozo
7db120d531 Moved CBlock::ReadFromDisk out of CBlock to functions ReadBlockFromDisk in main.h 2013-06-23 19:59:34 -07:00
Eric Lombrozo
226f821942 Moved WriteBlockToDisk implementation from main.h to main.cpp 2013-06-23 19:59:32 -07:00
Eric Lombrozo
a6dba0fdb2 Moved CBlock::WriteToDisk out of CBlock to inline function WriteBlockToDisk in main.h 2013-06-23 19:58:23 -07:00
Pieter Wuille
8388289eb6 Generalize version bytes 2013-06-24 00:56:46 +02:00
Pieter Wuille
12dff9801f Add HMAC-SHA512 to hash 2013-06-24 00:56:45 +02:00
Pieter Wuille
fd967fed89 Merge pull request #2783 from sipa/newtxindex
Initialize database before checking changed txindex
2013-06-23 15:49:08 -07:00
Pieter Wuille
ee4949794b Merge pull request #2592 from sipa/dumpwallet
Add dumpwallet and importwallet RPC commands
2013-06-23 12:10:17 -07:00
Philip Kaufmann
336a53ddbc fix makefiles and init.cpp after chainparams merge
- add missing chainparams.o to some makefiles
- remove a double-include of chainparams.h in init.cpp
2013-06-23 17:39:39 +02:00
Jeff Garzik
4be2aba302 Merge pull request #2778 from jgarzik/rpc-verifydb
RPC: add 'verifychain' to verify chain database at runtime
2013-06-22 23:08:13 -07:00
Jeff Garzik
980bfe6ef8 Log reason for non-standard transaction rejection 2013-06-23 02:05:25 -04:00
Pieter Wuille
b4a8a326c0 Merge pull request #2660 from TheBlueMatt/gmfrefactor
Refactor fee rules to make them actually readable.
2013-06-22 10:08:57 -07:00
Pieter Wuille
48628fd98c Merge pull request #2765 from vobornik/master
recognize Debian kFreeBSD port by build_detect_platform script
2013-06-22 10:05:18 -07:00
Pieter Wuille
4e534aa9d8 Add dumpwallet and importwallet RPCs
dumpwallet: produce a dump of all keys in a wallet, in a format
compatible with Bitcoin Wallet for Android and Multibit.

importwallet: import such a dump
2013-06-22 17:30:56 +02:00
Pieter Wuille
434e4273b9 Add GetKeyBirthTimes to wallet
Compute safe lower bounds on the birth times of all wallet keys. For
pool keys or keys with metadata, the actually stored birth time is
used. For all others, the birth times are inferred from the wallet
transactions.
2013-06-22 17:30:56 +02:00
Pieter Wuille
acc775c554 Add ExtractAffectedKeys to script
This function finds all keys affected by a particular output script,
supporting everything ExtractDestinations supports (pay-to-pubkey,
pay-to-pubkeyhash, multisig) and recurses into subscripts (P2SH).
2013-06-22 16:49:30 +02:00
Pieter Wuille
067a6092ac Initialize database before checking changed txindex
In case no database exists yet, and -txindex(=1) is passed, we currently first
check whether fTxIndex differs from -txindex (and ask the user to reindex in
that case), and only afterwards initialize the database. By swapping these
around (the initialization is a no-op in case the database already exists),
we allow it to be born in txindex mode, without warning.

That also means we don't need to check -reindex anymore, as the wiping/reinit
of the databases happens before checking.
2013-06-22 16:14:26 +02:00
Pieter Wuille
01b45731b7 Merge pull request #2632 from mikehearn/chainparams
Refactor chain-specific tweaks into a CChainParams class and introduce a regtest mode
2013-06-22 06:56:14 -07:00
Pieter Wuille
4addb2c066 Refactor keytime/metadata and wallet encryption bugfix
Refactor keytime:
* Key metadata is kept in a CWallet::mapKeyMetadata (std::map<CKeyId,CKeyMetadata>).
* When generating a new key, time is put in that map, and new key is written.
* AddKeyPubKey and AddCryptedKey do not take a creation time argument, but instead
  pull it from that map, if it exists there.

Bugfix:
* AddKeyPubKey and AddCryptedKey in CWallet didn't override the CKeyStore
  definition anymore. This is fixed, as they no longed need the nCreationTime
  argument now.

Also a few related other changes:
* Metadata can be overwritten.
* Only GenerateNewKey calls GetTime(), as it's the only place where we know for
  sure a key was not constructed earlier.
* When the nTimeFirstKey is known to be inaccurate, it is set to the value 1
  (instead of 0, which would mean unknown).
* Use CPubKey instead of std::vector<unsigned char> where possible.
2013-06-20 01:31:18 +02:00
Jeff Garzik
f590653377 RPC: add 'verifychain', to verify chain database at runtime 2013-06-19 11:53:02 -04:00
Jeff Garzik
168ba99392 Pass check level, check depth to VerifyDB() 2013-06-19 11:32:49 -04:00
Mike Hearn
0e4b317555 Introduce a CChainParameters singleton class and regtest mode.
The new class is accessed via the Params() method and holds
most things that vary between main, test and regtest networks.
The regtest mode has two purposes, one is to run the
bitcoind/bitcoinj comparison tool which compares two separate
implementations of the Bitcoin protocol looking for divergence.

The other is that when run, you get a local node which can mine
a single block instantly, which is highly convenient for testing
apps during development as there's no need to wait 10 minutes for
a block on the testnet.
2013-06-19 16:28:52 +02:00
Mike Hearn
70e7fba06d Move implementation of some CBlockLocator methods
Move out of main.h to improve compile times and add documentation
for what the methods do.
2013-06-19 15:39:45 +02:00
Jeff Garzik
25dbb92860 Merge pull request #2760 from cozz/cozz2
fix comment about dust logic
2013-06-18 06:23:58 -07:00
Pieter Wuille
5e6f7cc8ad Merge pull request #2763 from bitsofproof/master
Send tx relay flag with version message
2013-06-17 01:43:11 -07:00
Wladimir J. van der Laan
be77b637fc qt: allow user to choose data directory
This adds an introduction screen that is shown when the client is first
started in which the user can choose a data directory.

It is also possible to force the intro screen to appear using command
line argument `-choosedatadir`.

The user is warned that the client will download and store 10Gb of data.
The intro screen shows how much space is available on the device that
contains the chosen directory and warns if this is less than the 10Gb.

To make it possible to translate the introduction dialog, the initialization
sequence is changed so that translations are
loaded before the data directory. This has the by-effect that it is
no longer possible to specify a language in bitcoin.conf inside the data
directory.
2013-06-16 10:21:41 +02:00
Pieter Wuille
e58154c447 Merge pull request #2648 from Diapolo/txindex
allow txindex to be removed and add a reindex dialog
2013-06-15 07:49:40 -07:00
Pieter Wuille
f5442aeef4 Merge pull request #2766 from theuni/fix-shutdown-deadlock
Fix shutdown deadlock, ticket #2690
2013-06-15 07:40:35 -07:00
Matt Corallo
87cce04c17 Refactor fee rules to make them actually readable.
This (nearly) doesn't change fee rules at all:
 * To make it into the fee transaction area, the dPriority comparison
   changed from < to <=
 * We now just ignore transactions > MAX_BLOCK_SIZE/4 instead of
   doing some calculations to require increasingly large fees as
   size increases.
2013-06-14 13:37:43 +02:00
theuni
e2654c8d28 fixed: don't use thread::sleep_for where it's known to be broken
Fixes #2690.
2013-06-14 00:01:57 -04:00
theuni
f2763d6d60 fixed: include boost header as necessary
Without this include, sometimes BOOST_VERSION was defined and sometimes
it was not, depending on which includes came before it. The result was a
random mix of sleep or sleep_for for boost versions >= 1.50.
2013-06-13 23:40:59 -04:00
Matt Corallo
b1f15b218b Remove broken option to skip input checking for wallet txn. 2013-06-13 22:28:03 +02:00
Vaclav Vobornik
1d626952f9 Added GNU/kFreeBSD kernel name (TARGET_OS)
uname -s returns "GNU/kFreeBSD" on Debian GNU/kFreeBSD port. See http://www.debian.org/ports/kfreebsd-gnu/
2013-06-12 14:46:16 +02:00
bitsofproof
c87f462b74 send tx relay flag with version 2013-06-11 23:29:41 +02:00
Cozz Lovan
346427f01b fix comment about dust logic 2013-06-11 05:06:02 +02:00
Jeff Garzik
d1020b780a Merge pull request #2553 from Diapolo/threads
changes to thread code (directly use boost::thread)
2013-06-10 13:42:59 -07:00
Pieter Wuille
61983b3d16 Merge pull request #1863 from jgarzik/keytime
"Wallet birthdays": store key create time; calc whole-wallet birthday
2013-06-10 13:38:19 -07:00
Philip Kaufmann
53e71135de changes to thread code (directly use boost::thread)
- removes our NewThread() function an replaces remaining calls with
  boost::thread with our TraceThread template
- remove ExitThread() function
- fix THREAD_PRIORITY_ABOVE_NORMAL for non Windows OSes
2013-06-10 19:49:54 +02:00
Philip Kaufmann
0206e38dcd allow txindex to be removed and add a reindex dialog
- adds a reindex dialog for Bitcoin-Qt to change -txindex without the need
  to supply -reindex
- now also does a -reindex, when removing the -txindex switch
2013-06-10 19:27:57 +02:00
Jeff Garzik
543d70a676 Merge pull request #2747 from luke-jr/getblock_verbose0
Add verbose flag to getblock RPC so it is possible to get hex dumps of blocks
2013-06-10 08:16:39 -07:00
Jeff Garzik
8da9dd0725 Wallet: optimize rescan to skip blocks prior to birthday 2013-06-10 09:38:13 -04:00
Jeff Garzik
3869fb89b6 Wallet: store key creation time. Calculate whole-wallet birthday.
This also encapsulate wallet-read state information into CWalletScanState.
2013-06-10 09:36:29 -04:00
Jeff Garzik
f59530ce6e Merge pull request #2154 from CodeShark/dependencycleanup
Clean up code dependencies
2013-06-10 06:17:38 -07:00
Wladimir J. van der Laan
8b313c9331 Merge pull request #2749 from laanwj/2013_06_addtotalbalance
qt: Add total balance in overview page
2013-06-09 01:06:36 -07:00
Wladimir J. van der Laan
3e9c8bab54 Create parent directories if needed in GetDataDir
One-line change. Fixes #2752.
2013-06-08 10:03:23 +02:00
Luke Dashjr
2331952141 RPC: getblock(): Accept 2nd "verbose" parameter, similar to getrawtransaction, but defaulting to 1 for backward compatibility 2013-06-07 17:44:39 +00:00
Wladimir J. van der Laan
cb85aeb06c qt: Add total balance in overview page 2013-06-07 15:33:32 +02:00
Eric Lombrozo
6e68524e95 Removed the main.h include from net.cpp. 2013-06-06 00:04:33 -07:00
Eric Lombrozo
501da2503a Using boost::signals2 to message main from net.cpp. 2013-06-05 23:15:20 -07:00
Eric Lombrozo
aabdf9e899 Moved UpdateTime out of CBlockHeader and moved CBlockHeader into core. 2013-06-05 23:15:20 -07:00
Eric Lombrozo
48343a0a50 Removed script.cpp's dependence on main.h 2013-06-05 23:15:20 -07:00
Eric Lombrozo
65e7bbef74 Moved CCoins, CTxOutCompressor, CTxInUndo, and CTxUndo to core. 2013-06-05 23:15:20 -07:00
Eric Lombrozo
05df3fc68d Removed AcceptToMemoryPool method from CTransaction. This method belongs to the mempool instance.
Removed AreInputsStandard from CTransaction, made it a regular function in main.
Moved CTransaction::GetOutputFor to CCoinsViewCache.

Moved GetLegacySigOpCount and GetP2SHSigOpCount out of CTransaction into regular functions in main.

Moved GetValueIn and HaveInputs from CTransaction into CCoinsViewCache.

Moved AllowFree, ClientCheckInputs, CheckInputs, UpdateCoins, and CheckTransaction out of CTransaction and into main.

Moved IsStandard and IsFinal out of CTransaction and put them in main as IsStandardTx and IsFinalTx. Moved GetValueOut out of CTransaction into main. Moved CTxIn, CTxOut, and CTransaction into core.

Added minimum fee parameter to CTxOut::IsDust() temporarily until CTransaction is moved to core.h so that CTxOut needn't know about CTransaction.
2013-06-05 23:15:20 -07:00
Eric Lombrozo
788536f175 Moved CInPoint to core. Removed GetMinFee from CTransaction and made it a regular function in main. 2013-06-05 23:15:19 -07:00
Eric Lombrozo
effc2770f5 Created core.h/core.cpp, added to makefiles. Started moving core structures from main to core beginning with COutPoint. 2013-06-05 23:14:52 -07:00
Eric Lombrozo
663224c232 Removed net.cpp's dependency on init.h.
Added explicit include of main.h in init.cpp, changed include of init.h to include of main.h in net.cpp.

Added function registration for net.cpp in init.cpp's network initialization.

Removed protocol.cpp's dependency on main.h.

TODO: Remove main.h include in net.cpp.
2013-06-05 20:36:10 -07:00
Eric Lombrozo
4751d07efd Moved unrelated-to-network calls in StartNode and StopNode into init.cpp 2013-06-05 20:36:10 -07:00
Eric Lombrozo
8926263dde Moved PushGetBlocks to main.cpp to eliminate dependence of net.cpp on CBlockLocator. 2013-06-05 20:36:10 -07:00
Eric Lombrozo
336fe971e6 Get rid of db dependencies on main 2013-06-05 20:36:10 -07:00
Jeff Garzik
c94bd68547 Merge pull request #2700 from theuni/gui-split
autotools: Gui split
2013-06-05 10:56:24 -07:00
Wladimir J. van der Laan
fc1f360fce Merge pull request #2731 from Diapolo/rpcconsole
Bitcoin-Qt: harmonize 2 setClientModel() functions
2013-06-05 09:27:23 -07:00
Cory Fields
99add01e76 osx: fix bitcoin-qt startup crash when clicking dock icon
Crash probably introduced by 4d17a1b0.
Inialize the window to NULL and verify it before use.
2013-06-04 23:55:35 -04:00
Cory Fields
34994ebcb0 build: cosmetics after last commit 2013-06-04 03:54:14 -04:00
Cory Fields
ee4b170c92 build: use runtime setting for wallet rather than QT_GUI define 2013-06-04 03:54:14 -04:00
Cory Fields
7f61f1ac78 build: use runtime setting for displaying the help message rather than QT_GUI define 2013-06-04 03:54:14 -04:00
Cory Fields
c98c88b3ab build: cosmetic: split usage string for easier formatting 2013-06-04 03:54:14 -04:00
Cory Fields
13c84b3bd5 build: add global var for whether or not the gui is enabled 2013-06-04 03:54:14 -04:00
Cory Fields
c862d2ff22 build: split the non-gui startup routines into a new file
This will allow each to have its own main(), meaning that we can build a common
base client and simply link in the correct startup object to create the
appropriate binary.
2013-06-04 03:54:14 -04:00
Cory Fields
a9380c72be build: prepare to move DetectShutdownThread 2013-06-04 03:53:40 -04:00
Wladimir J. van der Laan
c83d4d2170 Merge pull request #2613 from jonasschnelli/prefsFix
MaxOSX: settings fixes (#2371)
2013-06-03 09:17:55 -07:00
Wladimir J. van der Laan
cd945c3bc9 Merge pull request #2727 from TheBlueMatt/master
One more data-driven test-case
2013-06-03 09:14:58 -07:00
Jonas Schnelli
39fe9de6b2 Merge branch 'master' of git://github.com/bitcoin/bitcoin into prefsFix
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>

Conflicts:
	bitcoin-qt.pro
2013-06-03 15:18:41 +02:00
Philip Kaufmann
1fc57d568b Bitcoin-Qt: harmonize 2 setClientModel() functions
- harmonize BitcoinGUI::setClientModel() and RPCConsole::setClientModel()
- now RPCConsole::setClientModel() also includes a direct call to
  setNumBlocks()
2013-06-03 14:10:14 +02:00
Jonas Schnelli
f679b2900a MaxOSX: settings fixes (#2371)
- Launch-At-Startup implementation for mac
- Remove "Window" tab in settings

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-06-03 12:26:56 +02:00
Matt Corallo
14c12b094b Add new data-driven test-case. 2013-06-02 20:51:01 +02:00
Philip Kaufmann
80fccb0eb3 Bitcoin-Qt: setup testnet GUI directly
- this directly sets up all GUI elements that have testnet special-casing
  without first setting up main net stuff and changing afterwards (titles,
  icons etc.)
- also fixes 2 wrong icons shown during testnet usage on our toolbar
2013-06-02 17:40:28 +02:00
vhf / victor felder
a35e268da4 Too many bitcoins allowed in amount. (#2401)
Using magic number doesn't seem right. Could we factor this out, together with https://github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.cpp#L96 ?
And what about BitcoinUnits::parse() as well ?
2013-06-02 14:44:55 +02:00
Wladimir J. van der Laan
50b4086a4a Merge pull request #2588 from Diapolo/GetBoolArg
remove GetBoolArg() fDefault parameter defaulting to false
2013-06-02 05:21:24 -07:00
Philip Kaufmann
3260b4c090 remove GetBoolArg() fDefault parameter defaulting to false
- explicitly set the default of all GetBoolArg() calls
- rework getarg_test.cpp and util_tests.cpp to cover this change
- some indentation fixes
- move macdockiconhandler.h include in bitcoin.cpp to the "our headers"
  section
2013-06-01 12:53:57 +02:00
Wladimir J. van der Laan
25c0cce7fb Qt5 compatibility
This commit squashes all the changes in the Qt5 branch
relative to master.

Backward compatibility with Qt4 is retained.

Original authors:

- Philip Kaufmann <phil.kaufmann@t-online.de>
- Jonas Schnelli <jonas.schnelli@include7.ch>
2013-06-01 11:05:08 +02:00
Jeff Garzik
3fbd87e0dc Merge pull request #2552 from Diapolo/win-typedef
remove obsolete and unused typedef for Windows
2013-05-30 09:42:47 -07:00
Wladimir J. van der Laan
a2d2e5e466 Merge pull request #2615 from jonasschnelli/mac10_8_not_center
osx: make use of the 10.8+ user notification center to display growl lik...
2013-05-30 09:25:54 -07:00
Jeff Garzik
6bc6d57303 Merge pull request #2716 from laanwj/2013_05_30_getwork
Move pMiningKey init out of StartRPCThreads
2013-05-30 09:15:16 -07:00
Jeff Garzik
87ec1929cf Merge pull request #2705 from robbak/crash_zero_size_peers.dat
Don't attempt to resize vector to negative size.
2013-05-30 09:13:44 -07:00
Jeff Garzik
d397715661 Merge pull request #2644 from sipa/constfindblock
Make FindBlockByHeight constant-time
2013-05-30 08:06:44 -07:00
Jeff Garzik
3fad76bf83 Merge pull request #2642 from sipa/rightgenesis
Check for correct genesis
2013-05-30 08:04:02 -07:00
Jeff Garzik
9c95a2e836 Merge pull request #2625 from gavinandresen/walletlock_asio
Use boost::asio::deadline_timer for walletpassphrase timeout
2013-05-30 08:01:22 -07:00
Jeff Garzik
e2f42142a0 Merge pull request #2600 from sipa/keyrefactor
Refactor key.cpp/.h
2013-05-30 07:55:25 -07:00
Jeff Garzik
1803fa1db9 Merge pull request #2693 from jgarzik/checkpoint-bool
Replace repeated GetBoolArg() calls with Checkpoint::fEnabled variable set once at init time
2013-05-30 07:44:42 -07:00
Jeff Garzik
9d01dd7658 Merge pull request #2104 from al42and/listreceivedbyaddress_txids
listreceivedbyaddress now provides tx ids (issue #1149)
2013-05-30 07:42:01 -07:00
Wladimir J. van der Laan
d98bf10f23 Move pMiningKey init out of StartRPCThreads
This commit decouples the pMiningKey initialization and shutdown from the RPC
threads.

`getwork` and `getblocktemplate` rely on pMiningKey, and can also be ran
from the debug window in the UI even when the RPC server is not running.

Solves issue #2706.
2013-05-30 16:41:35 +02:00
Jeff Garzik
af93273799 Merge pull request #2657 from gmaxwell/its_after_may15_forever
It's after 2013-05-15 forever now, so remove the code for the May 15 fork
2013-05-30 07:35:44 -07:00
Pieter Wuille
896185d7ed Make signature cache store CPubKeys 2013-05-30 05:20:23 +02:00
Pieter Wuille
dfa23b94c2 CSecret/CKey -> CKey/CPubKey split/refactor 2013-05-30 05:20:21 +02:00
Pieter Wuille
5d891489ab Make CPubKey statically allocated 2013-05-30 05:18:42 +02:00
Pieter Wuille
ec0004aca0 Merge pull request #2671 from bytemaster/master
Fix Memory Leak
2013-05-29 20:14:20 -07:00
Pieter Wuille
5a336768ca Merge pull request #2713 from sipa/zerodotnine
Prepare for 0.9 merge window
2013-05-29 20:12:41 -07:00
Pieter Wuille
8c8132be73 Prepare for 0.9 merge window 2013-05-30 04:43:51 +02:00
Pieter Wuille
d315eb0a76 Merge pull request #2695 from robbak/init_cpp-explicit_cast
Explictly cast calculation to int, to allow std::min to work.
2013-05-29 19:41:51 -07:00
Robert Backhaus
98ab2b5a26 Don't attempt to resize vector to negative size. 2013-05-29 12:12:33 +10:00
Wladimir J. van der Laan
09e437ba4e Merge pull request #2696 from robbak/util_h-Add_stdarg_include
Explicitly #include stdarg.h, for access to va_list
2013-05-25 08:48:25 -07:00
Gavin Andresen
ef9acc5124 Bump build number to 0.8.2.2 for v0.8.2rc3 2013-05-24 16:11:44 -04:00
Gavin Andresen
378c526ee1 Merge pull request #2683 from Diapolo/translations
translations update 2013-05-23
2013-05-24 13:07:36 -07:00
Gavin Andresen
dbc6dea1b2 Fix crash-at-shutdown if exiting before initializing wallet 2013-05-24 15:52:52 -04:00
Jeff Garzik
f0d8a52cc0 Replace repeated GetBoolArg() calls with Checkpoint::fEnabled variable
set once at init time.
2013-05-24 11:10:53 -04:00
Robert Backhaus
65ec9eab2b Explicitly #include stdarg.h, for access to va_list 2013-05-24 23:45:08 +10:00
Robert Backhaus
03f498080a Explictly cast calculation to int, to allow std::max to work. 2013-05-24 23:40:51 +10:00
Jonas Schnelli
b4b0170595 osx: make use of the 10.8+ user notification center to display growl like notifications
- if 10.8, use user notification center, if <10.8, use growl

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-05-24 12:51:46 +02:00
Gavin Andresen
36e826cea1 Clean up mining CReserveKey to prevent crash at shutdown
Fixes issue#2687
2013-05-23 14:17:15 -04:00
Philip Kaufmann
6a2da2ba96 translations update 2013-05-23
- integrates current translations from Transifex
2013-05-23 08:39:31 +02:00
Gregory Maxwell
95c2ba1689 Merge pull request #2682 from sipa/morewalletbb
More bestblock records in wallets
2013-05-22 14:01:31 -07:00
Gavin Andresen
0c4434cf77 Merge pull request #2652 from gavinandresen/version_0.8.2_final
Set CLIENT_VERSION_IS_RELEASE, bump build to 0.8.2.1
2013-05-22 13:23:38 -07:00
Gavin Andresen
f1e76e8121 Merge pull request #2649 from Diapolo/translations
translations update 2013-05-19 (for 0.8.2 release)
2013-05-22 12:22:45 -07:00
Pieter Wuille
95c7db3dbf More bestblock records in wallets
Write bestblock records in wallets:
* Every 20160 blocks synced, no matter what (before: none during IBD)
* Every 144 blocks after IBD (before: for every block, slow)
* When creating a new wallet
* At shutdown

This should result in far fewer spurious rescans.
2013-05-22 20:59:36 +02:00
Gavin Andresen
6b99cfae3c Merge pull request #2677 from sipa/fastcreate
CreateNewBlock performance improvements
2013-05-22 10:24:17 -07:00
Matt Corallo
e175c16f5b Add a few data-driven tests for SIGHASH_ANYONECANPAY 2013-05-21 18:16:43 +02:00
Pieter Wuille
2ec349bc42 CreateNewBlock performance improvements 2013-05-21 03:53:32 +02:00
Daniel Larimer
a9280652ce Fix memory leak on exception in Key::SignCompact 2013-05-19 15:46:11 -04:00
Daniel Larimer
173601705c fix memory leak in CKey::SetCompactSignature() 2013-05-19 15:08:33 -04:00
Philip Kaufmann
38a33c085e translations update 2013-05-19 (for 0.8.2 release)
- integrates current translations from Transifex
- new translation: af_ZA
2013-05-19 14:04:33 +02:00
Gregory Maxwell
a824121eb8 It's after 2013-05-15 forever now, so remove the code for the May 15 fork. 2013-05-16 13:34:01 -07:00
Gavin Andresen
8ae290d266 Set CLIENT_VERSION_IS_RELEASE, bump build to 0.8.2.1 2013-05-13 10:53:53 -04:00
Pieter Wuille
0fe8010a10 Make FindBlockByHeight constant-time.
Remove the pnext pointer in CBlockIndex, and replace it with a
vBlockIndexByHeight vector (no effect on memory usage). pnext can
now be replaced by vBlockIndexByHeight[nHeight+1], but
FindBlockByHeight becomes constant-time.

This also means the entire mapBlockIndex structure and the block
index entries in it become purely blocktree-related data, and
independent from the currently active chain, potentially allowing
them to be protected by separate mutexes in the future.
2013-05-12 19:52:16 +02:00
Pieter Wuille
5d274c9927 Check for correct genesis
At startup, check that the expected genesis is loaded. This should prevent
cases where accidentally a datadir from the wrong network is loaded
(testnet vs mainnet, e.g.).
2013-05-12 13:21:03 +02:00
Gavin Andresen
5b5d399593 Update version numbers for 0.8.2rc1 release 2013-05-10 09:50:33 -04:00
Gavin Andresen
056ab5b43f Merge pull request #2630 from Diapolo/translations
translations update 2013-05-08 (for 0.8.2 release)
2013-05-10 06:35:27 -07:00
Gavin Andresen
dc4cf7c183 Merge pull request #2635 from gavinandresen/boost_chrono_osx
Link with boost_chrono library on OSX
2013-05-09 18:19:29 -07:00
Gavin Andresen
4332be71a2 Link with boost_chrono library on OSX
Compiling on my OSX 10.6 build machine, I get:

Undefined symbols:
  "boost::chrono::steady_clock::now()", referenced from:
      boost::cv_status boost::condition_variable::wait_for<long long, boost::ratio<1ll, 1000000000ll> >(boost::unique_lock<boost::mutex>&, boost::chrono::duration<long long, boost::ratio<1ll, 1000000000ll> > const&)in bitcoinrpc.o

Linking against the boost_chrono fixes the issue.

Windows builds already link against boost_chrono; Linux doesn't, but compiles (on pull-tester / gitian, at least).
2013-05-09 17:08:38 -04:00
Philip Kaufmann
40c387e517 translations update 2013-05-08
- integrates current translations from Transifex
2013-05-08 08:43:41 +02:00
William Yager
5fdd1251a8 Specified base_uint component size
A base_uint used to be made of an array of unsigned ints. This works
fine on most platforms, but might not work on certain present or future
platforms. The code breaks if an unsigned int is 16 or 64 bits, so it's
important to be specific. Also changed "u" to "you".
2013-05-07 20:03:17 -05:00
Gavin Andresen
e5ddaf5ec8 Merge pull request #2410 from gmaxwell/salvageharder
Make explicitly requested salvage operations keep going when there is an error.
2013-05-07 08:58:35 -07:00
Gavin Andresen
92f2c1fe0f Use boost::asio::deadline_timer for walletpassphrase timeout
New method in bitcoinrpc:  RunLater, that uses a map of deadline
timers to run a function later.

Behavior of walletpassphrase is changed; before, calling
walletpassphrase again before the lock timeout passed
would result in: Error: Wallet is already unlocked.

You would have to call lockwallet before walletpassphrase.

Now: the last walletpassphrase with correct password
wins, and overrides any previous timeout.

Fixes issue# 1961 which was caused by spawning too many threads.

Test plan:

Start with encrypted wallet, password 'foo'
NOTE:
 python -c 'import time; print("%d"%time.time())'
... will tell you current unix timestamp.

Try:

walletpassphrase foo 600
getinfo
EXPECT: unlocked_until is about 10 minutes in the future

walletpassphrase foo 1
sleep 2
sendtoaddress mun74Bvba3B1PF2YkrF4NsgcJwHXXh12LF 11
EXPECT: Error: Please enter the wallet passphrase with walletpassphrase first.

walletpassphrase foo 600
walletpassphrase foo 0
getinfo
EXPECT: wallet is locked (unlocked_until is 0)

walletpassphrase foo 10
walletpassphrase foo 600
getinfo
EXPECT: wallet is unlocked until 10 minutes in future

walletpassphrase foo 60
walletpassphrase bar 600
EXPECT: Error, incorrect passphrase
getinfo
EXPECT: wallet still scheduled to lock 60 seconds from first (successful) walletpassphrase
2013-05-07 11:47:33 -04:00
Philip Kaufmann
e7d41be870 translations update 2013-05-07
- updates bitcoin_en.ts and bitcoinstrings.cpp
- integrates current translations from Transifex
2013-05-07 09:14:23 +02:00
Gavin Andresen
33edd0a477 Merge pull request #2577 from gavinandresen/fee_bandaid
Treat dust outputs as non-standard, un-hardcode TX_FEE constants
2013-05-04 10:15:39 -07:00
Pieter Wuille
f309cb76c2 Merge pull request #2606 from gavinandresen/threadfix
Exit cleanly if AppInit2 returns false
2013-05-04 07:43:15 -07:00
Philip Kaufmann
b9763faf12 translations update 2013-05-04
- updates bitcoin_en.ts and bitcoinstrings.cpp
- removes bitcoin_se.ts
- adds bitcoin_ar.ts
- integrates current translations from Transifex
2013-05-04 12:30:14 +02:00
Pieter Wuille
674ae7a26f Merge pull request #2558 from sipa/nodbdir
Some database/-related recovery improvements
2013-05-03 15:17:33 -07:00
Pieter Wuille
979a22a7a0 Merge pull request #2599 from sipa/norecvdisc
Do not kill connections on recv buffer overflow
2013-05-03 15:12:41 -07:00
Gavin Andresen
db1dc95f0a Merge pull request #2614 from jonasschnelli/icon_testnet_mac
osx: show testnet icon in dock as early as possible
2013-05-03 14:39:22 -07:00
Gavin Andresen
4a4e9a3f8d Merge pull request #2610 from gavinandresen/scriptcleanup
Remove implementation of disabled opcodes
2013-05-03 14:38:18 -07:00
Gavin Andresen
61a845dcb6 Merge pull request #2566 from sipa/nodef
Allow the default key to be unavailable
2013-05-03 14:33:02 -07:00
Gavin Andresen
aa62b2c433 Merge pull request #2607 from gavinandresen/loadwalletfix
Do not write to wallet during LoadWallet
2013-05-03 14:32:47 -07:00
Pieter Wuille
aa6b3061ee Merge pull request #2603 from sipa/nobestblock
Bugfix: if no bestblock record is present, do a -rescan
2013-05-03 14:08:46 -07:00
Gavin Andresen
26585c36b2 Merge pull request #2602 from sipa/utxostate
Improve gettxoutsetinfo command
2013-05-03 11:00:31 -07:00
Pieter Wuille
bcb79a64c9 Merge pull request #2598 from Diapolo/init
small init.cpp changes (strings / Winsock init)
2013-05-03 10:44:14 -07:00
Philip Kaufmann
110257a631 small init.cpp changes (strings / Winsock init)
- add a check that requested Winsock version is available
- update some strings
- remove -gen=0 from help-message as this is default
2013-05-03 19:42:12 +02:00
Gavin Andresen
000dc55181 Un-hardcode TX_FEE constants
Allow setting of MIN_TX_FEE / MIN_RELAY_TX_FEE with
-mintxfee / -mintxrelayfee

Default values are the same (0.0001 BTC).
2013-05-03 10:54:31 -04:00
Gavin Andresen
1f00f4e9c9 CreateTransaction: return strFailReason on failure 2013-05-03 10:54:31 -04:00
Gavin Andresen
8de9bb53af Define dust transaction outputs, and make them non-standard 2013-05-03 10:52:09 -04:00
Gavin Andresen
b8e1dc2e53 Remove flaky util thread unit tests 2013-05-03 10:45:00 -04:00
Jonas Schnelli
367491df9d osx: show testnet icon in dock as early as possible
A green testnet splashscreen with a normal, orange dock icon looks strange and can confuse users.

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-05-03 16:14:38 +02:00
Pieter Wuille
b45fd0a5a4 Merge pull request #2608 from jonasschnelli/pathCacheFix
clear path cache after getting a proper config file (fixes #2605)
2013-05-03 04:52:03 -07:00
Gavin Andresen
bce697d7fa Remove implementation of disabled opcodes
So we stop getting pull requests (like #2604) fixing problems with disabled Script opcodes.
A hard fork would be required to re-enable these, and if we ever did that we'd require extensive review and testing.
2013-05-02 17:33:57 -04:00
Jonas Schnelli
b357a71cfa clear path cache after getting a proper config file (fixes #2605)
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-05-02 18:55:25 +02:00
Gavin Andresen
2f15e86a68 Do not write to wallet during LoadWallet
When debugging another issue, I found a hang-during-startup race condition due to
LoadWallet calling SetMinVersion (via LoadCryptedKey).

Writing to the file that you're in the process of reading is a bad idea.
2013-05-02 12:43:07 -04:00
Gavin Andresen
d605bc4cd1 Exit cleanly if AppInit2 returns false
Bitcoin-Qt could core dump if application initialization failed in certain ways.

I double-fixed this:
1) qt/bitcoin.cpp now shuts down core threads cleanly if AppInit2 returns false
2) init.cpp now exits before StartNode() if strErrors is set (no reason to StartNode if we're just going to exit immediately anyway).

Tested by triggering all of the various ways AppInit2 can fail, either by passing bogus command-line arguments or just recompiling tweaked code to simulate failure.

This is a partial fix for #2480
2013-05-02 12:26:33 -04:00
Pieter Wuille
a9d9f0f5f7 Do not kill connections on recv buffer overflow
Instead of killing a connection when the receive buffer overflows,
just temporarily halt receiving before that happens. Also, no
matter what, always allow at least one full message in the receive
buffer (otherwise blocks larger than the configured buffer size
would pause indefinitely).
2013-05-01 20:56:50 +02:00
Pieter Wuille
2aceeb01a9 Bugfix: if no bestblock record is present, do a -rescan
It is possible to have a wallet.dat file without any bestblock
record at all (if created offline, for example), which - when
loaded into a client with a up-to-date chain - does no rescan and
shows no transactions.

Also make sure to write the current best block after a rescan, so
it isn't necessary twice.
2013-05-01 19:21:55 +02:00
Pieter Wuille
e31aa7c9d7 Improve gettxoutsetinfo command
* Bugfix: output the correct best block hash (during IBD, it can
  differ from the actual current best block)
* Add height to output
* Add hash_serialized, which is a hash of the entire UTXO state.
  Can be useful to compare two nodes.
* Add total_amount, the sum of all UTXOs' values.
2013-05-01 17:21:43 +02:00
Jeff Garzik
9f4976afe2 RPC: strictly require HTTP URI "/"
Previously, JSON-RPC clients accessed URI "/", and the JSON-RPC server
did not care about the URI at all, and would accept any URI as valid.

Change the JSON-RPC server to require URI "/" for all current accesses.

This changes enables the addition of future interfaces at different
URIs, such as pull request #1982 which demonstrates HTTP REST wallet
download.

Or, a future, breaking change in JSON-RPC interface could be introduced
by serving JSON-RPC calls from new URI "/v2/".
2013-05-01 10:41:24 -04:00
Pieter Wuille
788064dd12 Don't announce to non-peer CNodes 2013-04-30 19:41:58 +02:00
Pieter Wuille
1c621e70be Merge pull request #2583 from laanwj/2013_04_netbase_bitfield
netbase: fix !O_NONBLOCK where ~O_NONBLOCK was meant
2013-04-29 16:36:51 -07:00
Pieter Wuille
d2cefe1674 Merge pull request #2589 from sipa/win32ldberr
Some win32-leveldb related fixes
2013-04-29 16:36:25 -07:00
Gavin Andresen
67f93dc513 Merge pull request #2568 from sipa/rlimit
Try to increase file descriptor rlimit if necessary
2013-04-29 13:25:13 -07:00
Pieter Wuille
228b29cf8f Merge pull request #2349 from dserrano5/master
Accept negative -par values to leave N CPUs free.
2013-04-29 10:54:04 -07:00
David Serrano
ebd7e8bf91 Accept negative -par values to leave N CPUs free. 2013-04-29 19:35:47 +02:00
Wladimir J. van der Laan
7226806e8d Merge pull request #2569 from sipa/win1024fd
Allow select()ing up to 1024 file descriptors on Windows
2013-04-29 10:27:33 -07:00
Pieter Wuille
ba29a5590b Try to increase file descriptor rlimit if necessary
As the default can be too low, especially on OSX.
2013-04-29 01:46:24 +02:00
Pieter Wuille
551b367f19 Allow files to be opened for reading multiple times 2013-04-28 14:15:34 +02:00
Wladimir J. van der Laan
d23fa49c52 move WSAStartup to init
WSAStartup should be called before using any other socket
functions. BindListenPort is not called if not listening.

Closes #2585.
2013-04-28 08:54:27 +02:00
Pieter Wuille
20d6f2013b Checking whether closing succeeds 2013-04-27 20:07:22 +02:00
Pieter Wuille
67efbda4a2 Print actual Win32 error that occurred on file creation failure. 2013-04-27 18:28:41 +02:00
Tariq Bashir
6e34d9b12a Prevent prevent file descriptor leak in ShrinkDebugFile() 2013-04-27 16:00:28 +02:00
Wladimir J. van der Laan
fe9e88cb06 fix !O_NONBLOCK where ~O_NONBLOCK was meant
Using ! on a non-zero value will always return 0.

Also remove some duplicate and superfluous code in other places.
2013-04-27 15:37:26 +02:00
Wladimir J. van der Laan
63888d43be Merge pull request #2530 from jonasschnelli/mac_win_reopen_fix
fixes #1522: GUI Disappearing (Mac OSX)
2013-04-27 02:15:54 -07:00
Wladimir J. van der Laan
aa9eee7eaf Merge pull request #2564 from Diapolo/walletview
small updates for walletview.cpp
2013-04-27 02:08:08 -07:00
Wladimir J. van der Laan
dffb535ead qt: remove fee recommendation in settings
This value gets stale really quickly, do not hardcode it into a message.
Completely remove it for now.
Later on, a mechanism will be added to determine fees based on the mempool.

Closes #2576
2013-04-27 11:06:43 +02:00
Wladimir J. van der Laan
1a31428ec0 qt: remove extraneous padding introduced in multiwallet support patch
solve issue #2529
2013-04-26 07:38:24 +02:00
Pieter Wuille
33912d1f23 Allow select()ing up to 1024 file descriptors on Windows 2013-04-26 01:31:10 +02:00
Pieter Wuille
360cfe142c Allow the default key to be unavailable
This solves the issue where no default key can be added after -salvagewallet.
2013-04-25 19:36:10 +02:00
Philip Kaufmann
9e334cfae3 translations update 2013-04-25
- new language "se"
- update bitcoin.qrc and bitcoin_en.ts
- fetch current translations from Transifex
2013-04-25 16:53:51 +02:00
Philip Kaufmann
46fd626b21 small updates for walletview.cpp
- make "&Export" translatable
- fix some includes
- small formatting changes
2013-04-25 16:15:31 +02:00
Pieter Wuille
ccda03b570 Remove database/ after clean shutdown 2013-04-24 22:38:56 +02:00
Pieter Wuille
1859aafef0 Try moving database/ away in case of failure 2013-04-24 01:37:19 +02:00
Philip Kaufmann
e79110822e remove duplicate bitdb.Open() code from init
- remove code from step 7, which we already have in step 5 of init
2013-04-24 00:49:50 +02:00
Pieter Wuille
2233fc5318 Reduce number of open LevelDB files to 64 2013-04-24 00:10:23 +02:00
Wladimir J. van der Laan
af10e3f6ac Merge pull request #2526 from Diapolo/Qt_misc
Bitcoin-Qt: misc small changes
2013-04-23 09:27:30 -07:00
Philip Kaufmann
61032f8942 remove obsolete and unused typedef for Windows 2013-04-23 09:54:29 +02:00
Pieter Wuille
97e7901a3a Do not invoke DoS for non-canonical sigs 2013-04-18 22:49:23 +02:00
Wladimir J. van der Laan
72782f3b92 Merge pull request #2525 from laanwj/2013_04_metatypebool
qt: register metatype for bool*
2013-04-18 08:59:49 -07:00
Wladimir J. van der Laan
dc2de757a4 Merge pull request #2501 from Diapolo/progress
rework ClientModel::getBlockSource() + BitcoinGUI::setNumBlocks()
2013-04-18 05:54:42 -07:00
Wladimir J. van der Laan
52ae314b5e Merge pull request #2524 from jonasschnelli/new_splashscreen_fresh
new splash screen
2013-04-18 00:05:21 -07:00
Gavin Andresen
8b1d72be32 Merge pull request #2536 from jcalvinowens/makefile-clarifying-comments
Add comments to UNIX Makefile regarding USE_UPNP
2013-04-17 14:21:34 -07:00
Jonas Schnelli
e790d47785 new toolbar icon for liunx/win fix #2518
On black toolbars, the new icon doesn't look very well.
Now the toolbar icon has again a transparent "B" for better style on toolbars.
Does not affect the mac client.

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-17 10:51:19 +02:00
Jonas Schnelli
f9124587cc new splash screen
why:

- the current splash-screen has no referring to official images on - https://en.bitcoin.it/wiki/Promotional_graphics
- the current splash screen only exists in a low res jpg
- current splash screen looks dark and "hackish"
- new splash screen should generate positive, "trust-emotions".
- new splash screen gives the user infos about the running client.
- new splash screen can handle long messages (in a lot of - languages the text is cropped in current release)

- new size (x2) 400x312

- contains textual information about the client
- textinfos are dynamicly written to the pixmap

when -testnet is switch on, the splashscreen will show the bitcoin logo in testnet-color (as well as a text [testnet])

example: https://dl.dropbox.com/u/7383846/new_bitcoin_splash.png
2013-04-17 01:14:53 -07:00
Calvin Owens
e74fbca1c2 Add comments to UNIX Makefile regarding USE_UPNP
The tri-state nature of USE_UPNP isn't immediately obvious, so paste
the explanation from doc/build-unix.txt as a comment in the makefile.
2013-04-17 00:04:03 -05:00
Wladimir J. van der Laan
fb53186571 Merge pull request #2519 from jonasschnelli/new_testnet_ico_file
new testnet ico file
2013-04-15 10:35:27 -07:00
Jonas Schnelli
4d17a1b0c2 fix: GUI Disappearing #1522 (Mac OSX)
- this solution works stable on mac and ensures that the window get's reopened when the user clicks the dock icon .
- tested on 10.8 with Qt4.8.4 and Qt5.0.1

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-15 12:02:01 +02:00
Philip Kaufmann
a26811ebdf embed bitcoin_testnet.ico in bitcoin-qt.exe (usable for shortcuts) 2013-04-14 21:49:07 +02:00
Philip Kaufmann
41fdc1cad1 overviewpage: make some code Qt5 compatible
- that changes will be fine for Qt4 also
2013-04-14 19:53:27 +02:00
Philip Kaufmann
d9d6c7d936 bitcoingui: remove 2 unneeded includes 2013-04-14 19:53:27 +02:00
Philip Kaufmann
e9abeac204 bitcoin: use static QApplication:: instead of app. 2013-04-14 19:53:19 +02:00
Philip Kaufmann
99ae01234d aboutdialog: use just "The Bitcoin developers" as tr()-string
- this ensures our new splash screen and this will share a translatable
  string an remove the need for an additional translation
2013-04-14 19:42:15 +02:00
Wladimir J. van der Laan
e83a90f127 qt: register metatype for bool*
This allows the bool* type to be passed between threads.  Should solve issue #2402.
2013-04-14 18:50:40 +02:00
Pieter Wuille
20d0810f30 Require strictly-standard encodings in mempool 2013-04-14 00:17:49 +02:00
Wladimir J. van der Laan
ac89a1ebe7 Merge pull request #2492 from Diapolo/Qt_message
Bitcoin-Qt: remove " - " on empty title in BitcoinGUI::message()
2013-04-13 05:40:30 -07:00
Wladimir J. van der Laan
f81b67829d Merge pull request #2515 from laanwj/2013_04_move_exportbutton
qt: move export button to tabs
2013-04-13 05:39:30 -07:00
Gavin Andresen
1b4b463c01 Merge pull request #2418 from sipa/uintwork
Use a uint256 for bnChainWork
2013-04-12 10:27:56 -07:00
Wladimir J. van der Laan
45155d3010 qt: move export button to tabs
Having the export button at the top was confusing people into thinking
the entire wallet was exported.

This commit moves the export button to the address book, receiving
addresses and transaction tabs separately.
2013-04-12 13:13:32 +02:00
Pieter Wuille
1657c4bc49 Use a uint256 for bnChainWork
Every block index entry currently requires a separately-allocated
CBigNum. By replacing them with uint256, it's just 32 bytes extra
in CBlockIndex itself.

This should save us a few megabytes in RAM, and less allocation
overhead.
2013-04-12 12:17:28 +02:00
Wladimir J. van der Laan
212b42c623 qt: don't show rpcconnect command line option in help
GUI can't connect to RPC. Showing this option in the help confuses
people, so remove it.
2013-04-11 22:29:05 +02:00
Wladimir J. van der Laan
3656a3c558 Merge pull request #2503 from Diapolo/copyright-year
new COPYRIGHT_YEAR macro in clientversion.h
2013-04-11 06:49:46 -07:00
Jonas Schnelli
5ab27b32a2 new testnet window .ico file
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-11 15:17:00 +02:00
Philip Kaufmann
8d643c90a6 Bitcoin-Qt: remove " - " on empty title in BitcoinGUI::message()
- don't display "Bitcoin - " when no title was supplied but just "Bitcoin"
2013-04-11 08:32:55 +02:00
Wladimir J. van der Laan
9a4eaf3cff Merge remote-tracking branch 'jonasschnelli/new_icons' (#2497)
Conflicts:
	doc/assets-attribution.txt
2013-04-11 06:57:27 +02:00
Wladimir J. van der Laan
bb8bc860e3 Merge pull request #2487 from Diapolo/translations
translations update 2013-04-08
2013-04-10 13:00:56 -07:00
Philip Kaufmann
cdd4400889 use the new COPYRIGHT_YEAR macro in bitcoin-qt.rc
- this reduces the places, where we need to change the year further
2013-04-10 17:15:34 +02:00
Philip Kaufmann
ec3cac6631 move COPYRIGHT_YEAR to clientversion.h
- this allows usage of that information also in other places (e.g. splash
  screen)
2013-04-10 16:53:36 +02:00
Philip Kaufmann
4881353efe rework ClientModel::getBlockSource() + BitcoinGUI::setNumBlocks()
- updates ClientModel::getBlockSource() to return all available states and
  sorts enum BlockSource in order of usage cases (none default, then reindex,
  import and network)
- updates BitcoinGUI::setNumBlocks() to better use getBlockSource() and
  also adds a message, when we have NO block source available
2013-04-10 15:53:40 +02:00
Jonas Schnelli
4c23743635 better quality windows .ICO icon file
- icon quality of the win icon of <256px resolutions are now much better

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-10 14:40:51 +02:00
Jonas Schnelli
e0af1b3ed6 fix mac specific button modification on addressbookpage
- continue the mac behavior of clearing button icons (because it's unusual on mac apps)
- fix: new button variable names, new buttons (verifyMessage, signMessage)

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-09 21:11:16 +02:00
Jonas Schnelli
f9579c55b3 overhaul of the testnet icon (green color) and the toolbar icons
- redefined the green color
- created new toolbar icons
- updated the assets-attribution.txt

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-09 20:05:32 +02:00
Gavin Andresen
c553fe8d43 Merge pull request #2469 from Diapolo/clientmodel-progress
Bitcoin-Qt: emit numBlocksChanged for changed reindex or importing state
2013-04-09 10:59:29 -07:00
Gavin Andresen
54c0b3eac7 Merge pull request #2474 from sipa/pre0.8.2
Switch version numbers to 0.8.1.99
2013-04-09 10:57:59 -07:00
Gavin Andresen
f158e363a4 Merge pull request #2478 from sipa/fullhash
Always print full hashes (tx, block, inv)
2013-04-09 10:57:16 -07:00
Gavin Andresen
1fd3ed25be Merge pull request #2461 from sipa/syncnode
Make sure we always have a node to do IBD from
2013-04-09 10:51:06 -07:00
Jeff Garzik
1483aac5f9 net.cpp: Do not change primary process name from (default) to "bitcoin-start"
Discussed a bit on IRC.
2013-04-08 22:02:57 -04:00
Gavin Andresen
f49992d983 Merge pull request #2243 from luke-jr/bugfix_leveldb
LevelDB build bugfix
2013-04-08 18:03:03 -07:00
Wladimir J. van der Laan
fb17911e9a Merge pull request #2470 from Diapolo/progressbarlabel
Bitcoin-Qt: update for BitcoinGUI::eventFilter()
2013-04-08 11:27:02 -07:00
Wladimir J. van der Laan
cf03a5ce8a Merge pull request #2481 from laanwj/2013_04_cleanup
qt: remove redundant wallet methods from bitcoingui
2013-04-08 08:25:01 -07:00
Wladimir J. van der Laan
70c71a6a2a Merge pull request #2477 from jonasschnelli/new_icons
new icons for windows, linux, etc.
2013-04-08 08:24:38 -07:00
Pieter Wuille
b7b774d82f Merge pull request #2419 from sipa/noreltime
Drop release times for CNode
2013-04-08 08:21:06 -07:00
Gavin Andresen
1829134afe Merge pull request #2272 from gavinandresen/getbalancefix
Fix getbalance discrepency
2013-04-08 06:37:58 -07:00
Pieter Wuille
1828133c62 Merge pull request #2403 from gmaxwell/minfee-to-relayfee
Make MIN_TX_FEE match MIN_RELAY_TX_FEE.
2013-04-08 01:50:21 -07:00
Philip Kaufmann
6a270c5f81 translations update 2013-04-08
- updates for bitcoinstrings.cpp and bitcoin_en.ts
- changes help text for -rpcthreads to match -par
- fix a small glitch with -par to be "-par=<n>"
2013-04-08 08:50:03 +02:00
Gregory Maxwell
96371bc6e0 Merge pull request #2282 from mb300sd/addressinlistunspent
Address in listunspent
2013-04-07 14:44:19 -07:00
Pieter Wuille
86648a8d16 Add bytessent, bytesrecv and syncnode to getpeerinfo 2013-04-07 19:31:13 +02:00
Pieter Wuille
6ed71b5e4f Make sure we always have a node to do IBD from
This introduces the concept of the 'sync node', which is the one we
asked for missing blocks. In case the sync node goes away, a new one
will be selected.

For now, the heuristic is very simple, but it can easily be extended
later to add better policies.
2013-04-07 19:19:13 +02:00
Philip Kaufmann
84b89afbd7 Translations update: pull from Transifex
- added languages in bitcoin.qrc: bs, ca, cy, eo, gu_IN, hi_IN, ja, la,
  lv_LV and th_TH (some translations files were already in src/qt/locale
  but not added in the .qrc file
2013-04-07 13:36:54 +02:00
Wladimir J. van der Laan
7e600cd92d qt: remove redundant wallet methods from bitcoingui
send encryptWallet/backupWallet/changePassphrase directly to walletFrame
2013-04-07 12:11:08 +02:00
Pieter Wuille
1c06aa98c6 Always print full hashes (tx, block, inv) 2013-04-07 03:43:55 +02:00
Jonas Schnelli
27cc0d7fd2 new windows and linux icons
- new windows .ico contains multiple resolutions up to 256px
- new testnet (green) icon
- new png icon for llinux, etc.
- new doxygen icon
- changed the assets-attribution.txt

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-06 20:35:10 +02:00
Jonas Schnelli
5675ae2f11 moved bitcoin.svg to correct folder (qt/res/src)
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-06 20:33:41 +02:00
Philip Kaufmann
87dd6035e5 Bitcoin-Qt: emit numBlocksChanged for changed reindex or importing state
- this allows our progressbarlabel to correctly update, when we
  finish a reindex or import, but do not get new blocks from other sources
2013-04-06 18:50:34 +02:00
Pieter Wuille
2b34779ae2 Switch version numbers to 0.8.1.99 2013-04-06 18:17:14 +02:00
Philip Kaufmann
35ed704d44 Bitcoin-Qt: update for BitcoinGUI::eventFilter()
- this allows us to use the progressbar and the label independently (if
  needed) and still prevents setStatusTip() to use them, if one of the 2
  is active
2013-04-06 12:24:52 +02:00
Pieter Wuille
484af4e2d1 Merge pull request #2456 from Diapolo/code-layout
small indentation, space, formatting fixes (no code changes)
2013-04-05 18:15:23 -07:00
Philip Kaufmann
b001c87126 small indentation, space, formatting fixes (no code changes) 2013-04-06 02:29:33 +02:00
Wladimir J. van der Laan
c19c1d00d9 Merge pull request #2443 from Diapolo/Qt_addrbook
Bitcoin-Qt: updates to addressbookpage
2013-04-05 11:24:06 -07:00
Pieter Wuille
430cbad411 Merge pull request #2460 from Diapolo/clientmodel
Bitcoin-Qt: add Genesis blocks time for testnet
2013-04-05 02:37:24 -07:00
Wladimir J. van der Laan
369e3df0f8 Merge pull request #2442 from Diapolo/Qt_RPCCon
Bitcoin-Qt: small RPCConsole cleanup
2013-04-05 01:24:15 -07:00
Wladimir J. van der Laan
d37fb2070d Merge pull request #2444 from jonasschnelli/master
new mac osx icon
2013-04-05 01:19:09 -07:00
Philip Kaufmann
8d432cd66d Bitcoin-Qt: add Genesis blocks time for testnet
- add the Genesis blocks time for the testnet in
  ClientModel::getLastBlockDate()
2013-04-04 22:15:47 +02:00
Pieter Wuille
cedaa71446 Drop release times for CNode
It seems there were two mechanisms for assessing whether a CNode
was still in use: a refcount and a release timestamp. The latter
seems to have been there for a long time, as a safety mechanism.

However, this timer also keeps CNode objects alive for far longer
than necessary after disconnects, potentially opening up a DoS
window.

This commit removes the timestamp-based mechanism, and replaces
it with an assert(nRefCount >= 0), to verify that the refcounting
is indeed correctly working.
2013-04-04 14:45:45 +02:00
Gavin Andresen
aaf47eac3a Merge pull request #2423 from TheBlueMatt/limitedmapalreadyaskedfor
Limited mapAlreadyAskedFor
2013-04-03 18:31:35 -07:00
Gavin Andresen
a0a437c86a Merge pull request #2357 from gavinandresen/shutdowncleanup
Thread / shutdown cleanup
2013-04-03 18:25:00 -07:00
Gavin Andresen
1c4f02139c Merge pull request #2453 from sipa/txstats
Update transaction statistics
2013-04-03 18:23:50 -07:00
Pieter Wuille
92a129980f Update transaction statistics
As these were not updated when 'backporting' the 225430 checkpoint
into head.

Additionally, also report verification progress in debug.log, and
tweak the sigcheck-verification-speed-factor a bit.
2013-04-04 02:39:44 +02:00
Gavin Andresen
723035bb68 Have Qt poll for shutdown requested, the QT way. 2013-04-03 19:58:47 -04:00
Gavin Andresen
b31499ec72 Clean up shutdown process 2013-04-03 19:57:53 -04:00
Gavin Andresen
21eb5adadb Port Thread* methods to boost::thread_group 2013-04-03 19:57:13 -04:00
Gavin Andresen
72f14d26ec LoopForever and ThreadTrace helpers 2013-04-03 19:57:13 -04:00
Philip Kaufmann
b9564d7e54 Bitcoin-Qt: updates to addressbookpage
- use labelExplanation for sending and receiving tab and move the string
  from the ui-file to the source
- ensure that the table holding the label and address is resized so that
  the address column fits the address and the label column is stretched to
  fit the window size
- rename some stuff for much easier readbility in the code (I find it hard
  to get the meaning of stuff like labels or buttons)
2013-04-03 22:30:59 +02:00
Gavin Andresen
1b43bf0d3a Rename util.h Sleep --> MilliSleep
Two reasons for this change:
1. Need to always use boost::thread's sleep, even on Windows, so the
sleeps can be interrupted (prior code used Windows' built-in Sleep).

2. I always forgot what units the old Sleep took.
2013-04-03 14:04:21 -04:00
Gavin Andresen
c8c2fbe07f Shutdown cleanup prep-work
Create a boost::thread_group object at the qt/bitcoind main-loop level
that will hold pointers to all the main-loop threads.

This will replace the vnThreadsRunning[] array.

For testing, ported the BitcoinMiner threads to use its
own boost::thread_group.
2013-04-03 14:04:21 -04:00
Gavin Andresen
87b9931bed Fix signed/unsigned comparison warnings 2013-04-03 14:04:21 -04:00
Wladimir J. van der Laan
36fdfb989e Merge pull request #2450 from Diapolo/Qt_fix_VMTab
Bitcoin-Qt: fix opening verify message tab via main menu
2013-04-03 09:26:18 -07:00
Philip Kaufmann
8726de26ee Bitcoin-Qt: fix GUI after initial multi-wallet patch
- adds 6 methods in BitcoinGUI to access some actions needed by the new
  WalletView class
- updates WalletView class to use these instead of trying to duplicate
  these
- cleanup walletview.{cpp/h} and remove all unneeded stuff
- this fixes problems with tabs toolbar (#2451) and export broken (#2436)
- more details in #2447
2013-04-03 17:37:28 +02:00
Philip Kaufmann
0dcf9e5308 Bitcoin-Qt: fix opening verify message tab via main menu 2013-04-03 15:28:16 +02:00
Wladimir J. van der Laan
4240bdaac1 Merge pull request #2448 from Diapolo/Qt_qApp
Bitcoin-Qt: only use qApp for Q(Core)Application::instance()
2013-04-02 20:30:44 -07:00
Jonas Schnelli
72fcbb15ea new mac osx icon (including SVG Version)
- added new created and documented svg version of shaded icon
- changed "B" background to white (no longer transparent)
- removed PSD (Adobe Photoshop) document
- license is now MIT

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-02 21:57:41 +02:00
Jonas Schnelli
6f21d15375 Merge branch 'master' of git://github.com/bitcoin/bitcoin 2013-04-02 21:53:41 +02:00
Gavin Andresen
d8aae1ce1d Merge pull request #2420 from sipa/globclean
Global cleanups
2013-04-02 10:00:31 -07:00
Gavin Andresen
06db61f09e Merge pull request #2431 from jgarzik/gen-bitcoins-init
Move GenerateBitcoins() call out of net.cpp's StartNode()
2013-04-02 08:56:57 -07:00
Philip Kaufmann
1ce0448808 Bitcoin-Qt: only use qApp for Q(Core)Application::instance() 2013-04-02 17:33:48 +02:00
Philip Kaufmann
bfad9982f8 Bitcoin-Qt: small RPCConsole cleanup
- add missing initalisation for clientModel
- remove unneded RPCExecutor::start() code
2013-04-02 16:42:23 +02:00
Wladimir J. van der Laan
bcce45e9b0 Merge pull request #2441 from Diapolo/Qt_fix_copy_context_menu
Bitcoin-Qt: fix copy via context-menu broken
2013-04-02 07:34:35 -07:00
Philip Kaufmann
90bd933e6d translation base files update 2013-04-02
- also includes a small change to a string in bitcoinrpc.cpp, which is not
  on Transifex anyway, so is safe to merge
2013-04-02 15:46:40 +02:00
Philip Kaufmann
39ee86257c Bitcoin-Qt: fix copy via context-menu broken
- as QClipboard::Selection isn't available on Windows ensure that the
  correct mode is called, but sill allow selection for e.g. X11
- start conversion from QCoreApplication::instance() to qApp in
  guiutil.cpp (I intend to harmonize this all over the source with my Qt5
  compatibility pull)
2013-04-02 15:20:35 +02:00
Wladimir J. van der Laan
a977b8c475 Merge pull request #2428 from r000n/staging
Simplify titles of tabs in main window
2013-04-02 05:41:24 -07:00
Jonas Schnelli
aaa7f279c8 new mac osx icon
check why/preview: http://dl.dropbox.com/u/7383846/new_bitcoin_qt_mac_icon.png

- according to official bitcoin logo
- no chopped shadow
- retina-screen support

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-04-02 13:00:51 +02:00
Matt Corallo
b5afda67f2 Move mapAlreadyAskedFor to limitedmap
This will result in re-requesting invs if we are under heavy inv
load, however as long as we get no more than 16,000 invs in two
minutes, this should have no effect on runtime behavior.
2013-04-01 11:56:23 -04:00
Matt Corallo
5ffc299404 Add a limitedmap class similar to mruset 2013-04-01 11:56:22 -04:00
Matt Corallo
eb59c4ca8e Revert "Actually use mapAlreadyAskedFor."
This reverts commit 643160f6e7.

Turns out this commit was useless after a more careful reading of
CNode::AskFor
2013-04-01 11:56:22 -04:00
Wladimir J. van der Laan
cf4d976f0e Merge pull request #2387 from Diapolo/translations
translations update 2013-03-19 (bitcoinstrings.cpp / bitcoin_en.ts)
2013-04-01 07:45:11 -07:00
Wladimir J. van der Laan
300f747ec3 Merge pull request #2437 from Diapolo/Qt_fixes
fix "send coins" via context menu in address book
2013-04-01 07:44:03 -07:00
Philip Kaufmann
b2bf46d35e Bitcoin-Qt: fix debug window
- fix debug window, by re-adding rpcConsole->setClientModel(clientModel);
  in BitcoinGUI::setClientModel(), which was removed by #2220
2013-04-01 15:19:40 +02:00
Philip Kaufmann
abf11f79ae fix "send coins" via context menu in address book
- the send coins context menu entry was not working anymore, because
  a non current version of #2220 was merged onto current master
- also removes some unneeded spaces and adds a comment to
  WalletModel::getNumTransactions()
2013-04-01 14:43:50 +02:00
Wladimir J. van der Laan
36599db428 qt: remove transaction count from overview page
It was needlessly confusing people, as it doesn't necessarily match the
number of transactions in the transaction list.
2013-03-31 10:16:43 +02:00
Roman Mindalev
0de26d5826 Words in English language are more short than in other langs usually.
Tabs don't fits in line in Spanish/German/Russian when they has two words.
Wallet has limited functionality. It can send & receive coins. So we can
safely rename "Send coins" to "Send" and "Receive coins" to "Receive".
Address book is just stored addresses.
2013-03-31 11:15:43 +04:00
Jeff Garzik
a0cafb7945 Move GenerateBitcoins() call out of net.cpp's StartNode()
The internal miner is closely bound to the wallet engine,
not the blockchain engine.
2013-03-31 01:54:27 -04:00
Wladimir J. van der Laan
9d8d85920a Merge pull request #2386 from Diapolo/Mac_GUI
Bitcoin-Qt: ensure createTrayIconMenu() is always called on Mac
2013-03-30 22:51:43 -07:00
Wladimir J. van der Laan
a7cbb340bd Merge pull request #2361 from L2G/font-tweak
Clean up font size in main window for observed inconsistency in Mac OS
2013-03-30 22:49:09 -07:00
Pieter Wuille
767fe14a27 Merge pull request #2422 from sipa/nowalcache
Don't use -dbcache for BDB anymore
2013-03-30 21:19:09 -07:00
Pieter Wuille
c7f039b674 Process getdata invs separately until send buffer overflows
There exists a per-message-processed send buffer overflow protection,
where processing is halted when the send buffer is larger than the
allowed maximum.

This protection does not apply to individual items, however, and
getdata has the potential for causing large amounts of data to be
sent. In case several hundreds of blocks are requested in one getdata,
the send buffer can easily grow 50 megabytes above the send buffer
limit.

This commit breaks up the processing of getdata requests, remembering
them inside a CNode when too many are requested at once.
2013-03-30 18:14:54 +01:00
Philip Kaufmann
5968cf5db2 Bitcoin-Qt: ensure createTrayIconMenu() is always called on Mac
- this should prevent GUI issues on Mac that were observed before (disappearing
  GUI - see #1522)
- the patch ensures, that createTrayIconMenu() is always called on Mac to
  process and use our MacDockIconHandler
2013-03-30 10:14:45 +01:00
Pieter Wuille
41b052ad87 Use per-message send buffer, rather than per connection 2013-03-29 23:56:26 +01:00
Pieter Wuille
967f24590b Some fixes to CNetMessage processing
* Change CNode::vRecvMsg to be a deque instead of a vector (less copying)
* Make sure to acquire cs_vRecvMsg in CNode::CloseSocketDisconnect (as it
  may be called without that lock).
2013-03-29 23:56:26 +01:00
Jeff Garzik
b9ff2970b9 P2P: improve RX/TX flow control
1) "optimistic write": Push each message to kernel socket buffer immediately.

2) If there is write data at select time, that implies send() blocked
   during optimistic write.  Drain write queue, before receiving
   any more messages.

This avoids needlessly queueing received data, if the remote peer
is not themselves receiving data.

Result: write buffer (and thus memory usage) is kept small, DoS
potential is slightly lower, and TCP flow control signalling is
properly utilized.

The kernel will queue data into the socket buffer, then signal the
remote peer to stop sending data, until we resume reading again.
2013-03-29 23:56:25 +01:00
Jeff Garzik
bc2f5aa72c P2P, cosmetic: break out buffer send(2) code into separate function 2013-03-29 23:56:25 +01:00
Jeff Garzik
607dbfdeaf P2P: parse network datastream into header/data components in socket thread
Replaces CNode::vRecv buffer with a vector of CNetMessage's.  This simplifies
ProcessMessages() and eliminates several redundant data copies.

Overview:

* socket thread now parses incoming message datastream into
  header/data components, as encapsulated by CNetMessage
* socket thread adds each CNetMessage to a vector inside CNode
* message thread (ProcessMessages) iterates through CNode's CNetMessage vector

Message parsing is made more strict:

* Socket is disconnected, if message larger than MAX_SIZE
  or if CMessageHeader deserialization fails (latter is impossible?).
  Previously, code would simply eat garbage data all day long.
* Socket is disconnected, if we fail to find pchMessageStart.
  We do not search through garbage, to find pchMessageStart.  Each
  message must begin precisely after the last message ends.

ProcessMessages() always processes a complete message, and is more efficient:

* buffer is always precisely sized, using CDataStream::resize(),
  rather than progressively sized in 64k chunks.  More efficient
  for large messages like "block".
* whole-buffer memory copy eliminated (vRecv -> vMsg)
* other buffer-shifting memory copies eliminated (vRecv.insert, vRecv.erase)
2013-03-29 23:56:25 +01:00
Jeff Garzik
ea83336f4e Merge pull request #2411 from TheBlueMatt/master
(finally) Remove IRC Seed support now that lfnet is down.
2013-03-29 08:03:18 -07:00
Jeff Garzik
8455310a7b Merge pull request #2385 from gavinandresen/alertnotify
alertnotify, so bitcoind users can get email/sms/whatever of alerts
2013-03-29 07:49:56 -07:00
Wladimir J. van der Laan
09dfa86baf qt: Improve capslock detection on non-us keyboards (issue #1855)
On non-us keyboards you can obtain lower case characters even pressing
the SHIFT, this caused false positives.
2013-03-29 10:55:23 +01:00
Wladimir J. van der Laan
a6d32c94ab Merge remote-tracking branch 'codeshark/multiwallet-qt-no-core' (pull #2220)
Conflicts:
	src/qt/bitcoingui.cpp
2013-03-29 09:54:00 +01:00
Wladimir J. van der Laan
1be4bbadc7 Merge pull request #2350 from DavidGriffith/master
Also copy the address to the X11 clipboard (the one you middle-click to paste)
2013-03-29 01:45:59 -07:00
Wladimir J. van der Laan
8142ac2c18 Merge pull request #2393 from r000n/staging
Staging - GUI fixes for upstream
2013-03-29 01:40:32 -07:00
Pieter Wuille
2e3c76bf98 Don't use -dbcache for BDB anymore
-dbcache was originally used to set the maximum buffer size in the
BDB environment, and was later changed to set the chainstate cache
and leveldb caches. No need to use it for BDB now that only the
wallet remains there.

This should reduce memory allocation (but not necessarily memory
usage) a bit.
2013-03-29 03:02:52 +01:00
Pieter Wuille
3427517d50 Clean up global datastructures at shutdown.
This should make detecting leaks much easier.
2013-03-29 02:24:18 +01:00
Larry Gilbert
15e9739f3b Don't specify a point size for "Wallet" 2013-03-27 21:16:35 -07:00
Matt Corallo
6a1d6e03da Add a new testnet dnsseed (currently only static list, will update) 2013-03-24 20:02:18 -04:00
Matt Corallo
c2efd981aa (finally) Remove IRC Seed support now that lfnet is down. 2013-03-24 19:38:19 -04:00
Gregory Maxwell
14c9d116be Make explicitly requested salvage operations keep going when there is an error.
In my tests corrupted wallets would often result in BDB dropping an error
just due to duplicate records being found, which appears harmless.
2013-03-24 12:59:03 -07:00
Roman Mindalev
f688056f9d Show window in center of screen on first launch 2013-03-23 08:21:42 +04:00
Roman Mindalev
e11f1806b6 Save & restore window size and position 2013-03-23 08:21:33 +04:00
Roman Mindalev
afee36d379 Fix transaction fee in uBTC
Step for buttons 'up' and 'down' - 0.001. With BTC and mBTC all ok, but
0.001 uBTC is lower than minimal value (satoshi)
User should press 10 times on 'up' button to get 0.01 uBTC
2013-03-23 08:20:51 +04:00
Gregory Maxwell
e3800824d6 Make MIN_TX_FEE match MIN_RELAY_TX_FEE.
Current relay behavior is widely deployed. Supplying a higher minfee than
mining and relaying just irritates users without anti-spam gain.
2013-03-22 17:48:40 -07:00
Eric Lombrozo
67155d9299 Minimal architectural changes necessary to support multiple wallets in bitcoin-qt
- This commit is a minimal restructuring necessary to support multiple wallets in the UI. Please see multiwallet-qt.txt for details.
2013-03-22 11:09:08 -07:00
Gavin Andresen
3d9d2d423b Recommend alertnotify 2013-03-21 10:08:21 -04:00
Richard Schwab
598889973b Adding 'copy txid' to qt tx overview context menu 2013-03-21 11:30:12 +01:00
Philip Kaufmann
967125ca4a blockchain -> block chain (used everywhere else) 2013-03-21 08:23:23 +01:00
Philip Kaufmann
48253c16bf translations update 2013-03-19 (bitcoinstrings.cpp / bitcoin_en.ts) 2013-03-19 23:47:45 +01:00
Gavin Andresen
8ab14e6976 Merge pull request #2384 from gmaxwell/trim_error0
Deleting everything except the wallet will not help recover from BDB errors.
2013-03-19 14:20:22 -07:00
Gavin Andresen
e5f163a041 -alertnotify=<cmd>
Runs a shell command when an AppliesToMe() alert is received.
%s in the <cmd> string is replaced with the alert.strStatusBar
message.
2013-03-19 15:16:30 -04:00
Gregory Maxwell
124f823714 Deleting everything except the wallet will not help recover from BDB errors.
Now that the wallet is the only thing in BDB any DB open errors must be
from the wallet itself-- so deleting everything else will not likely help.
2013-03-19 10:11:43 -07:00
Wladimir J. van der Laan
1a1ce49155 Merge pull request #2378 from Diapolo/translations
update bitcoin_en.ts and bitcoinstrings.cpp
2013-03-19 10:01:05 -07:00
Wladimir J. van der Laan
f42720d0f6 Merge pull request #2215 from Diapolo/Qt_sendfrom_addrbook
Bitcoin-Qt: add "send coins" to context menu in addressbook
2013-03-19 09:59:38 -07:00
Wladimir J. van der Laan
b804f1cd56 Merge pull request #2332 from Diapolo/init_messages
harmonize 2 init messages and remove one
2013-03-19 09:57:57 -07:00
Gavin Andresen
1472308d67 Some unit tests for CAlert 2013-03-19 11:35:04 -04:00
Philip Kaufmann
2547d2a90b Bitcoin-Qt: update Win executable file meta-data copyright 2013-03-19 00:04:54 +01:00
Philip Kaufmann
c83dd7490c update bitcoin_en.ts and bitcoinstrings.cpp 2013-03-18 08:29:36 +01:00
Philip Kaufmann
311993ab10 Bitcoin-Qt: add "send coins" to context menu in addressbook
- allows to directly select an address from the addressbook, chose "send
  coins" from the context menu, which sends you to sendcoins tab and fills
  in the selected address
2013-03-18 07:44:22 +01:00
Wladimir J. van der Laan
74e4d80068 Merge pull request #2210 from Diapolo/Qt_header_cpp_cleanup
Bitcoin-Qt: massive header and cpp cleanup
2013-03-17 22:58:37 -07:00
Gavin Andresen
d3e8c6a9d3 Update unit test to match rule enforcement starts 21 March 2013-03-17 22:01:59 -04:00
Gavin Andresen
f817c496a1 Checkpoint at first block in 11 March chain fork 2013-03-17 21:53:17 -04:00
Gavin Andresen
402f19b645 Before 15 May, limit created block size to 500K 2013-03-17 21:53:01 -04:00
Gavin Andresen
8c222dca4f CheckBlock rule until 15-May for 10,000 BDB lock compatibility 2013-03-17 21:52:47 -04:00
Philip Kaufmann
32af5266cf Bitcoin-Qt: massive header and cpp cleanup
- try to enforce the same style to all Qt related files
- remove unneeded includes from the files
- add missing Q_OBJECT, QT_BEGIN_NAMESPACE / QT_END_NAMESPACE
- prepares for a pull-req to include Qt5 compatibility
2013-03-17 18:28:00 +01:00
Philip Kaufmann
e1ca89df1f harmonize 2 init messages and remove one
- harmonize the database related init messages
- as we have a thread for importing blocks, that init message is obsolete
2013-03-13 09:17:59 +01:00