Commit graph

5329 commits

Author SHA1 Message Date
Wladimir J. van der Laan
aa8279513b
Add detailed network info to getnetworkinfo RPC
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by #2575.
2014-08-18 13:36:10 +02:00
Wladimir J. van der Laan
88fe88cf36
gui: remove redundant numTransactions tracking
This number was still tracked even though it's shown nowhere in the UI
anymore. It was originally removed because it didn't match the actual number of
records in the view (which contains outputs, not transactions) thus was
confusing people.
2014-08-18 10:28:26 +02:00
Wladimir J. van der Laan
21e7a5690f
Merge pull request #4655
216e9a4 Add a way to limit deserialized string lengths (Pieter Wuille)
2014-08-18 09:55:24 +02:00
Cozz Lovan
cb5fa86f42 [Qt] Revert overviewpage from QFormLayout to QVBoxLayout 2014-08-17 23:50:44 +02:00
Cozz Lovan
0d27dad845 Clean-up SyncWithWallets/SyncTransaction 2014-08-17 17:39:30 +02:00
randy-waterhouse
c101c76907 build: Add --with-utils (bitcoin-cli and bitcoin-tx, default=yes).
Help string consistency tweaks. Target sanity check fix.
2014-08-17 20:22:12 +12:00
Wladimir J. van der Laan
b3ec053082
Merge pull request #4656
5cbda4f Changed LevelDB cursors to use scoped pointers to ensure destruction when going out of scope. (Ross Nicoll)
2014-08-17 10:18:16 +02:00
Wladimir J. van der Laan
2eb3c85c9a
Merge pull request #4663
4975ae1 build: add option for reducing exports (Cory Fields)
2014-08-17 09:29:59 +02:00
Ross Nicoll
5cbda4f10f Changed LevelDB cursors to use scoped pointers to ensure destruction when going out of scope.
This corrects a bug where an exception thrown reading from the database causes the cursor to
be left open, which causes an assertion error to occur when the database is deleted (around
line 938 of init.cpp).
2014-08-16 15:27:18 +01:00
randy-waterhouse
a65668ddc0 build : fix CPPFLAGS for libbitcoin_cli 2014-08-16 10:56:28 +12:00
Cory Fields
4975ae1722 build: add option for reducing exports
Enabled automatically if boost >= 1.49.
See: https://svn.boost.org/trac/boost/ticket/2309

Also, check for a default visibility attribute, so that we can mark future
api functions correctly.
2014-08-15 17:42:53 -04:00
Cory Fields
54c7df81f3 build: Fix boost build on some platforms
When the libpath doesn't line up with the value from config.sub, we don't find
the correct path to boost's libs. This adds a hack to try another path before
giving up.

Should close #3219.
2014-08-15 12:20:15 -04:00
Wladimir J. van der Laan
984ff68c67
Merge pull request #4638
6f2c26a Closely track mempool byte total. Add "getmempoolinfo" RPC. (Jeff Garzik)
2014-08-15 14:09:33 +02:00
Cory Fields
6b099402b4
build: fix automake warnings about the use of INCLUDES
While we're at it, reduce the use of LIBS as well. This makes dependencies
explicit.

Fixes building with (the not-yet-merged) libsecp256k1 as well.

Github-Pull: #4689
Rebased-By: Wladimir J. van der laan <laanwj@gmail.com>
Rebased-From: 909b347 c0e5dda
2014-08-15 10:42:10 +02:00
Jeff Garzik
6f2c26a457 Closely track mempool byte total. Add "getmempoolinfo" RPC.
Goal:  Gain live insight into the mempool.  Groundwork for future work
that caps mempool size.
2014-08-14 12:34:38 -04:00
Jeff Garzik
c7b6117deb Create new signal for notification of new blocks. Use w/ -blocknotify 2014-08-14 12:32:34 -04:00
Jeff Garzik
beb36e800c ui_interface: remove unused NotifyBlocksChanged signal 2014-08-14 12:19:54 -04:00
Cozz Lovan
da2ede2aa6 [Wallet] Improve ReorderTransactions(..) 2014-08-14 16:19:04 +02:00
Wladimir J. van der Laan
7accb7dbad
Merge pull request #4659
c4bae53 [Qt] move SubstituteFonts() above ToolTipToRichTextFilter (Philip Kaufmann)
2014-08-14 15:52:01 +02:00
Cory Fields
616c24307f bitcoin-tx: fix build warnings
Cleans up a bunch of:
warning: missing braces around initializer for ‘const<anonymous struct>’
2014-08-13 11:57:47 -04:00
Peter Todd
9ee09dc64f
Reapply: Reject transactions with excessive numbers of sigops
Reverting was based on a misunderstanding, it appears.

Github-Pull: #4150
2014-08-13 14:37:56 +02:00
Wladimir J. van der Laan
ce094d83ce
Merge pull request #4682
c33b983 Don't poll showmyip.com, it doesn't exist anymore (Wladimir J. van der Laan)
2014-08-13 12:01:03 +02:00
Wladimir J. van der Laan
c33b983903
Don't poll showmyip.com, it doesn't exist anymore
Fixes #4679.

This leaves us with only one candidate, checkip.dyndns.org.
GetMyExternalIP should be phased out as soon as possible.
2014-08-13 12:00:30 +02:00
Wladimir J. van der Laan
3b72fdfb86 Revert "Reject transactions with excessive numbers of sigops"
This reverts commit 4fad8e6d83.
2014-08-12 15:06:20 +02:00
Wladimir J. van der Laan
8ebe42435a
Merge pull request #4150
4fad8e6 Reject transactions with excessive numbers of sigops (Peter Todd)
2014-08-12 14:57:13 +02:00
Wladimir J. van der Laan
e257b7c4c4
Merge pull request #4675
ea100c7 Reduce maximum coinscache size during verification (Wladimir J. van der Laan)
2014-08-12 14:40:59 +02:00
ntrgn
8bfdc9acaa
qt: better looking trayicon
Github-Pull: #4678
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-08-12 13:16:01 +02:00
Wladimir J. van der Laan
4c61ba40b9 build: check for sys/prctl.h in the proper way
Use AC_CHECK_HEADERS to check for the header, and include it only
if detected and the subsequent HAVE_SYS_PRCTL_H is set.
2014-08-12 13:04:55 +02:00
Wladimir J. van der Laan
76c49c4138
Fix thread name setting
Because of a typo, thread names no longer appeared in the overview.

This was broken in 51ed9ec.
2014-08-12 12:24:04 +02:00
Wladimir J. van der Laan
a38a98c476
Merge pull request #4603
f0c2915 Simplify and rename CheckWork to ProcessBlockFound (jtimon)
2014-08-12 11:21:10 +02:00
Wladimir J. van der Laan
a63e86e01d
Merge pull request #4680
a381ee5 Remove unnecessary typedef and script.h include (jtimon)
2014-08-12 08:35:33 +02:00
jtimon
a381ee5d1c Remove unnecessary typedef and script.h include 2014-08-12 02:17:29 +02:00
jtimon
54e658f249 Remove unused CKeyStoreIsMineVisitor 2014-08-12 02:02:17 +02:00
Cozz Lovan
1c5f0af0fd [Qt] Add column Watch-only to transactions list 2014-08-11 21:38:36 +02:00
Cozz Lovan
939ed97373 Add boolean HaveWatchonly and signal NotifyWatchonlyChanged 2014-08-11 18:47:02 +02:00
Wladimir J. van der Laan
d17ce77fc1
Merge pull request #4664
565e569 libc-compat: add new symbol that's now needed (Cory Fields)
8021cf8 build: fix FDELT_TYPE configure check (Cory Fields)
2014-08-11 17:32:27 +02:00
Cozz Lovan
6b5b7cbfb4
Categorize rpc help overview
Conflicts:
	src/rpcserver.cpp

Github-Pull: #4539
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: df3d321
2014-08-11 16:20:40 +02:00
Wladimir J. van der Laan
fecab8773d
Merge pull request #4666
ab45ddb Fix typo in gettransaction help (Derek701)
2014-08-11 15:07:24 +02:00
Wladimir J. van der Laan
3e089a00e7
Merge pull request #4668
9297763 [Qt] Add TRY_LOCK back to peertablemodel (Cozz Lovan)
2014-08-11 15:06:43 +02:00
Wladimir J. van der Laan
85af3856e7
Merge pull request #4622
c7f3876 URLs containing a / after the address no longer cause parsing errors. (Ross Nicoll)
2014-08-11 15:06:19 +02:00
Wladimir J. van der Laan
ea96475d23
build: Add mention of --disable-wallet to bdb48 error messages 2014-08-11 14:42:02 +02:00
Mike Hearn
da2ec100f3 Add a getutxos command to the p2p protocol. It allows querying of the UTXO set
given a set of outpoints.
2014-08-11 13:59:47 +02:00
Wladimir J. van der Laan
ea100c73fa Reduce maximum coinscache size during verification
Due to growing coinsviewcaches, the memory usage with checklevel=3
(and standard settings for dbcache) could be up to 500MiB on a
64-bit system. This is about twice the peak during reindexing,
unnecessarily extending bitcoind's memory envelope.

This commit reduces the maximum total size of the caches used during
verification to just nCoinCacheSize, which should be the limit.
2014-08-11 08:43:06 +02:00
Matt Corallo
a35b55b522 Dont run full check every time we decrypt wallet. 2014-08-10 18:36:07 -07:00
Gregory Maxwell
1e21c17d20 Make CCryptoKeyStore::Unlock check all keys.
CCryptoKeyStore::Unlock has a loop to attempt decrypting each key which
 only executes once, likely due to a simple mistake when the code was
 originally written.

This patch fixes the behavior by making it check all keys. It also adds
 a fatal assertion in the case some decrypt but some do not, since that
 indicates that the wallet is in some kind of really bad state.

This may make unlocking noticeably slower on wallets with many keys.
2014-08-10 18:36:06 -07:00
Philip Kaufmann
22b3c4bbbd remove unused class CAddrMan; from db.h 2014-08-10 14:30:30 +02:00
Cozz Lovan
9297763dad [Qt] Add TRY_LOCK back to peertablemodel 2014-08-10 02:28:23 +02:00
Derek701
ab45ddb599 Fix typo in gettransaction help 2014-08-08 23:13:06 -05:00
Pieter Wuille
eb0b56b190 Simplify serialize.h's exception handling
Remove the 'state' and 'exceptmask' from serialize.h's stream implementations,
as well as related methods.

As exceptmask always included 'failbit', and setstate was always called with
bits = failbit, all it did was immediately raise an exception. Get rid of
those variables, and replace the setstate with direct exception throwing
(which also removes some dead code).

As a result, good() is never reached after a failure (there are only 2
calls, one of which is in tests), and can just be replaced by !eof().

fail(), clear(n) and exceptions() are just never called. Delete them.
2014-08-09 01:43:23 +02:00
Pieter Wuille
216e9a4456 Add a way to limit deserialized string lengths
and use it for most strings being serialized.
2014-08-09 01:37:16 +02:00
Cory Fields
565e569772 libc-compat: add new symbol that's now needed 2014-08-08 15:21:50 -04:00
Ross Nicoll
c7f3876d4a URLs containing a / after the address no longer cause parsing errors. 2014-08-08 19:10:35 +01:00
Philip Kaufmann
b197bf3270 [Qt] disable tray interactions when client model set to 0
- this prevents the ability to fiddle around with the system tray when
  already shutting down (e.g. on slow shutdowns because of a proxy delay)
- extends solution for #4360
2014-08-08 12:13:39 +02:00
Philip Kaufmann
314fbd9ac7 [Qt] use BitcoinGUI::DEFAULT_WALLET constant in bitcoin.cpp 2014-08-08 12:13:27 +02:00
Philip Kaufmann
8ca6a16176 [Qt] ensure all class attributes are init to 0
- in BitcoinGUI and UnitDisplayStatusBarControl
2014-08-08 12:13:26 +02:00
Wladimir J. van der Laan
f5d99075bf
Merge pull request #4635
6c23b08 CCoinsKeyHasher::operator() should return size_t (Wladimir J. van der Laan)
2014-08-08 11:28:21 +02:00
Philip Kaufmann
c4bae53092 [Qt] move SubstituteFonts() above ToolTipToRichTextFilter
- doesn't belong to the ToolTipToRichTextFilter class so move it up
2014-08-08 11:04:35 +02:00
Philip Kaufmann
94e1b9e05b [Qt] re-work overviewpage UI
- ensure normal and watch-only stuff looks consistent
- simplify UI by removing unneeded UI layout elements
- change some comments to watch-only from watchonly
2014-08-08 09:58:58 +02:00
Wladimir J. van der Laan
3181986d7e
Merge pull request #4636
efd6b87 small net cleanup (Philip Kaufmann)
2014-08-08 09:30:19 +02:00
Philip Kaufmann
efd6b87811 small net cleanup
- add comment for disabling sigpipe
- add closing comment in compat.h
- remove redundant check in net.h
2014-08-08 07:40:45 +02:00
ntrgn
c4a77090c4 Fixes ignored qt 4.8 codecs path on windows when configuring with --with-qt-libdir 2014-08-07 20:02:35 +02:00
Cory Fields
292cc072f3 qt: fix unicode character display on osx when building with 10.7 sdk 2014-08-07 12:34:53 -04:00
Wladimir J. van der Laan
003bbd5f76
Merge pull request #4645
6b271a3 build: fix race in 'make deploy' for windows (Cory Fields)
d343460 build: Fix 'make deploy' when binaries haven't been built yet (Cory Fields)
206a7f9 build: hook up qt translations for static osx packaging (Cory Fields)
d597219 build: add --with-qt-translationdir to configure for use with static qt (Cory Fields)
71941ce build: teach macdeploy the -translations-dir argument, for use with static qt (Cory Fields)
f8120f7 build: Find the proper xcb/pcre dependencies (Cory Fields)
eccd585 build: silence mingw fpic warning spew (Cory Fields)
a98356f build: don't let libtool insert rpath into binaries (Cory Fields)
2014-08-07 12:48:19 +02:00
Wladimir J. van der Laan
0b588168ab
Merge pull request #4640
733177e Remove size limit in RPC client, keep it in server (Wladimir J. van der Laan)
e17151a Avoid a copy in RPC output (Wladimir J. van der Laan)
2014-08-07 10:50:37 +02:00
Wladimir J. van der Laan
6c23b08203
CCoinsKeyHasher::operator() should return size_t
It currently returns uint64_t, which on older boost (at least 1.46) causes
test failures on 32-bit systems.

This problem was introduced in bc42503.

Fixes #4634.
2014-08-07 09:28:37 +02:00
Cory Fields
d597219d6d build: add --with-qt-translationdir to configure for use with static qt 2014-08-06 19:29:19 -04:00
Cory Fields
f8120f7e0f build: Find the proper xcb/pcre dependencies 2014-08-06 19:29:18 -04:00
Wladimir J. van der Laan
8833acc4c9
Merge pull request #4498
2887bff Update coding style and add .clang-format (Pieter Wuille)
2014-08-06 17:17:32 +02:00
Wladimir J. van der Laan
e05d72055a
qt: bitcoin_en update after 8d0d512 2014-08-06 16:12:37 +02:00
Wladimir J. van der Laan
607758db93
Merge pull request #4631
a409467 more Bitcoin -> Bitcoin Core string changes (Philip Kaufmann)
2014-08-06 16:10:19 +02:00
Wladimir J. van der Laan
5f1b76aaf0
Merge pull request #4615
283a3b8 small ordering cleanup of init help message (Philip Kaufmann)
2014-08-06 16:00:39 +02:00
Wladimir J. van der Laan
9db9257ac4
Merge pull request #4629
ead6737 [Qt] format ping times in peers tab as ms (Philip Kaufmann)
2014-08-06 15:48:01 +02:00
Wladimir J. van der Laan
733177ebd3 Remove size limit in RPC client, keep it in server
The size limit makes a lot of sense for the server, as it never has to
accept very large data.

The client, however, can request arbitrary amounts of data with
`listtransactions` on a large wallet.

Fixes #4604.
2014-08-06 13:03:58 +02:00
Wladimir J. van der Laan
e17151ad2a Avoid a copy in RPC output
Split up HTTPReply into HTTPReply and HTTPReplyHeader, so that
the message data can be streamed directly.

Also removes a c_str(), which would have prevented binary
output with NUL characters in it.
2014-08-06 13:01:49 +02:00
ntrgn
9ce0774aba
build: Fix windows configure when using --with-qt-libdir
fixes #4630

Github-Pull: #4633
2014-08-05 15:01:33 +02:00
Philip Kaufmann
a409467e14 more Bitcoin -> Bitcoin Core string changes 2014-08-04 21:09:38 +02:00
Philip Kaufmann
ead6737b87 [Qt] format ping times in peers tab as ms
- also align ping times to the right
2014-08-04 19:23:57 +02:00
Wladimir J. van der Laan
8d0d512bde
Merge pull request #4606
bd0aa10 Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution. (Doug)
2014-08-04 17:16:12 +02:00
Jeff Garzik
70b9d36a2c
Log "version" message IP addresses in client connect summary
The only other method of logging remote addresses is via

     -logips=1 -debug=net

which increases the logged activity by 100x or more.

Github-Pull: #4608
Amended-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-08-04 16:59:28 +02:00
Wladimir J. van der Laan
2497209b77
Merge pull request #4598
e59441f Process fee estimate file into temporary vector first to let sanity checking complete. (Alex Morcos)
961ae93 Fix minor bug which only affected log messages. (Alex Morcos)
17f1567 Fixed a bug with index bounds checking (Alex Morcos)
2014-08-04 16:45:29 +02:00
Wladimir J. van der Laan
488a616439
qt: Demote ReportInvalidCertificate message to qDebug
Too spammy.
2014-08-04 16:41:42 +02:00
Philip Kaufmann
a5b2d9c82e [Qt] tweak new peers tab in console window
- remove starting height as table header and replace with ping time
- remove columnResizingFixer
- add local address (if available) in detailed node view (on top of the
  right view below the remote address)
- remove some .c_str() by using QString::fromStdString()
- rename Address to Address/Hostname
- rename secs to just s for ping time
- use MODEL_UPDATE_DELAY from guiconstants.h for the peer refresh time
- make PeerTableModel::columnCount() return no hard-coded value
- remove and cleanup dup private: section in RPCConsole header
- add new defaults for column sizes
- remove behaviour which keeps disconnected peers selected and also remove
  code which keeps track of last selected peer stats
- add sync height to detail view
- add some additional NULL pointer checks for clientModel in
  rpcconsole.cpp
2014-08-04 15:46:18 +02:00
Wladimir J. van der Laan
d97a58f883
Merge pull request #4582
a60120e Add built-in seeds for .onion (Wladimir J. van der Laan)
2014-08-04 12:15:10 +02:00
pryds
2b410c2fe1 Typo, and a few "Bitcoin" -> "Bitcoin Core"
Github-Pull: #4619
2014-08-04 10:30:59 +02:00
Daniel Kraft
b33bd7a3be Implement "getchaintips" RPC command to monitor blockchain forks.
Port over https://github.com/chronokings/huntercoin/pull/19 from
Huntercoin:  This implements a new RPC command "getchaintips" that can be
used to find all currently active chain heads.  This is similar to the
-printblocktree startup option, but it can be used without restarting
just via the RPC interface on a running daemon.
2014-08-03 18:12:19 +02:00
Wladimir J. van der Laan
a60120e951 Add built-in seeds for .onion
This makes it possible for a node with `-onlynet=tor` to bootstrap
itself.

It also adds the base infrastructure for adding IPv6 seed nodes.

Also represent IPv4 fixed seed addresses in 16-byte format.
2014-08-03 17:26:27 +02:00
Wladimir J. van der Laan
6278bd57c6
Merge pull request #4602
6fd59ee script.h: set_vch() should shift a >32 bit value (Jeff Garzik)
2014-08-03 17:09:23 +02:00
Wladimir J. van der Laan
b4c61f878c
Merge pull request #4610
bdba2dd qt: Remove an obscure option no-one cares about (Wladimir J. van der Laan)
2014-08-03 17:08:57 +02:00
Jeff Garzik
1045452fa5
Merge branch 'whyextern' of git://github.com/jtimon/bitcoin into merge-whyextern 2014-08-01 22:45:58 -04:00
jtimon
f5745fa52a Declare SignatureHash() in script.h 2014-08-01 17:45:09 +02:00
Jeff Garzik
de89257fc5
Merge branch 'merge-rawtx2' into merge-rawtx3 2014-08-01 06:18:58 -04:00
Philip Kaufmann
2b600992e8 add license header to core_io.h, core_read/_write.cpp 2014-08-01 08:39:06 +02:00
Philip Kaufmann
1b73d36b2c fix compilation error in core_io.h
- error: 'vector' in namespace 'std' does not name a type
- add <vector> include in core_io.h
- remove <vector> includes from core_read.cpp and core_write.cpp
2014-08-01 08:38:23 +02:00
Philip Kaufmann
283a3b88b6 small ordering cleanup of init help message 2014-08-01 08:04:46 +02:00
Wladimir J. van der Laan
9fcb410195
qt: Remove '0 BTC' placeholder from translation 2014-08-01 07:51:24 +02:00
Wladimir J. van der Laan
c0e9548b63
qt: more watchonly -> watch-only 2014-07-31 17:19:05 +02:00
Wladimir J. van der Laan
bd26fee10b
qt: Update some messages after suggestions by translators
- *cannot* is more common, thus preferred to *can not*
- Use *Watch-only* instead of *Watchonly* as one word
2014-07-31 16:58:23 +02:00
Wladimir J. van der Laan
84c5f77deb
English translation update
This is needed to add version 0.10.x on Transifex so that translation
can start.
2014-07-31 15:03:03 +02:00
Wladimir J. van der Laan
b7bba43a14
Merge pull request #4560
d2d9dc0 script tests: add tests for CHECKMULTISIG limits (Otto Allmendinger)
89101c6 script test: test case for 5-byte bools (Otto Allmendinger)
4cac5db script tests: value with trailing 0x00 is true (Otto Allmendinger)
833ff16 script tests: values that overflow to 0 are true (Otto Allmendinger)
0072d98 script tests: BOOLAND, BOOLOR decode to integer (Otto Allmendinger)
ed02282 additional test for OP_SIZE in script_valid.json (Otto Allmendinger)
2014-07-31 09:42:00 +02:00
Wladimir J. van der Laan
2870014f3a
Merge pull request #4568
9c34731 CBloomFilter::clear() method (Tom Harding)
2014-07-31 09:25:20 +02:00
Wladimir J. van der Laan
bdba2dd000
qt: Remove an obscure option no-one cares about
Remove the "Display addresses" setting checkbox. It doesn't do what
the tooltip says, and seems kind of pointless in any case.

Fixes #4580.
2014-07-31 09:10:58 +02:00
Jeff Garzik
c7614f16d6
univalue: remove unused methods getArray, getObject 2014-07-30 23:25:30 -04:00
Jeff Garzik
a715a643bc
Merge branch 'rawtx' into merge-rawtx 2014-07-30 23:17:19 -04:00
Pieter Wuille
e8cb5c30b0
Merge pull request #4497
714a3e6 Only keep setBlockIndexValid entries that are possible improvements (Pieter Wuille)
2014-07-31 00:07:47 +02:00
Doug
bd0aa10519 Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution. 2014-07-30 16:04:40 -04:00
Wladimir J. van der Laan
075cf49e59 Add GetNetworkName function
Returns the network name for an Network enum.
2014-07-30 15:41:17 +02:00
Wladimir J. van der Laan
c91a9471be Add IsReachable(net) function
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).
2014-07-30 15:41:17 +02:00
Wladimir J. van der Laan
60dc8e4208 Allow -onlynet=onion to be used
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.
2014-07-30 15:38:58 +02:00
Wladimir J. van der Laan
efec4ec6c5
Merge pull request #4593
d70bc52 Rework block processing benchmark code (Pieter Wuille)
2014-07-30 11:06:33 +02:00
jtimon
f0c2915f66 Simplify and rename CheckWork to ProcessBlockFound 2014-07-30 02:26:21 +02:00
Alex Morcos
e59441f086 Process fee estimate file into temporary vector first to let sanity checking complete. 2014-07-29 13:58:08 -04:00
Jeff Garzik
6fd59ee897 script.h: set_vch() should shift a >32 bit value
Source: http://www.viva64.com/en/b/0268/
2014-07-29 11:24:26 -04:00
Jeff Garzik
cbe39a3852 Add "bitcoin-tx" command line utility and supporting modules.
This is a simple utility that provides command line manipulation of
a hex-encoded TX. The utility takes a hex string on the command line
as input, performs zero or more mutations, and outputs a hex string
to standard output.

This utility is also an intentional exercise of the "bitcoin library"
concept. It is designed to require minimal libraries, and works
entirely without need for any RPC or P2P communication.

See "bitcoin-tx --help" for command and options summary.
2014-07-29 11:13:27 -04:00
Jeff Garzik
3ce7e669e3 bitcoin-cli, rpcrawtransaction: harmonize "{" styling 2014-07-29 11:13:27 -04:00
Cory Fields
2a5840096f core_read's ParseScript(): minor cleanups
- use .empty() rather than .size() == 0
- use a const_iterator rather than BOOST_FOREACH
- validate iterators before creating a string from them
2014-07-29 11:13:27 -04:00
Jeff Garzik
b2aeaa7939 Move ParseScript() helper, becoming accessible outside src/test/ 2014-07-29 11:13:27 -04:00
Jeff Garzik
ae775b5b31 Consolidate CTransaction hex encode/decode into core_io.h, core_{read,write}.cpp 2014-07-29 11:13:27 -04:00
Jeff Garzik
2e7009d67b Avoid querying DNS seeds, if we have open connections.
The goal is to increase independence and privacy.
2014-07-29 11:04:46 -04:00
Pieter Wuille
2887bffcfd Update coding style and add .clang-format 2014-07-28 22:08:13 +02:00
Wladimir J. van der Laan
f9de17ec2f
Add warning comment to getinfo
Warn that people should not add new information, or change current
information returned by getinfo.
2014-07-28 19:30:58 +02:00
Alex Morcos
961ae93c85 Fix minor bug which only affected log messages. 2014-07-28 10:52:54 -04:00
Wladimir J. van der Laan
826d07101c
Merge pull request #4597
d817187 [Qt] remove ProxySocksVersion from OptionID (Philip Kaufmann)
2014-07-28 14:55:58 +02:00
Wladimir J. van der Laan
0449a17e41
Merge pull request #4541
125fba1 Add a new checkpoint at block 295,000 (Trevin Hofmann)
2014-07-28 14:54:08 +02:00
Philip Kaufmann
d817187bdb [Qt] remove ProxySocksVersion from OptionID
- we only support SOCKS5, so remove it
2014-07-28 14:47:27 +02:00
Wladimir J. van der Laan
aaa7076937
Merge pull request #4531
ebdcc36 Add helptexts for -whitelist and rpc prioritisetransaction and switch to bitcoin instead of satoshis (Cozz Lovan)
2014-07-28 14:37:40 +02:00
Wladimir J. van der Laan
c5eabde9ea
Merge pull request #4491
eaedb59 net: add SetSocketNonBlocking() as OS independent wrapper (Philip Kaufmann)
2014-07-28 14:05:54 +02:00
Alex Morcos
17f15678d3 Fixed a bug with index bounds checking 2014-07-27 21:41:13 -04:00
Pieter Wuille
d70bc52ee3 Rework block processing benchmark code
* Replace -benchmark (and the related fBenchmark) with a regular debug option, -debug=bench.
* Increase coverage and granularity of individual block processing steps.
* Add cummulative times.
2014-07-27 00:41:03 +02:00
Philip Kaufmann
f65352a7d0 [Qt] small Qt-only include cleanup 2014-07-25 17:43:41 +02:00
Wladimir J. van der Laan
3955c3940e
Merge pull request #4584
0430c30 Add missing FindNode prototype to net.h (Wladimir J. van der Laan)
2014-07-25 11:06:11 +02:00
Wladimir J. van der Laan
32235a3bb9
Merge pull request #4567
f469f79 remove an unneded .c_str() in OpenNetworkConnection() (Philip Kaufmann)
2014-07-25 11:04:48 +02:00
Wladimir J. van der Laan
93659379bd
Add comment about never updating nTimeOffset past 199 samples
Refer to issue #4521 for details.
2014-07-24 19:00:24 +02:00
Wladimir J. van der Laan
0430c30af1 Add missing FindNode prototype to net.h
Also make the argument a const std::string & instead of pass-by-value.
2014-07-24 17:28:47 +02:00
Wladimir J. van der Laan
70d0325999
Merge pull request #4496
5734d4d Only remove actualy failed blocks from setBlockIndexValid (Pieter Wuille)
2014-07-24 16:55:48 +02:00
Wladimir J. van der Laan
7eb3d6152f
Merge pull request #4575
ad08d0b Bugfix: make CCoinsViewMemPool support pruned entries in underlying cache (Pieter Wuille)
2014-07-24 16:46:38 +02:00
paveljanik
ab651b2d62
Fix typos in comments (missing i's). 2014-07-24 16:08:59 +02:00
Wladimir J. van der Laan
29eaa31694 ui: Make sure sendcoinsentry signals only connected once
Move signal connections to constructor where possible.
2014-07-23 17:58:47 +02:00
Wladimir J. van der Laan
2a05101efd qt: Remove unused functions from BitcoinUnits
Remove two functions that are now unused.
2014-07-23 17:58:46 +02:00
Wladimir J. van der Laan
91cce1732b qt: Use fixed-point arithmetic in amount spinbox
Fixes various issues and cleans up code

- Fixes issue #4500: Amount widget +/- has floating point rounding artifacts
- Amount box can now be emptied again, without clearing to 0

Also aligns the amount to the right, as in other places.
2014-07-23 17:58:46 +02:00
Pieter Wuille
ad08d0b95b Bugfix: make CCoinsViewMemPool support pruned entries in underlying cache 2014-07-23 15:40:52 +02:00
Wladimir J. van der Laan
afa71fb3e3
Harmonize importprivkey and importaddress documentation 2014-07-22 08:58:49 +02:00
Tom Harding
9c347313f7 CBloomFilter::clear() method 2014-07-21 11:50:07 -07:00
Philip Kaufmann
f469f79ff8 remove an unneded .c_str() in OpenNetworkConnection() 2014-07-21 15:00:42 +02:00
Wladimir J. van der Laan
8f3f94a470 Revert "CBloomFilter::clear() method"
This reverts commit 8fbf03995d.
2014-07-21 07:46:34 +02:00
Wladimir J. van der Laan
98e84aae7a Revert "Relay double-spends, subject to anti-DOS"
This reverts commit d640a3ceab.
2014-07-21 07:46:34 +02:00
Wladimir J. van der Laan
3015e0bca6 Revert "UI to alert of respend attempt affecting wallet."
This reverts commit ada5a067c7.

Conflicts:
	src/qt/guiconstants.h
	src/wallet.h
2014-07-21 07:46:33 +02:00
Wladimir J. van der Laan
39d3f2cb40 Revert "Add -respendnotify option and new RPC data"
This reverts commit 9004798e62.
2014-07-21 07:46:33 +02:00
Wladimir J. van der Laan
ad26dc9c31 Revert "Formatting, spelling, comment fixes."
This reverts commit 7a19efe040.
2014-07-21 07:46:33 +02:00
Wladimir J. van der Laan
cd057bfd41 Revert "Check signatures before respend relay"
This reverts commit 88dd3598d2.
2014-07-21 07:46:33 +02:00
Wladimir J. van der Laan
67cc8f25c2 Revert "Remove signal DoubleSpendDetected, use function"
This reverts commit 0da6b3fd18.
2014-07-21 07:46:33 +02:00
Wladimir J. van der Laan
0de61e7585
qt: Move SplashFinished to after ClientModel/WalletModel creation
With a large wallet there was a noticable gap between hiding of the
splash and showing the main window.
2014-07-20 13:50:42 +02:00
Cozz Lovan
027dcdc792 [Qt] Fix thin space in URI 2014-07-20 04:17:02 +02:00
Wladimir J. van der Laan
ff1fe669d4
Merge pull request #3939
3da434a Introduce option to disable relay/mining of bare multisig scripts in TX outputs (Jeff Garzik)
2014-07-18 23:29:50 +02:00
Whit J
b9345f7d1c
qt: Make error message for failed export a little friendlier
Closes #4528.
2014-07-18 23:21:50 +02:00
Otto Allmendinger
d2d9dc063f script tests: add tests for CHECKMULTISIG limits 2014-07-18 17:55:06 +02:00
Jeff Garzik
3da434a2ef Introduce option to disable relay/mining of bare multisig scripts in TX outputs
First and foremost, this defaults to OFF.

This option lets a node consider such transactions non-standard,
meaning they will not be relayed or mined by default, but other miners
are free to mine these as usual.
2014-07-18 10:16:47 -04:00
Otto Allmendinger
89101c6e78 script test: test case for 5-byte bools 2014-07-18 15:41:45 +02:00
Wladimir J. van der Laan
40d2d69223
Merge pull request #4167
7149499 Add comments re BitcoinUnits::formatWithUnit/formatHtmlWithUnit (Roy Badami)
f7d70c6 Remove unused fAlign argument from BitcoinUnits::format and friends (Roy Badami)
2e4fee2 Show bitcoin quantities with full precision, even in the presence of trailing zeros (Roy Badami)
7007402 Implement SI-style (thin space) thoudands separator (Roy Badami)
2014-07-18 13:59:26 +02:00
Wladimir J. van der Laan
5bb765507b
Fix a signed/unsigned warning introduced in 1b4568c
vout counter must be unsigned.
2014-07-18 13:24:38 +02:00
Wladimir J. van der Laan
eaa9400781
Merge pull request #4255
1b4568c Add vout to ListTransactions output (Cozz Lovan)
2014-07-18 12:57:06 +02:00
Otto Allmendinger
4cac5dbf83 script tests: value with trailing 0x00 is true 2014-07-18 12:55:46 +02:00
Wladimir J. van der Laan
773c1f297b
Merge pull request #4554
2d89ea9 build: fix whitespace in pkg-config variable (Cory Fields)
ab123ad build: allow linux and osx to build against static qt5 (Cory Fields)
2014-07-18 11:39:18 +02:00
Otto Allmendinger
833ff161bc script tests: values that overflow to 0 are true 2014-07-18 11:02:28 +02:00
Otto Allmendinger
0072d98849 script tests: BOOLAND, BOOLOR decode to integer
unlike other boolean checks, arguments >5 bytes invalidate the script
2014-07-18 10:53:09 +02:00
Wladimir J. van der Laan
d3cb2b8acf
Merge pull request #4551
c994d2e prevent SOCKET leak in BindListenPort() (Philip Kaufmann)
2014-07-18 10:45:48 +02:00
Otto Allmendinger
ed02282bba additional test for OP_SIZE in script_valid.json 2014-07-18 10:29:49 +02:00
Wladimir J. van der Laan
a2404cec27
Merge pull request #4553
1e72d5c build: silence false errors during make clean (Cory Fields)
2014-07-18 09:28:42 +02:00
Cory Fields
2d89ea9781 build: fix whitespace in pkg-config variable
Useful for PKG_CONFIG="pkg-config --static"
2014-07-17 22:15:21 -04:00
Cory Fields
ab123ad4d6 build: allow linux and osx to build against static qt5
This is the first part of a huge effort to rework the handling of dependencies.
To start, this change allows all supported platforms to build against a static
Qt. 5.2.1 and 5.3 have been successfully tested against osx64, win32, win64,
linux32, and linux64.

It also makes a small change to the windows config, to allow linking against
qt builds with or without built-in libjpeg/libpng/libpcre/libz.

The actual build processes to take advantage of these changes (for gitian and
pull-tester) are coming soon. Until then, this should be a no-op.
2014-07-17 22:13:40 -04:00
Cory Fields
1e72d5c033 build: silence false errors during make clean 2014-07-17 22:03:27 -04:00
Cozz Lovan
acd432b5b3 [Qt] Prevent balloon-spam after rescan 2014-07-18 03:39:00 +02:00
Philip Kaufmann
c994d2e769 prevent SOCKET leak in BindListenPort()
- the call to CloseSocket() is placed after the WSAGetLastError(), because
  a CloseSocket() can trigger an error also, which we don't want for the
  logging in this two cases
2014-07-17 22:49:23 +02:00
Philip Kaufmann
eaedb59e05 net: add SetSocketNonBlocking() as OS independent wrapper 2014-07-17 22:12:44 +02:00
Wladimir J. van der Laan
e8d4cb8071
Merge pull request #4504
43f510d Convert closesocket 'compat wrapper' to function in netbase (Wladimir J. van der Laan)
2014-07-17 16:33:58 +02:00
Pieter Wuille
fb203cab40
Merge pull request #4508
b069750 Break up CAddrMan's IMPLEMENT_SERIALIZE (Pieter Wuille)
2014-07-17 16:17:36 +02:00
Wladimir J. van der Laan
43f510d37d Convert closesocket 'compat wrapper' to function in netbase
Simpler alternative to #4348.

The current setup with closesocket() is strange. It poses
as a compatibility wrapper but adds functionality.

Rename it and make it a documented utility function in netbase.

Code movement only, zero effect on the functionality.
2014-07-17 15:46:25 +02:00
Philip Kaufmann
7de3f1cfd6 fix help message for RPC getpeerinfo 2014-07-17 15:10:29 +02:00
Wladimir J. van der Laan
ea8c288a35
Merge pull request #4533
43005cf Fix semantic typo in state.CorruptionPossible check (kazcw)
2014-07-17 13:57:51 +02:00
Wladimir J. van der Laan
66f3d0679f
Merge pull request #4534
33357b2 qt: Start core thread only when needed (Wladimir J. van der Laan)
c715ff5 ui: Replace some LogPrintfs with qDebug() (Wladimir J. van der Laan)
96ff9d6 Can't log to debug log before chain params initialized (Wladimir J. van der Laan)
2014-07-17 13:51:55 +02:00
Pieter Wuille
09c744c2a8 Make sure CAutoFile for fees estimate goes out of scope 2014-07-16 21:46:01 +02:00
Pieter Wuille
b069750d3f Break up CAddrMan's IMPLEMENT_SERIALIZE 2014-07-16 21:14:26 +02:00
R E Broadley
604ee2aa7d Remove tx from AlreadyAskedFor list once we receive it, not when we process it. 2014-07-16 18:00:34 +07:00
Trevin Hofmann
125fba1b48 Add a new checkpoint at block 295,000
Block 295,000 seems to meet the criteria of a reasonable timestamp and
no strange transactions. 295,000 is the current block height in the
bootstrap.dat torrent provided by jgarzik.
2014-07-15 19:13:24 -05:00
Wladimir J. van der Laan
33357b27a0
qt: Start core thread only when needed
Start the core thread only when needed for initialization
or shutdown.

Avoids a bit of overhead, and also avoids spamming two
log messages before logging is properly initialized.
2014-07-15 16:27:47 +02:00
Gregory Maxwell
c4a321f5c6 Add peerid to getpeerinfo to allow correlation with the logs.
This seems to have been missed in 3764.
2014-07-15 07:13:10 -07:00
Cozz Lovan
1b4568cb0f Add vout to ListTransactions output 2014-07-15 15:50:33 +02:00
Wladimir J. van der Laan
c715ff52c7 ui: Replace some LogPrintfs with qDebug()
These are relatively unimportant messages, so don't need to be logged
without -debug=ui.
2014-07-15 10:26:50 +02:00
Wladimir J. van der Laan
96ff9d6403 Can't log to debug log before chain params initialized
Add a function `AreBaseParamsConfigured` and use this to check
before writing to the debug log. This avoids assertions when the
application happens to log too early, which happens in the GUI.

Messages logged before the base parameters are configured can be
shown using `-printtoconsole`.
2014-07-15 10:26:44 +02:00
Wladimir J. van der Laan
2c0f019bfc
Merge pull request #4505
d4d3fbd Do not flush the cache after every block outside of IBD (Pieter Wuille)
2014-07-15 09:14:33 +02:00
Cozz Lovan
ebdcc360b6 Add helptexts for -whitelist and rpc prioritisetransaction and switch to bitcoin instead of satoshis 2014-07-15 05:20:52 +02:00
kazcw
43005cffa3 Fix semantic typo in state.CorruptionPossible check
state.Invalid() is always false, check should be IsInvalid()

Broken since 942b33a
2014-07-14 19:57:43 -07:00
Pieter Wuille
bc42503f6a Use unordered_map for CCoinsViewCache with salted hash 2014-07-14 16:13:08 +02:00
Rune K. Svendsen
bdd5b587fc
Add option to disable 077 umask (create new files with system default umask)
The option is only effective for either wallet-less builds or if
-disablewallet is specified as well.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 34d5fc0 4e1a196 bd4307b d53a33b 7e09b36
Github-Pull: #4286
2014-07-14 13:58:57 +02:00
JaSK
d512534cd7 Fixed error in 'getbalance' when using watchonly addresses. 2014-07-14 13:01:06 +02:00
Wladimir J. van der Laan
6513a9f703
Merge pull request #4400
4eedf4f make RandAddSeed() use OPENSSL_cleanse() (Philip Kaufmann)
6354935 move rand functions from util to new random.h/.cpp (Philip Kaufmann)
001a53d add GetRandBytes() as wrapper for RAND_bytes() (Philip Kaufmann)
2014-07-14 11:35:30 +02:00
Wladimir J. van der Laan
d4bed1a6d3
Merge pull request #4524
49d5712 qt: Ignore showNormalIfMinimized in initialization or shutdown (Wladimir J. van der Laan)
2014-07-14 11:33:30 +02:00
Wladimir J. van der Laan
0f491f806a
Merge pull request #4513
6265ecc Clarify that redeemScript is often optional (Zak Wilcox)
2014-07-14 11:09:32 +02:00
Wladimir J. van der Laan
b5280c31db
Merge pull request #4518
76fd7b8 [Qt] Fix segfault when launched with -disablewallet (Cozz Lovan)
2014-07-14 11:08:29 +02:00
Wladimir J. van der Laan
49d57125f9
qt: Ignore showNormalIfMinimized in initialization or shutdown
Also get rid of ui_interface flag NOSHOWGUI. It's up to the GUI to
decide this.

Fixes #4360.
2014-07-14 10:49:12 +02:00
Wladimir J. van der Laan
c9bc398ad9
Merge pull request #4378
dc942e6 Introduce whitelisted peers. (Pieter Wuille)
2014-07-14 10:23:39 +02:00
Wladimir J. van der Laan
77ed583f0f
Merge pull request #4520
39cc492 Fix Watchonly: cs_main lock not held (Cozz Lovan)
2014-07-14 08:50:29 +02:00
Wladimir J. van der Laan
3554df9b99
Merge pull request #4503
b45a6e8 Add test for getblocktemplate longpolling (Wladimir J. van der Laan)
ff6a7af getblocktemplate: longpolling support (Luke Dashjr)
2014-07-14 08:29:46 +02:00
Peter Todd
4fad8e6d83
Reject transactions with excessive numbers of sigops 2014-07-13 10:12:49 -04:00
Cozz Lovan
39cc4922fe Fix Watchonly: cs_main lock not held 2014-07-13 09:33:45 +02:00
Cozz Lovan
e3496da730 [Qt] Fix No such slot UnitDisplayStatusBarControl::onDisplayUnitsClicked 2014-07-13 08:36:40 +02:00
Cozz Lovan
76fd7b8c26 [Qt] Fix segfault when launched with -disablewallet 2014-07-13 07:43:01 +02:00
Pieter Wuille
29ef389514
Merge pull request #4511
a7e1d50 In -? output: -keypool, -gen, -genproclimit depend on ENABLE_WALLET (Zak Wilcox)
2014-07-13 01:25:30 +02:00
Pieter Wuille
0f2f2b38d0
Merge pull request #4177
cd01a5e Enable paranoid corruption checks in LevelDB >= 1.16 (Pieter Wuille)
2014-07-12 19:44:19 +02:00
Zak Wilcox
6265ecc87f Clarify that redeemScript is often optional 2014-07-12 09:21:02 +01:00
Zak Wilcox
a7e1d503c4 In -? output: -keypool, -gen, -genproclimit depend on ENABLE_WALLET 2014-07-12 06:43:41 +01:00
Pieter Wuille
d4d3fbd828 Do not flush the cache after every block outside of IBD 2014-07-11 16:44:53 +02:00
Pieter Wuille
714a3e6505 Only keep setBlockIndexValid entries that are possible improvements 2014-07-11 15:59:32 +02:00
Wladimir J. van der Laan
6c37f7fd78 getrawchangeaddress should fail when keypool exhausted
An user on IRC reported an issue where `getrawchangeaddress`
keeps returning a single address when the keypool is exhausted.
In my opinion this is strange behaviour.

- Change CReserveKey to fail when running out of keys in the keypool.
- Make `getrawchangeaddress` return RPC_WALLET_KEYPOOL_RAN_OUT when
  unable to create an address.
- Add a Python RPC test for checking the keypool behaviour in combination
  with encrypted wallets.
2014-07-11 15:24:29 +02:00
Wladimir J. van der Laan
6ad2c2402e
Merge pull request #4507
b60be6b Clean up RPCs that are disabled in safe-mode. (Gregory Maxwell)
2014-07-11 15:16:33 +02:00
Luke Dashjr
ff6a7af154 getblocktemplate: longpolling support 2014-07-11 14:48:02 +02:00
Gregory Maxwell
b60be6be4a Clean up RPCs that are disabled in safe-mode.
This removes some inconsistencies in what worked and didn't work in
 safemode. Now only RPCs involved in getting balances or sending
 funds are disabled.

Previously you could mine but not submit blocks— but we may need more
 blocks to resolve a fork that triggered safe mode in the first place,
 and the non-submission was not reliable since some miners submit
 blocks via multiple means. There were also a number of random commands
 disabled that had nothing to do with the blockchain like verifymessage.

Thanks to earlz for pointing out that there were some moderately cheap
 ways to maliciously trigger safe mode, which brought attention to
 the fact that safemode wasn't used in a very intelligent way.
2014-07-10 10:35:48 -07:00
Ruben Dario Ponticelli
954d2e7201
Avoid a segfault on getblock if it can't read a block from disk. 2014-07-10 00:34:18 -03:00
Pieter Wuille
dc942e6f27 Introduce whitelisted peers.
This adds a -whitelist option to specify subnet ranges from which peers
that connect are whitelisted. In addition, there is a -whitebind option
which works like -bind, except peers connecting to it are also
whitelisted (allowing a separate listen port for trusted connections).

Being whitelisted has two effects (for now):
* They are immune to DoS disconnection/banning.
* Transactions they broadcast (which are valid) are always relayed,
  even if they were already in the mempool. This means that a node
  can function as a gateway for a local network, and that rebroadcasts
  from the local network will work as expected.

Whitelisting replaces the magic exemption localhost had for DoS
disconnection (local addresses are still never banned, though), which
implied hidden service connects (from a localhost Tor node) were
incorrectly immune to DoS disconnection as well. This old
behaviour is removed for that reason, but can be restored using
-whitelist=127.0.0.1 or -whitelist=::1 can be specified. -whitebind
is safer to use in case non-trusted localhost connections are expected
(like hidden services).
2014-07-09 20:40:14 +02:00
Pieter Wuille
5734d4d1e6 Only remove actualy failed blocks from setBlockIndexValid 2014-07-09 18:30:44 +02:00
Wladimir J. van der Laan
e28c1ae75d
Merge pull request #4428
00d1980 init.cpp: log fee estimates filename on error (Philip Kaufmann)
2014-07-09 16:50:58 +02:00
Wladimir J. van der Laan
52a7d52ffb
Merge pull request #4340
33cc907 Add DNS seed of open-nodes.org (kevin)
2014-07-09 12:00:16 +02:00
Philip Kaufmann
4eedf4ffee make RandAddSeed() use OPENSSL_cleanse()
- removes the cstring include and is also used in RandAddSeedPerfmon()
2014-07-09 09:43:55 +02:00
Philip Kaufmann
6354935c48 move rand functions from util to new random.h/.cpp 2014-07-09 09:42:19 +02:00
Philip Kaufmann
001a53d742 add GetRandBytes() as wrapper for RAND_bytes()
- add a small wrapper in util around RAND_bytes() and replace with
  GetRandBytes() in the code to log errors from calling RAND_bytes()
- remove OpenSSL header rand.h where no longer needed
2014-07-09 09:42:18 +02:00
Philip Kaufmann
00d1980b8f init.cpp: log fee estimates filename on error
- small changes to Shutdown(), buffer __func__, which is now used in
  all LogPrintf() calls and format for better readability
- order using namespace alpabetically
2014-07-09 09:22:36 +02:00
Wladimir J. van der Laan
2ee918d121
Merge pull request #4275
509f926 Payment request parsing on startup now only changes network if a valid network name is specified. (Ross Nicoll)
2014-07-09 08:47:16 +02:00
Ross Nicoll
509f926e80 Payment request parsing on startup now only changes network if a valid network name is specified. 2014-07-08 22:10:46 +01:00
Cory Fields
575e70c0c6 build: fix win32 static linking after libtool merge
Libtool eats the -static flag rather than passing it along to the compiler. To
get the same effect, -all-static is used instead.
2014-07-08 15:53:53 -04:00
Cory Fields
9a427da116 build: re-add AM_LDFLAGS where it's overridden
using _LDFLAGS replaces AM_LDFLAGS rather than adding to it.
2014-07-08 15:52:29 -04:00
Wladimir J. van der Laan
418d4ad110
Merge pull request #4479
109849e Bugfix: strerror_r can return an error, and if it does, POSIX does not specify the content of the buffer (Luke Dashjr)
2014-07-08 13:35:56 +02:00
Cozz Lovan
d88af56011 Fee fixes 2014-07-08 05:09:19 +02:00
Roy Badami
7149499fd8 Add comments re BitcoinUnits::formatWithUnit/formatHtmlWithUnit 2014-07-07 22:28:11 +01:00
Roy Badami
f7d70c603f Remove unused fAlign argument from BitcoinUnits::format and friends 2014-07-07 22:27:09 +01:00
Roy Badami
96df327834 Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/qt/overviewpage.cpp
	src/qt/transactiondesc.cpp
2014-07-07 22:06:21 +01:00
Roy Badami
2e4fee2ac4 Show bitcoin quantities with full precision, even in the presence of trailing zeros 2014-07-07 21:00:58 +01:00
Wladimir J. van der Laan
1fedd65fcf
Merge pull request #4480
2227725 test/bloom_tests: Use UL suffix for unsigned long number to ensure compatibility (Luke Dashjr)
2014-07-07 18:24:04 +02:00
Luke Dashjr
2227725fcb test/bloom_tests: Use UL suffix for unsigned long number to ensure compatibility 2014-07-07 15:42:59 +00:00
Luke Dashjr
109849e204 Bugfix: strerror_r can return an error, and if it does, POSIX does not specify the content of the buffer 2014-07-07 15:34:00 +00:00
Wladimir J. van der Laan
c6ac5fcfc2
Merge pull request #4471
40f5cb8 Send rejects and apply DoS scoring for errors in direct block validation. (Pieter Wuille)
2014-07-07 17:31:05 +02:00
Wladimir J. van der Laan
f748ff730b
Merge pull request #4045
a3e192a replaced MINE_ with ISMINE_ (JaSK)
53a2148 fixed bug where validateaddress doesn't display information (JaSK)
f28707a fixed bug in ListReceived() (JaSK)
519dd1c Added MINE_ALL = (spendable|watchonly) (JaSK)
23b0506 Fixed some stuff in TransactionDesc (JaSK)
80dda36 removed default argument values for ismine filter (JaSK)
d5087d1 Use script matching rather than destination matching for watch-only. (Pieter Wuille)
0fa2f88 added includedWatchonly argument to listreceivedbyaddress/...account (JaSK)
f87ba3d added includeWatchonly argument to 'gettransaction' because it affects balance calculation (JaSK)
a5c6c5d fixed tiny glitch and improved readability like laanwj suggested (JaSK)
d7d5d23 Added argument to listtransactions and listsinceblock to include watchonly addresses (JaSK)
952877e Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'. It is only appended when the transaction involves a watchonly address. (JaSK)
83f3543 Added argument to listaccounts to include watchonly addresses (JaSK)
d4640d7 Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation. (JaSK)
d2692f6 Watchonly transactions are marked in transaction history (JaSK)
ffd40da Watchonly balances are shown separately in gui. (JaSK)
2935b21 qt: Hide unspendable outputs in coin control (Wladimir J. van der Laan)
c898846 Add support for watch-only addresses (Pieter Wuille)
2014-07-07 16:06:28 +02:00
Wladimir J. van der Laan
afe380ef0f
Fix the build for windows
Problem introduced in caf6150. Thanks to @drak for noticing. Fixes #4473.
2014-07-07 12:48:56 +02:00
Wladimir J. van der Laan
4252f2928b
Merge pull request #4327
a339a37 error out, when we detect -socks argument (Philip Kaufmann)
0127a9b remove SOCKS4 support from core and GUI (Philip Kaufmann)
2014-07-07 12:45:28 +02:00
Wladimir J. van der Laan
88ae36bc06
Merge pull request #4466
ad87bc4 [Qt] Replace status bar unit icon with actual images (Cozz Lovan)
2014-07-07 10:42:53 +02:00
Wladimir J. van der Laan
1132cdbff3
Merge pull request #4401
cf04d83 add OpenSSL RAND_cleanup() on OpenSSL shutdown (Philip Kaufmann)
2014-07-07 10:35:26 +02:00
Wladimir J. van der Laan
642c8e75bc
Merge pull request #4399
674c070 [Qt] seed OpenSSL PNRG with Windows event data (Philip Kaufmann)
2014-07-07 10:31:33 +02:00
Wladimir J. van der Laan
ebb37a417a
Merge pull request #4373
2ec5a3d rpc: Prevent easy memory exhaustion attack (Wladimir J. van der Laan)
2014-07-07 10:30:06 +02:00
Wladimir J. van der Laan
4851d09603
Merge pull request #4446
209377a Use GetBlockTime() more (jtimon)
2014-07-07 10:29:10 +02:00
Wladimir J. van der Laan
5e1b7a23b0
Merge pull request #4470
f4b00be Add CChain::GetLocator() unit test (Pieter Wuille)
3c85d2e Fix CChain::GetLocator (Pieter Wuille)
2014-07-07 10:28:09 +02:00
Wladimir J. van der Laan
bc06e8f402
Merge pull request #4463
e832ab7 Rename SendMoneyToDestination to SendMoney. (Daniel Kraft)
2014-07-07 10:22:58 +02:00
jtimon
209377a7cb Use GetBlockTime() more 2014-07-07 10:20:28 +02:00
Wladimir J. van der Laan
6654a87e7b
Merge pull request #4462
3d0e92d [Qt] remove dup includes in bitcoingui (Philip Kaufmann)
2014-07-07 10:16:31 +02:00
Wladimir J. van der Laan
4ea8f632fe
Merge pull request #4467
1f740dd Remove unused variable (R E Broadley)
2014-07-07 10:14:10 +02:00
Wladimir J. van der Laan
73ac7abd08 Move ui_interface to bitcoin_server.a
There is no need for it in the utility libraries or tools.
Put it in init.cpp, and in the tests separately (as they can't link init).
2014-07-07 09:58:56 +02:00
Wladimir J. van der Laan
509030344c qt: Pick translation messages only from necessary files
Utility libraries (common, util) as well as extra tools shouldn't be
parsed for translation messages, only the server and wallet part qualify
here.
2014-07-07 09:57:37 +02:00
Daniel Kraft
e832ab7754 Rename SendMoneyToDestination to SendMoney.
Get rid of SendMoney and replace it by the functionality of
SendMoneyToDestination.  This cleans up the code, since only
SendMoneyToDestination was actually used (SendMoney internally from this
routine).
2014-07-07 09:41:33 +02:00
Philip Kaufmann
a339a37b28 error out, when we detect -socks argument 2014-07-07 08:15:14 +02:00
Philip Kaufmann
0127a9be14 remove SOCKS4 support from core and GUI
- now we support SOCKS5 only
2014-07-07 08:15:14 +02:00
Wladimir J. van der Laan
4ed2315e86
Merge pull request #4457
834e46e CBlockIndex()::SetNull() method to avoid code repetition (jtimon)
2014-07-07 07:44:48 +02:00
Wladimir J. van der Laan
e1f7c7d173
Merge pull request #4472
9f4da19 Use pong receive time rather than processing time (Pieter Wuille)
2014-07-07 06:28:43 +02:00
Pieter Wuille
9f4da19bab Use pong receive time rather than processing time 2014-07-06 16:08:18 +02:00
Pieter Wuille
40f5cb878e Send rejects and apply DoS scoring for errors in direct block validation.
75f51f2a introduced asynchronous processing for blocks, where reject messages
and DoS scoring could be applied outside of ProcessBlock, because block
validation may happen later.

However, some types of errors are still detected immediately (in particular,
CheckBlock violations), which need acting after ProcessBlock returns.
2014-07-06 14:47:23 +02:00
Pieter Wuille
f4b00beae5 Add CChain::GetLocator() unit test 2014-07-06 14:40:31 +02:00
Pieter Wuille
3c85d2ec37 Fix CChain::GetLocator 2014-07-06 13:42:29 +02:00
R E Broadley
1f740ddc4d Remove unused variable 2014-07-05 22:43:52 +07:00
Cozz Lovan
ad87bc4de1 [Qt] Replace status bar unit icon with actual images 2014-07-05 17:18:26 +02:00
Philip Kaufmann
674c070e5d [Qt] seed OpenSSL PNRG with Windows event data
- see https://bitcointalk.org/index.php?topic=113496.msg1228193#msg1228193
  for the initial suggestion for this
- also ensure consistent debug.log message format
2014-07-04 17:16:36 +02:00
Philip Kaufmann
3d0e92dc83 [Qt] remove dup includes in bitcoingui 2014-07-04 16:51:25 +02:00
Wladimir J. van der Laan
2ec5a3d212
rpc: Prevent easy memory exhaustion attack
Allocate memory for POST message data only as bytes come in, instead of
all at once at the beginning.

Fixes #4343.
2014-07-04 09:20:39 +02:00
Wladimir J. van der Laan
e81e2e8f7c
Merge pull request #4421
caf6150 Use async name resolving to improve net thread responsiveness (Huang Le)
2014-07-04 08:40:01 +02:00
Wladimir J. van der Laan
00fa78c35b
Merge pull request #3764
2e36866 Show nodeid instead of addresses (for anonymity) unless otherwise requested. (R E Broadley)
2014-07-04 08:04:30 +02:00
Wladimir J. van der Laan
e61c6d69ad
Merge pull request #4450
0da6b3f Remove signal DoubleSpendDetected, use function (Tom Harding)
88dd359 Check signatures before respend relay (Tom Harding)
2014-07-04 05:50:53 +02:00
R E Broadley
2e36866fec Show nodeid instead of addresses (for anonymity) unless otherwise requested. 2014-07-04 09:38:44 +07:00
Gavin Andresen
21876d3831
Merge branch 'smartfee_wallet' 2014-07-03 15:50:24 -04:00
Gavin Andresen
13fc83c77b
Move fee policy out of core 2014-07-03 14:42:16 -04:00
Gavin Andresen
4b7b1bb1ac
Sanity checks for estimates
Require at least 11 samples before giving fee/priority estimates.

And have wallet-created transactions go throught the fee-sanity-check
code path.
2014-07-03 13:44:56 -04:00
Gavin Andresen
b33d1f5ee5
Use fee/priority estimates in wallet CreateTransaction
The wallet now uses the mempool fee estimator with a new
command-line option: -txconfirmtarget (default: 1) instead
of using hard-coded fees or priorities.

A new bitcoind that hasn't seen enough transactions to estimate
will fall back to the old hard-coded minimum priority or
transaction fee.

-paytxfee option overrides -txconfirmtarget.

Relaying and mining code isn't changed.

For Qt, the coin control dialog now uses priority estimates to
label transaction priority (instead of hard-coded constants);
unspent outputs were consistently labeled with a much higher
priority than is justified by the free transactions actually
being accepted into blocks.

I did not implement any GUI for setting -txconfirmtarget; I would
suggest getting rid of the "Pay transaction fee" GUI and replace
it with either "target number of confirmations" or maybe
a "faster confirmation <--> lower fee" slider or select box.
2014-07-03 13:44:33 -04:00
Wladimir J. van der Laan
07b6c2b901
Merge pull request #4302
8969828 [Qt] New status bar Unit Display Control and related changes. (gubatron)
2014-07-03 17:47:58 +02:00
Wladimir J. van der Laan
4278b1df45
Clarify error message when invalid -rpcallowip
Also add to HelpMessage() what specifications are valid.
2014-07-03 07:11:59 +02:00
jtimon
834e46e847 CBlockIndex()::SetNull() method to avoid code repetition 2014-07-02 18:36:43 +02:00
Tom Harding
0da6b3fd18 Remove signal DoubleSpendDetected, use function
Also removes the need for forward reference to RelayableRespend.
2014-07-02 09:27:29 -07:00
JaSK
a3e192a327 replaced MINE_ with ISMINE_ 2014-07-02 15:48:40 +02:00
JaSK
53a2148f0c fixed bug where validateaddress doesn't display information 2014-07-02 15:48:40 +02:00
JaSK
f28707a845 fixed bug in ListReceived() 2014-07-02 15:48:40 +02:00
JaSK
519dd1c89a Added MINE_ALL = (spendable|watchonly) 2014-07-02 15:48:40 +02:00
JaSK
23b0506c91 Fixed some stuff in TransactionDesc 2014-07-02 15:48:39 +02:00
JaSK
80dda36a07 removed default argument values for ismine filter 2014-07-02 15:48:39 +02:00
Pieter Wuille
d5087d1ba0 Use script matching rather than destination matching for watch-only.
This changes the keystore data format, wallet format and IsMine logic
to detect watch-only outputs based on direct script matching rather
than first trying to convert outputs to destinations (addresses).

The reason is that we don't know how the software that has the spending
keys works. It may support the same types of scripts as us, but that is
not guaranteed. Furthermore, it removes the ambiguity between addresses
used as identifiers for output scripts or identifiers for public keys.

One practical implication is that adding a normal pay-to-pubkey-hash
address via importaddress will not cause payments to the corresponding
full public key to be detected as IsMine. If that is wanted, add those
scripts directly (importaddress now also accepts any hex-encoded script).

Conflicts:
	src/wallet.cpp
2014-07-02 15:48:39 +02:00
JaSK
0fa2f8899a added includedWatchonly argument to listreceivedbyaddress/...account 2014-07-02 15:48:39 +02:00
JaSK
f87ba3df64 added includeWatchonly argument to 'gettransaction' because it affects balance calculation 2014-07-02 15:48:39 +02:00
JaSK
a5c6c5d6df fixed tiny glitch and improved readability like laanwj suggested 2014-07-02 15:48:39 +02:00
JaSK
d7d5d23b77 Added argument to listtransactions and listsinceblock to include watchonly addresses 2014-07-02 15:48:39 +02:00
JaSK
952877e01c Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'.
It is only appended when the transaction involves a watchonly address.
2014-07-02 15:48:38 +02:00
JaSK
83f3543f20 Added argument to listaccounts to include watchonly addresses 2014-07-02 15:48:38 +02:00
JaSK
d4640d7d8c Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation. 2014-07-02 15:48:38 +02:00
JaSK
d2692f6116 Watchonly transactions are marked in transaction history 2014-07-02 15:48:38 +02:00
JaSK
ffd40da361 Watchonly balances are shown separately in gui. 2014-07-02 15:48:38 +02:00
Wladimir J. van der Laan
2935b21103 qt: Hide unspendable outputs in coin control 2014-07-02 15:48:38 +02:00
Pieter Wuille
c8988460a2 Add support for watch-only addresses
Changes:
* Add Add/Have WatchOnly methods to CKeyStore, and implementations
  in CBasicKeyStore.
* Add similar methods to CWallet, and support entries for it in
  CWalletDB.
* Make IsMine in script/wallet return a new enum 'isminetype',
  rather than a boolean. This allows distinguishing between
  spendable and unspendable coins.
* Add a field fSpendable to COutput (GetAvailableCoins' return type).
* Mark watchonly coins in listunspent as 'watchonly': true.
* Add 'watchonly' to validateaddress, suppressing script/pubkey/...
  in this case.

Based on a patch by Eric Lombrozo.

Conflicts:
	src/qt/walletmodel.cpp
	src/rpcserver.cpp
	src/wallet.cpp
2014-07-02 15:48:37 +02:00
Julian Haight
dd49e92fb0
qt: fix 'opens in testnet mode when presented with a BIP-72 link with no fallback'
Passes tests:

```
$ ./bitcoin-qt 'bitcoin:?r=http://www.example.com/'
.. fixed the original problem - this launches mainnet.

$ ./bitcoin-qt 'bitcoin:mngeNQbTKnmaMbx8EXCYdwUbnt9JJD52cC'
.. launches testnet

$ ./bitcoin-qt -testnet 'bitcoin:1NXXeQRyMFFFRfyUix2o7mk1vhvk2Nxp78'
.. sanity check - launches mainnet.
```

Fixes #4355. Closes #4411.
2014-07-02 09:47:47 +02:00
Wladimir J. van der Laan
c9600ce640
Merge pull request #4312
fda3fed libsecp256k1 integration (Pieter Wuille)
5566826 secp256k1: Add build-side changes for libsecp256k1 (Cory Fields)
b150b09 secp256k1: add libtool as a dependency (Cory Fields)
2014-07-02 09:23:05 +02:00
Wladimir J. van der Laan
2882d594fe
Fix the Qt5 build after d95ba75
Sorry, my own fault this time.
2014-07-02 08:15:09 +02:00
Tom Harding
88dd3598d2 Check signatures before respend relay
Check that all inputs are completely valid before actually
relaying a double-spend.
2014-07-01 14:37:10 -07:00
Pieter Wuille
fda3fed18a libsecp256k1 integration 2014-07-01 12:28:05 -04:00
Cory Fields
5566826635 secp256k1: Add build-side changes for libsecp256k1
Note: This is added to our existing automake targets rather than as a
libtool-style lib. The switch to libtool-style targets can come later if it
proves to not add any complications.
2014-07-01 12:27:19 -04:00
Wladimir J. van der Laan
33fdd99288 qt: Change serious messages from qDebug to qWarning
By changing the logging stream for warnings from qDebug to qWarning,
these will always be logged to debug.log.
2014-07-01 15:21:17 +02:00
Wladimir J. van der Laan
d95ba75825 qt: Log messages with type>QtDebugMsg as non-debug
More important messages should end up in the log no matter
if -debug=qt is set.
2014-07-01 14:58:02 +02:00
Wladimir J. van der Laan
b29b509612
Merge pull request #4325
4aaa017 rework help messages for fee-related options (Philip Kaufmann)
2014-07-01 12:55:33 +02:00
Wladimir J. van der Laan
dd638dd712
typedef std::map<uint256, CCoins> to CCoinsMap
This makes it possible to switch to a more efficient map type
without changing all occurences manually.

Merges half of #4413.
2014-07-01 12:48:16 +02:00
Philip Kaufmann
8d9cc7d743
fix copyright string in two of our *.rc files
- also make comment about rc-files in clientversion.h generic

Merges #4429.
2014-07-01 12:13:37 +02:00
Wladimir J. van der Laan
9aaa1cadf4
Merge pull request #4397
5d59921 add missing BOOST_FOREACH indentation in ThreadSocketHandler() (Philip Kaufmann)
9e9ca2b small cleanup of #ifdefs in BindListenPort() (Philip Kaufmann)
2014-07-01 09:54:41 +02:00
Wladimir J. van der Laan
3faf1f8294
test: Fix warning about integer signedness in P2SH tests 2014-06-30 16:37:59 +02:00
Wladimir J. van der Laan
5c184cb850
Merge pull request #4415
e35b37b RPC client: Simplify command line string-to-JSON-value conversion code (Jeff Garzik)
2014-06-30 15:56:01 +02:00
Wladimir J. van der Laan
77888d68d5
Fix the build for Qt5
Merging #3883 broke the Qt5 build, define the color in the standard
way.
2014-06-30 15:44:55 +02:00
Gavin Andresen
8ceb28afc3 Merge pull request #3883 from dgenr8/first_double_spend
Relay and alert user to double spends
2014-06-30 08:35:12 -04:00
Gavin Andresen
6fba25ef26 Merge pull request #4420 from sipa/skiplist
Add a skiplist to the CBlockIndex structure.
2014-06-30 08:21:46 -04:00
Wladimir J. van der Laan
ac26571d2b
Merge pull request #4437
de79aaa Move non-trivial uint256.h methods to uint256.cpp (Pieter Wuille)
2014-06-30 11:27:46 +02:00
Pieter Wuille
236982c2b6 Add skiplist unit tests 2014-06-29 21:51:55 +02:00
Pieter Wuille
c9a0918330 Add a skiplist to the CBlockIndex structure.
This allows fast (O(log n)) access to far predecessor blocks.
Use it to speed up CChain::FindFork and CChain::GetLocator.
2014-06-29 21:51:54 +02:00
Pieter Wuille
aa81564700 Track peers' available blocks 2014-06-29 21:50:55 +02:00
kazcw
16f33f163d fix RPC error replies
After pull #4288, RPC messages indicating errors have a Content-Length unrelated
to their actual contents, rendering bitcoin-cli and curl unable to decode the
reply.

This patch sets the Content-Length field based on the actual content returned.

Additionally, pull #4288 clobbered the error descriptions provided in
ErrorReply, which bitcoin-cli relies upon; this patch moves #4288 http-error
descriptions to an HTTPError method, allowing HTTPReply to pass content on
unchanged.
2014-06-28 19:16:15 -07:00
Pieter Wuille
de79aaa7a9 Move non-trivial uint256.h methods to uint256.cpp 2014-06-28 18:02:42 +02:00
Wladimir J. van der Laan
7b8fc9d8ad
Merge pull request #4436
675bcd5 Correct comment for 15-of-15 p2sh script size (Michael Ford)
2014-06-28 15:09:15 +02:00
Wladimir J. van der Laan
c8b6c0a2cf
Merge pull request #4425
6ecf3ed Display unknown commands received. (R E Broadley)
2014-06-28 15:07:51 +02:00
Wladimir J. van der Laan
9125ef9421
Merge pull request #4398
86fe1b8 update coding.md to reflect changes by pull (Philip Kaufmann)
e10dcf2 ensure clean and consistent "namespace" usage (Philip Kaufmann)
2014-06-28 15:06:18 +02:00
Michael Ford
675bcd5892 Correct comment for 15-of-15 p2sh script size
The original comment forgets to account for the script push which will
need an OP_PUSHDATA2 + 2-bytes for the 513 script bytes.

props davecgh
fixes #4224
2014-06-28 20:57:46 +08:00
jtimon
645d497aa0 Replace HexBits with strprintf 2014-06-28 13:19:14 +02:00
Wladimir J. van der Laan
ba81f45607
Merge pull request #3990
0dd5d3a Show only one zero instead of many when getblocks request received with a hashStop of uint256(0) (R E Broadley)
2014-06-28 10:16:09 +02:00
R E Broadley
6ecf3edfee Display unknown commands received. 2014-06-28 10:02:19 +07:00
R E Broadley
0dd5d3a009 Show only one zero instead of many when getblocks request received with a hashStop of uint256(0) 2014-06-28 09:55:24 +07:00
Tom Harding
7a19efe040 Formatting, spelling, comment fixes. 2014-06-27 16:47:33 -07:00
Wladimir J. van der Laan
dfaa35d8cd
Merge pull request #4430
33c62c9 set shutdown title to main window title (Philip Kaufmann)
2014-06-27 18:53:11 +02:00
Tom Harding
9004798e62 Add -respendnotify option and new RPC data
-respendnotify=<cmd> Execute command when a network tx respends wallet
tx input (%s=respend TxID, %t=wallet TxID)

Add respendsobserved array to gettransaction, listtransactions, and
listsinceblock RPCs.  This omits the malleated clones that are included
in the walletconflicts array.

Add RPC help for respendsobserved and walletconflicts (help was missing
for the latter).
2014-06-27 07:54:21 -07:00
Tom Harding
ada5a067c7 UI to alert of respend attempt affecting wallet.
Respend transactions that conflict with transactions already in the
wallet are added to it.  They are not displayed unless they also involve
the wallet, or get into a block.  If they do not involve the wallet,
they continue not to affect balance.

Transactions that involve the wallet, and have conflicting non-equivalent
transactions, are highlighted in red.  When the conflict first occurs, a
modal dialog is thrown.

CWallet::SyncMetaData is changed to sync only to equivalent transactions.

When a conflict is added to the wallet, counter nConflictsReceived is
incremented.  This acts like a change in active block height for the
purpose of triggering UI updates.
2014-06-27 07:54:21 -07:00
Tom Harding
d640a3ceab Relay double-spends, subject to anti-DOS
Allows network wallets and other clients to see transactions that respend
a prevout already spent in an unconfirmed transaction in this node's mempool.

Knowledge of an attempted double-spend is of interest to recipients of the
first spend.  In some cases, it will allow these recipients to withhold
goods or services upon being alerted of a double-spend that deprives them
of payment.

As before, respends are not added to the mempool.

Anti-Denial-of-Service-Attack provisions:
 - Use a bloom filter to relay only one respend per mempool prevout
 - Rate-limit respend relays to a default of 100 thousand bytes/minute
 - Define tx2.IsEquivalentTo(tx1): equality when scriptSigs are not considered
 - Do not relay these equivalent transactions

Remove an unused variable declaration in txmempool.cpp.
2014-06-27 07:54:21 -07:00
Tom Harding
8fbf03995d CBloomFilter::clear() method 2014-06-27 07:54:21 -07:00
Gavin Andresen
6259937388 Merge pull request #4365 from gavinandresen/relax_isstandard
Relax IsStandard rules for pay-to-script-hash transactions
2014-06-27 10:53:24 -04:00
Philip Kaufmann
33c62c9c0b set shutdown title to main window title
- this ensures we don't show Bitcoin-Qt as that is still our
  internal application name
- fixes #4427
2014-06-27 15:09:41 +02:00
Wladimir J. van der Laan
4684c883bb
Merge pull request #4208
6a5c124 [Qt] don't allow translation of our example btc address (Philip Kaufmann)
2014-06-27 12:46:49 +02:00
Philip Kaufmann
40a158e100 minor code format fix in rpc-related files 2014-06-27 11:13:25 +02:00
Wladimir J. van der Laan
d77f761be9
Merge pull request #4288
ed5769f Move AcceptedConnection class to rpcserver.h. (Jeff Garzik)
854d013 RPC code movement: separate out JSON-RPC execution logic from HTTP server logic (Jeff Garzik)
c912e22 RPC cleanup: Improve HTTP server replies (Jeff Garzik)
2014-06-27 10:03:19 +02:00
Jeff Garzik
ed5769f536 Move AcceptedConnection class to rpcserver.h.
Also, add parens to HTTPReply() to assist readability.
2014-06-27 00:10:53 -04:00
Jeff Garzik
854d013012 RPC code movement: separate out JSON-RPC execution logic from HTTP server logic 2014-06-26 23:32:18 -04:00
Jeff Garzik
c912e22db0 RPC cleanup: Improve HTTP server replies
1) support varying content types
2) support only sending the header
3) properly deliver error message as content, if HTTP error
4) move AcceptedConnection class to header, for wider use
2014-06-26 23:32:18 -04:00
Jeff Garzik
e35b37b1b8 RPC client: Simplify command line string-to-JSON-value conversion code
By default, all command line parameters are converted into JSON string
values.  There is no need to manually specify the incoming type.

A binary decision "parse as string or JSON?" is all that's necessary.

Convert to a simple class, initialized at runtime startup, which offers
a quick lookup to answer "parse as JSON?" conversion question.

Future parameter conversions need only to indicate the method name
and zero-based index of the parameter needing JSON parsing.
2014-06-26 22:18:30 -04:00
Whit J
c598f2acdb Fixed captitalization in bitcoin-cli-res.rc 2014-06-26 18:31:40 -07:00
Huang Le
caf6150e97 Use async name resolving to improve net thread responsiveness
In the LookupIntern(), things changed are:

  1. Call getaddrinfo_a() instead of getaddrinfo() if available, the former is a sync version of the latter;
  2. Try using inet_pton()/inet_addr() to convert the input text to a network addr structure at first, if success the extra name resolving thread inside getaddrinfo_a() could be avoided;
  3.  An interruption point added in the waiting loop for return from getaddrinfo_a(), which completes the improve for thread responsiveness.

A easy way to see the effect is to kick off a 'bitcoind stop' immediately after 'bitcoind -daemon', before the change it would take several, or even tens of, minutes on a bad network situation to wait for the running bitcoind to exit, now it costs only seconds.

Signed-off-by: Huang Le <4tarhl@gmail.com>
2014-06-27 02:55:39 +08:00
Wladimir J. van der Laan
236ae8665e
Merge pull request #3715
e44fea5 Add an option to allow users to disable relaying/mining data carrier transactions (Luke Dashjr)
2014-06-26 17:31:12 +02:00
Wladimir J. van der Laan
eacff4a9c6
Merge pull request #4392
8ae973c Allocate more space if necessary in RandSeedAddPerfMon (Wladimir J. van der Laan)
be873f6 Issue warning if collecting RandSeed data failed (Wladimir J. van der Laan)
fcb0a1b change "char pch[200000]" to "new char[200000]" (daniel)
2014-06-26 17:11:53 +02:00
Luke Dashjr
e44fea55ea Add an option to allow users to disable relaying/mining data carrier transactions 2014-06-26 14:31:06 +00:00
Wladimir J. van der Laan
ffb32acfab
Merge pull request #1583
2a72d45 JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee> (Luke Dashjr)
2014-06-26 16:20:01 +02:00
Wladimir J. van der Laan
8ae973c00c Allocate more space if necessary in RandSeedAddPerfMon
Currently we use a fixed buffer of 250000 bytes to request
HKEY_PERFORMANCE_DATA. In many cases this is not enough, causing the
entropy collection to be skipped.

Use a loop that grows the buffer as specified in the RegQueryValueEx
documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724911%28v=vs.85%29.aspx

(as the size of the performance data can differ for every call, the
normal solution of requesting the size then allocating that can't work)
2014-06-26 15:15:17 +02:00
Luke Dashjr
2a72d4591f JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>
Accepts the transaction into mined blocks at a higher (or lower) priority
2014-06-26 11:49:46 +00:00
Philip Kaufmann
cf04d83624 add OpenSSL RAND_cleanup() on OpenSSL shutdown
- to securely erase the memory used by the PNRG
- also rework 2 comments in OpenSSL init
2014-06-26 11:04:31 +02:00
Philip Kaufmann
5d59921237 add missing BOOST_FOREACH indentation in ThreadSocketHandler() 2014-06-26 11:01:24 +02:00
Philip Kaufmann
9e9ca2b671 small cleanup of #ifdefs in BindListenPort()
- SO_NOSIGPIPE isn't available on WIN32 so merge the 2 non-WIN32 blocks
- use predefined names from header for IPV6_PROTECTION_LEVEL and
  PROTECTION_LEVEL_UNRESTRICTED
2014-06-26 11:01:23 +02:00
Philip Kaufmann
e10dcf27b4 ensure clean and consistent "namespace" usage
- remove some missplaced ;
- ensure end of a namespace is clearly visible
- use same formatting when using namespace
2014-06-26 10:36:57 +02:00
Gavin Andresen
a90689ff98
Remove timing-based signature cache unit test
Two changes:

First removes a unit test that fails in my development environment
(OSX, compiled -g3 with clang).

sipa says that's not terribly surprising; the CMutableTransaction change
makes signing a little more expensive but verification quicker. The unit
test timed sign+verify-uncached versus verify-cached-five-times.

He also says the test will be invalid when libsec256kp1 is integrated
(because validation is super-optimized over signing).

core.h change fixes a compiler warning (clang -Wall : CMutableTransaction defined
as struct, declared as class in script.h).
2014-06-25 14:57:21 -04:00
gubatron
8969828d06 [Qt] New status bar Unit Display Control and related changes.
- New status bar control shows the current Unit of Display.
  When clicked (left,or right button) it shows a context menu
  that allows the user to switch the current Unit of Display (BTC, mBTC, uBTC)
- Recent Requests and Transaction Table headers are now updated when
  unit of display is changed, because their "Amount" column now displays the
  current unit of display.
- Takes care of issue #3970 Units in transaction export csv file.
- Small refactors for reusability.
- Demo Video https://www.youtube.com/watch?v=wwcr0Yh68go&list=UUG3jF2hgofmLWP0tRPisQAQ
- changes after Diapolo's feedback. Have not been able to build after last pool, issues with boost on MacOSX, will test on Ubuntu these changes.
- removed return statement on switch
- renamed onDisplayUnitsChanged(int) to updateDisplayUnit(int)
- now getAmountColumnTitle(int unit) takes a simple unit parameter. moved to BitcoinUnits.
2014-06-25 14:53:05 -04:00
Wladimir J. van der Laan
75c82d4923 Move coins.cpp and keystore.cpp to libbitcoin_common
Prepare for introduction of `bitcoin-tx` tool.
2014-06-25 10:31:35 +02:00
Wladimir J. van der Laan
84ce18ca93 Remove unnecessary dependencies for bitcoin-cli
This commit removes all the unnecessary dependencies (key, core,
netbase, sync, ...) from bitcoin-cli.

To do this it shards the chain parameters into BaseParams, which
contains just the RPC port and data directory (as used by utils and
bitcoin-cli) and Params, with the rest.
2014-06-25 10:31:35 +02:00
Wladimir J. van der Laan
14f888ca80 Move network-time related functions to timedata.cpp/h
The network time-offset-mangement functions from util.cpp are moved to
timedata.(cpp|h). This breaks the dependency of util on netbase.
2014-06-25 09:24:50 +02:00
Wladimir J. van der Laan
208bf5b9e0
Merge pull request #3839
fd704c7 move pow constants to chainparams (jtimon)
df852d2 Refactor proof of work related functions out of main (jtimon)
2014-06-25 09:14:36 +02:00
Wladimir J. van der Laan
27383b9015
Merge pull request #4390
6dc90ed replace 3 separate calls to WSAGetLastError() with 1 (Philip Kaufmann)
2014-06-25 07:20:42 +02:00
Whit J
e3aedbae9b Consistent lettering 2014-06-24 17:23:05 -07:00
Wladimir J. van der Laan
6e8472ec7c
Merge pull request #4403
5fbb4c9 [Qt] fix links in about window not opening (Philip Kaufmann)
2014-06-24 18:07:45 +02:00
Wladimir J. van der Laan
0410d11b3a
Merge pull request #4130
1c750db remove -tor compatibility code (only allow -onion) (Philip Kaufmann)
2014-06-24 17:51:32 +02:00
Wladimir J. van der Laan
5dd0bfefcb
Merge pull request #4169
0655fac miner: indentation fixes, remove for (;;) (Philip Kaufmann)
2014-06-24 17:17:13 +02:00
Wladimir J. van der Laan
d4392c8989
Merge pull request #3674
77cbd46 Let -zapwallettxes recover transaction meta data (Cozz Lovan)
2014-06-24 17:04:52 +02:00
Philip Kaufmann
5fbb4c9b58 [Qt] fix links in about window not opening
- closes #4402
2014-06-24 16:36:14 +02:00
Philip Kaufmann
1c750dbd40 remove -tor compatibility code (only allow -onion)
- exit, if -tor option is found and give error to user
2014-06-24 16:07:20 +02:00
Philip Kaufmann
6dc90ed8fa replace 3 separate calls to WSAGetLastError() with 1 2014-06-24 08:46:12 +02:00
jtimon
fd704c7b2c move pow constants to chainparams 2014-06-23 23:10:24 +02:00
jtimon
df852d2bcc Refactor proof of work related functions out of main 2014-06-23 23:10:24 +02:00
Gavin Andresen
7f3b4e9569
Relax IsStandard rules for pay-to-script-hash transactions
Relax the AreInputsStandard() tests for P2SH transactions --
allow any Script in a P2SH transaction to be relayed/mined,
as long as it has 15 or fewer signature operations.

Rationale: https://gist.github.com/gavinandresen/88be40c141bc67acb247

I don't have an easy way to test this, but the code changes are
straightforward and I've updated the AreInputsStandard unit tests.
2014-06-23 15:09:52 -04:00
Cory Fields
f3967bcc50 build: fix build weirdness after 54372482.
bitcoin-config.h moved, but the old file is likely to still exist when
reconfiguring or switching branches. This would've caused files to not rebuild
correctly, and other strange problems.

Make the path explicit so that the old one cannot be found.

Core libs use config/bitcoin-config.h.

Libs (like crypto) which don't want access to bitcoin's headers continue
to use -Iconfig and #include bitcoin-config.h.
2014-06-23 14:04:38 -04:00
Wladimir J. van der Laan
be873f6454
Issue warning if collecting RandSeed data failed 2014-06-23 16:29:51 +02:00
Philip Kaufmann
6a5c124b84 [Qt] don't allow translation of our example btc address 2014-06-23 15:11:28 +02:00
Wladimir J. van der Laan
a652787737
Merge pull request #4314
b3c912d [Qt] Change Coin control labels and tooltips because of non-rounding fees (Cozz Lovan)
2014-06-23 12:07:50 +02:00
daniel
fcb0a1bb9c change "char pch[200000]" to "new char[200000]" 2014-06-23 11:59:58 +02:00
Wladimir J. van der Laan
fa126effc2
Avoid undefined behavior using CFlatData in CScript serialization
`&vch[vch.size()]` and even `&vch[0]` on vectors can cause assertion
errors with VC in debug mode. This is the problem mentioned in #4239.
The deeper problem with this is that we rely on undefined behavior.

- Add `begin_ptr` and `end_ptr` functions that get the beginning and end
  pointer of vector in a reliable way that copes with empty vectors and
  doesn't reference outside the vector
(see https://stackoverflow.com/questions/1339470/how-to-get-the-address-of-the-stdvector-buffer-start-most-elegantly/1339767#1339767).
- Add a convenience constructor to CFlatData that wraps a vector.

I added `begin_ptr` and `end_ptr` as separate functions as I imagine
they will be useful in more places.
2014-06-23 10:38:15 +02:00
Wladimir J. van der Laan
52d4abfdef
Merge pull request #4388
3dc1464 add missing vhListenSocket.clear(); to CNetCleanup() (Philip Kaufmann)
2831a03 remove unused CNode::Cleanup() (Philip Kaufmann)
2014-06-23 10:21:38 +02:00
Wladimir J. van der Laan
82f2bba1ad
Merge pull request #4391
b612bde remove unneded class CNodeCombinedStats; from rpcconsole.cpp (Philip Kaufmann)
2014-06-23 10:01:07 +02:00
Philip Kaufmann
b612bde521 remove unneded class CNodeCombinedStats; from rpcconsole.cpp
- also 2 small style fixes
2014-06-23 08:06:52 +02:00
Pieter Wuille
d4e4e05435
Merge pull request #4309
d38da59 Code simplifications after CTransaction::GetHash() caching (Pieter Wuille)
4949004 Add CMutableTransaction and make CTransaction immutable. (Pieter Wuille)
2014-06-22 20:45:30 +02:00
Pieter Wuille
6b40eabbcf
Merge pull request #4381
806fd19 Allocate receive buffers in on the fly (Pieter Wuille)
2014-06-22 17:43:40 +02:00
Philip Kaufmann
3dc1464f0a add missing vhListenSocket.clear(); to CNetCleanup() 2014-06-22 14:52:38 +02:00
Philip Kaufmann
2831a03b79 remove unused CNode::Cleanup() 2014-06-22 14:51:38 +02:00
Philip Kaufmann
0655fac0b1 miner: indentation fixes, remove for (;;)
- change a for (;;) into while (true), as we nowhere else use the first
- init nNonceFound to 0
- fix indentation in BitcoinMiner try/catch block
2014-06-22 00:33:42 +02:00
Pieter Wuille
d38da59bf6 Code simplifications after CTransaction::GetHash() caching 2014-06-22 00:06:17 +02:00
Pieter Wuille
4949004d68 Add CMutableTransaction and make CTransaction immutable.
In addition, introduce a cached hash inside CTransaction, to prevent
recalculating it over and over again.
2014-06-21 22:59:03 +02:00
Pieter Wuille
8f59251b83
Merge pull request #4100
a0495bb Add <Hasher>::OUTPUT_SIZE (Pieter Wuille)
4791b99 crypto: create a separate lib for crypto functions (Cory Fields)
f2647cc crypto: explicitly check for byte read/write functions (Cory Fields)
5437248 build: move bitcoin-config.h to its own directory (Cory Fields)
3820e01 Extend and move all crypto tests to crypto_tests.cpp (Pieter Wuille)
7ecd973 Move {Read,Write}{LE,BE}{32,64} to common.h and use builtins if possible (Pieter Wuille)
a5bc9c0 Add built-in RIPEMD-160 implementation (Pieter Wuille)
13b5dfe Move crypto implementations to src/crypto/ (Pieter Wuille)
1cc344c Add built-in SHA-1 implementation. (Pieter Wuille)
85aab2a Switch miner.cpp to use sha2 instead of OpenSSL. (Pieter Wuille)
cf0c47b Remove getwork() RPC call (Pieter Wuille)
7b4737c Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL. (Pieter Wuille)
977cdad Add a built-in SHA256/SHA512 implementation. (Pieter Wuille)
2014-06-21 22:52:46 +02:00
Jeff Garzik
b4ccf0a5c7 Merge pull request #4379 from Diapolo/cleanup_compat
small cleanup in src/compat .h and .cpp
2014-06-21 16:29:12 -04:00
Pieter Wuille
a0495bb68c Add <Hasher>::OUTPUT_SIZE 2014-06-21 19:47:43 +02:00
Cory Fields
4791b99e2d crypto: create a separate lib for crypto functions
This lib has no dependencies on other bitcoin functionality. Attempting to
use bitcoin headers will result in a failure to compile.
2014-06-21 19:47:43 +02:00
Cory Fields
f2647cc0e9 crypto: explicitly check for byte read/write functions
Don't depend on hard-coded platform lists
2014-06-21 19:47:43 +02:00
Cory Fields
54372482a8 build: move bitcoin-config.h to its own directory
This allows us to include its path without making other header includes valid.
2014-06-21 19:47:43 +02:00
Pieter Wuille
3820e01eb9 Extend and move all crypto tests to crypto_tests.cpp 2014-06-21 19:47:43 +02:00
Pieter Wuille
7ecd9739d9 Move {Read,Write}{LE,BE}{32,64} to common.h and use builtins if possible 2014-06-21 19:47:42 +02:00
Pieter Wuille
a5bc9c0917 Add built-in RIPEMD-160 implementation 2014-06-21 19:47:42 +02:00
Pieter Wuille
13b5dfef64 Move crypto implementations to src/crypto/ 2014-06-21 19:47:42 +02:00
Pieter Wuille
1cc344ce42 Add built-in SHA-1 implementation. 2014-06-21 19:47:39 +02:00
Pieter Wuille
85aab2a088 Switch miner.cpp to use sha2 instead of OpenSSL. 2014-06-21 19:47:39 +02:00
Pieter Wuille
cf0c47b269 Remove getwork() RPC call 2014-06-21 19:47:39 +02:00
Pieter Wuille
7b4737c878 Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL. 2014-06-21 19:47:39 +02:00
Pieter Wuille
977cdadea8 Add a built-in SHA256/SHA512 implementation.
This also moves the HMAC-SHA512 implementation to sha2.cpp.
2014-06-21 19:47:39 +02:00
Wladimir J. van der Laan
540ce6aa10
Merge pull request #4380
38405ac Add comment regarding experimental-use service bits (Peter Todd)
99ddc6c Add nLocalServices info to RPC getinfo (Peter Todd)
2014-06-21 19:26:18 +02:00
Peter Todd
38405ac141
Add comment regarding experimental-use service bits
As per mailing list discussion.
2014-06-21 11:43:23 -04:00
Peter Todd
99ddc6cb70 Add nLocalServices info to RPC getinfo
Also show full 64 bits of services. Previously service bits >32 that
were advertised just didn't show up at all.
2014-06-21 11:43:19 -04:00
Pieter Wuille
806fd19ecb Allocate receive buffers in on the fly 2014-06-21 17:00:38 +02:00
Philip Kaufmann
fc0c07eb64 small cleanup in src/compat .h and .cpp
- add license header
- fix include guards
- fix indentation
2014-06-21 14:39:17 +02:00
Pavel Vasin
ea3acaf383 AvailableCoins: acquire cs_main mutex
It's required when called from WalletModel
2014-06-20 16:32:57 +04:00
Wladimir J. van der Laan
b8b98d5642
Merge pull request #4310
7a9e0b6 Move checkpoint based heuristic checks to AcceptBlockHeader (Pieter Wuille)
2014-06-19 14:38:45 +02:00
Wladimir J. van der Laan
6afa49329d rpc: Add acceptors only when listening succeeded 2014-06-19 08:19:52 +02:00
Wladimir J. van der Laan
33e5b42910 rpc: Ignore and log errors during cancel
Cancelling the RPC acceptors can sometimes result in an error about
a bad file descriptor.

As this is the shutdown sequence we need to continue nevertheless,
ignore these errors, log a warning and proceed.

Fixes #4352.
2014-06-19 08:19:46 +02:00
Wladimir J. van der Laan
9fe80a2ec8
Merge pull request #4334
6763018 [Qt] rename In:/Out: to Received/Sent in traffic tab (Philip Kaufmann)
2014-06-18 09:59:47 +02:00
Wladimir J. van der Laan
b8e56aa8ef
Merge pull request #4339
92a6220 sanity: hook up sanity checks (Cory Fields)
679240d sanity: add libc/stdlib sanity checks (Cory Fields)
11404af sanity: autoconf check for sys/select.h (Cory Fields)
2014-06-18 09:52:50 +02:00
Wladimir J. van der Laan
5694d10781
Merge pull request #4346
1569353 Add `-stopafterblockimport` option (Wladimir J. van der Laan)
2014-06-17 14:51:15 +02:00
jtimon
f6984e8141 Add "chain" to getmininginfo, improve help in getblockchaininfo 2014-06-17 13:11:36 +02:00
jtimon
b82b7ec3dc Get rid of Params().RPCisTestNet() 2014-06-17 13:08:25 +02:00
Philip Kaufmann
1020f599f3 add comment to HelpMessage() to ensure alphabetical ordering
- also rename hmm to mode, to be consistent between .h and .cpp
2014-06-17 09:17:12 +02:00
Cory Fields
92a6220711 sanity: hook up sanity checks 2014-06-16 17:21:34 -04:00
Cory Fields
679240d0e9 sanity: add libc/stdlib sanity checks
These are meant to test our back-compat stubs, but they are enabled for all
builds for the sake of consistency.
2014-06-16 17:21:34 -04:00
Cozz Lovan
b3c912d93a [Qt] Change Coin control labels and tooltips because of non-rounding fees 2014-06-16 22:39:43 +02:00
Cozz Lovan
77cbd4623e Let -zapwallettxes recover transaction meta data 2014-06-16 18:56:57 +02:00
Wladimir J. van der Laan
09eb201b1b Remove using namespace std from header file
It's considered bad form to import things into the global namespace in a
header. Put it in the cpp files where it is needed instead.
2014-06-16 17:42:54 +02:00
Wladimir J. van der Laan
807691ca96
Merge pull request #4326
f5ae6c9 add NetworkIDString() to chainparams (Philip Kaufmann)
2014-06-16 17:41:27 +02:00
Wladimir J. van der Laan
f73082db87
Merge pull request #4337
88df548 base58: add paranoid return value checks (Jeff Garzik)
2014-06-16 17:29:43 +02:00
Wladimir J. van der Laan
1569353b8a
Add -stopafterblockimport option
Stop after importing blocks. This can be useful for development
and trouble shooting.
2014-06-16 11:47:32 +02:00
Philip Kaufmann
6763018797 [Qt] rename In:/Out: to Received/Sent in traffic tab
- collides with In:/Out: used for displaying number of
  connections when translating
2014-06-16 08:23:45 +02:00
Wladimir J. van der Laan
b750cf1fb9
Remove cli functionality from bitcoind
As it says on the tin. It was deprecated in version 0.9, and
at some point it should be removed.

Removes the dependency of bitcoind on libbitcoin-cli.a. Move
some functions that used to be shared but are now only used in
bitcoin-cli.cpp to that file.

After this change, an error is printed (and exit code 1 is returned)
when the user tries to send RPC commands using bitcoind.
2014-06-15 15:38:22 +02:00
Jeff Garzik
0cafb63025
bitcoin-cli, rpcclient: prefer EXIT_FAILURE cstdlib constant
A more complex construction via abs() yields the same end result.

Rebased-From: 34ff109
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-06-15 14:47:04 +02:00
kevin
33cc907dfb Add DNS seed of open-nodes.org 2014-06-15 15:35:53 +08:00
Wladimir J. van der Laan
8615bfb486
Merge pull request #4316
18116b0 Ignore too-long redeemScripts while loading wallet (Wladimir J. van der Laan)
2014-06-14 11:32:03 +02:00
Wladimir J. van der Laan
8047fb04ed
Merge pull request #4193
71aaff3 Remove double-dash parameters from mapArgs (Kosta Zertsekel)
2014-06-12 16:47:48 +02:00
Wladimir J. van der Laan
fe1f417287
Merge pull request #4281
5c97aae qt: Unify AboutDialog and HelpMessageDialog (Wladimir J. van der Laan)
45615af Add 'about' information to `-version` output (Wladimir J. van der Laan)
97789d3 util: Add function FormatParagraph to format paragraph to fixed-width (Wladimir J. van der Laan)
96b733e Add `-version` option to get just the version (Wladimir J. van der Laan)
2014-06-12 16:42:55 +02:00
Wladimir J. van der Laan
5c97aae6da qt: Unify AboutDialog and HelpMessageDialog
They share so much code and functionality that they may as well
be one class.
2014-06-12 16:11:56 +02:00
Wladimir J. van der Laan
45615af26f Add 'about' information to -version output
Adds a copyright and attribution message to the `-version` output
(the same as shown in the About dialog in the GUI).

Move the message to a function LicenseInfo in init.cpp.
2014-06-12 16:11:56 +02:00
Wladimir J. van der Laan
18116b06c1 Ignore too-long redeemScripts while loading wallet
This avoids that long redeemScripts that were grandfathered in
prevent the wallet from loading.

Fixes #4313.
2014-06-12 15:28:41 +02:00
Wladimir J. van der Laan
e5ee8f016e
Remove -beta suffix
It conflicts with our normal naming of releases/builds. Fixes #4221.
2014-06-12 13:52:15 +02:00
Philip Kaufmann
f5ae6c9826 add NetworkIDString() to chainparams
- returns the BIP70 network string
- use that new function in the core and GUI code and remove unused code
  and functions
2014-06-12 13:19:12 +02:00
Wladimir J. van der Laan
3f39b9d455
Merge pull request #2784
f1920e8 Ping automatically every 2 minutes (unconditionally) (Pieter Wuille)
2014-06-12 12:40:09 +02:00
Jeff Garzik
88df548dde base58: add paranoid return value checks 2014-06-11 23:20:37 -04:00
Andreas Schildbach
c30329adfa Add testnet DNS seed of Alex Kotenko. 2014-06-12 00:36:53 +02:00
Philip Kaufmann
f3790472f0 remove unused code from getblockchaininfo() 2014-06-11 14:56:08 +02:00
Wladimir J. van der Laan
97789d374c util: Add function FormatParagraph to format paragraph to fixed-width
This is to be used for the `-version` and `-help` messages.
2014-06-11 14:27:09 +02:00
Wladimir J. van der Laan
96b733e996 Add -version option to get just the version
Adds a `-version` or `--version` option to print just the version
of the program for bitcoind, bitcoin-cli and bitcoin-qt.

Also make it that `-help` can be used to display the help (as well as
existing `--help`). Up to now, `-help` was the only option that didn't
work with either one or two dashes.
2014-06-11 14:22:50 +02:00
Wladimir J. van der Laan
9c8d2f6df0
Merge pull request #4227
634bd61 convert an if into an else if in OpenNetworkConnection() (Philip Kaufmann)
5bd6c31 small cleanup of net (Philip Kaufmann)
2014-06-11 13:01:11 +02:00
Philip Kaufmann
634bd61b76 convert an if into an else if in OpenNetworkConnection() 2014-06-11 12:40:13 +02:00
Philip Kaufmann
5bd6c31bd6 small cleanup of net
- remove an unneded else in ConnectNode()
- make 0 a double and change to 0.0 in ConnectNode()
- rename strDest to pszDest in OpenNetworkConnection()
- remove an unneded call to our REF() macro in BindListenPort()
- small style cleanups and removal of unneeded new-lines
2014-06-11 12:38:31 +02:00
Philip Kaufmann
4aaa01783d rework help messages for fee-related options
- mention the units and show the default for -paytxfee
2014-06-11 12:16:26 +02:00
Philip Kaufmann
56b07d2dcd [Qt] allow setting listen via GUI
- add DEFAULT_LISTEN in net.h and use in the code (shared
  setting between core and GUI)

Important: This makes it obvious, that we need to re-think the
settings/options handling, as GUI settings are processed before
any parameter-interaction (which is mostly important for network
stuff) in AppInit2()!
2014-06-11 12:04:17 +02:00
Wladimir J. van der Laan
5905d71fe3
Merge pull request #4170
ac14bcc small formatting, indentation and comment fixes (Philip Kaufmann)
2014-06-11 11:31:00 +02:00
Wladimir J. van der Laan
d01574f792
Merge pull request #4277
4a09e1d key.cpp: fail with a friendlier message on missing ssl EC support (Andrew Poelstra)
2014-06-11 08:34:25 +02:00
Wladimir J. van der Laan
4e45932659
Merge pull request #4321
699fe63 remove wrong ; in chainparams.h and order includes (Philip Kaufmann)
2014-06-11 08:26:20 +02:00
Wladimir J. van der Laan
40c3781365
Merge pull request #4323
38e324a build: qt: split locale resources. Fixes non-deterministic distcheck (Cory Fields)
2014-06-11 08:16:23 +02:00
Cory Fields
38e324af86 build: qt: split locale resources. Fixes non-deterministic distcheck
The rcc tool is quirky and only honors files in the same directory as the qrc.
When doing an out-of-tree build (as 'make distcheck' does), the generated
translation files end up in a different path, so rcc can't find them.

Split them up so that rcc is run twice: once for static source files and once
for generated files.
2014-06-10 15:53:21 -04:00
Philip Kaufmann
699fe635c6 remove wrong ; in chainparams.h and order includes 2014-06-10 19:33:12 +02:00
Philip Kaufmann
1c24187b51 remove unused UPnP code from main.h 2014-06-10 18:34:35 +02:00
Philip Kaufmann
ac14bcc1f1 small formatting, indentation and comment fixes
- contains zero code changes
2014-06-10 18:23:56 +02:00
Wladimir J. van der Laan
6dd5edb7de
Remove unused Print/PrintHex functions
You can just use HexStr(script) or script.ToString() for debugging, no
need for these extra functions.
2014-06-10 15:03:21 +02:00
Wladimir J. van der Laan
588fb4e82f
Merge pull request #4305
95a9383 [Qt] Remove CENT-fee-rule from coin control completely (Cozz Lovan)
2014-06-10 10:42:42 +02:00
Pieter Wuille
f1920e8606 Ping automatically every 2 minutes (unconditionally)
... instead of after 30 minutes of no sending, for latency measurement
and keep-alive. Also, disconnect if no reply arrives within 20 minutes,
instead of 90 of inactivity (for peers supporting the 'pong' message).
2014-06-09 23:06:56 +02:00
Wladimir J. van der Laan
6741837233
Merge pull request #4300
dff0e3b [Qt] Improve rpc console history behavior (Cozz Lovan)
2014-06-09 12:58:56 +02:00
Wladimir J. van der Laan
62fdf381fa
Merge pull request #3824
f0a83fc Use Params().NetworkID() instead of TestNet() from the payment protocol (jtimon)
2871889 net.h was using std namespace through chainparams.h included in protocol.h (jtimon)
c8c52de Replace virtual methods with static attributes, chainparams.h depends on protocol.h instead of the other way around (jtimon)
a3d946e Get rid of TestNet() (jtimon)
6fc0fa6 Add RPCisTestNet chain parameter (jtimon)
cfeb823 Add RequireStandard chain parameter (jtimon)
21913a9 Add AllowMinDifficultyBlocks chain parameter (jtimon)
d754f34 Move majority constants to chainparams (jtimon)
8d26721 Get rid of RegTest() (jtimon)
cb9bd83 Add DefaultCheckMemPool chain parameter (jtimon)
2595b9a Add DefaultMinerThreads chain parameter (jtimon)
bfa9a1a Add MineBlocksOnDemand chain parameter (jtimon)
1712adb Add MiningRequiresPeers chain parameter (jtimon)
2014-06-09 12:52:29 +02:00
Pieter Wuille
18e72167dd Push cs_mains down in ProcessBlock 2014-06-09 02:21:15 +02:00
Pieter Wuille
202e01941c Move all post-chaintip-change notifications to ActivateBestChain 2014-06-09 02:21:15 +02:00
Pieter Wuille
4e0eed88ac Allow ActivateBestChain to release its lock on cs_main 2014-06-09 02:21:15 +02:00
Pieter Wuille
77339e5aec Get rid of the static chainMostWork (optimization) 2014-06-09 02:21:15 +02:00
Pieter Wuille
7a9e0b6460 Move checkpoint based heuristic checks to AcceptBlockHeader 2014-06-09 01:27:56 +02:00
Cozz Lovan
95a93836d8 [Qt] Remove CENT-fee-rule from coin control completely 2014-06-08 01:48:11 +02:00
Drak
02bec4b268 Fix compiler warnings
Fixes the following compiler warning

```
miner.cpp: In constructor ‘COrphan::COrphan(const CTransaction*)’:
miner.cpp:69:14: warning: ‘COrphan::feeRate’ will be initialized after [-Wreorder]
     CFeeRate feeRate;
              ^
miner.cpp:68:12: warning:   ‘double COrphan::dPriority’ [-Wreorder]
     double dPriority;
            ^
miner.cpp:71:5: warning:   when initialized here [-Wreorder]
     COrphan(const CTransaction* ptxIn) : ptx(ptxIn), feeRate(0), dPriority(0)
```
2014-06-07 12:57:58 +01:00
Cozz Lovan
dff0e3b915 [Qt] Improve rpc console history behavior 2014-06-07 13:20:30 +02:00
Wladimir J. van der Laan
db41541bc2
qt: Periodic translation update 2014-06-06 19:29:03 +02:00
Gavin Andresen
171ca7745e estimatefee / estimatepriority RPC methods
New RPC methods: return an estimate of the fee (or priority) a
transaction needs to be likely to confirm in a given number of
blocks.

Mike Hearn created the first version of this method for estimating fees.
It works as follows:

For transactions that took 1 to N (I picked N=25) blocks to confirm,
keep N buckets with at most 100 entries in each recording the
fees-per-kilobyte paid by those transactions.

(separate buckets are kept for transactions that confirmed because
they are high-priority)

The buckets are filled as blocks are found, and are saved/restored
in a new fee_estiamtes.dat file in the data directory.

A few variations on Mike's initial scheme:

To estimate the fee needed for a transaction to confirm in X buckets,
all of the samples in all of the buckets are used and a median of
all of the data is used to make the estimate. For example, imagine
25 buckets each containing the full 100 entries. Those 2,500 samples
are sorted, and the estimate of the fee needed to confirm in the very
next block is the 50'th-highest-fee-entry in that sorted list; the
estimate of the fee needed to confirm in the next two blocks is the
150'th-highest-fee-entry, etc.

That algorithm has the nice property that estimates of how much fee
you need to pay to get confirmed in block N will always be greater
than or equal to the estimate for block N+1. It would clearly be wrong
to say "pay 11 uBTC and you'll get confirmed in 3 blocks, but pay
12 uBTC and it will take LONGER".

A single block will not contribute more than 10 entries to any one
bucket, so a single miner and a large block cannot overwhelm
the estimates.
2014-06-06 10:44:57 -04:00
Gavin Andresen
c6cb21d17a Type-safe CFeeRate class
Use CFeeRate instead of an int64_t for quantities that are
fee-per-size.

Helps prevent unit-conversion mismatches between the wallet,
relaying, and mining code.
2014-06-06 10:34:18 -04:00
Wladimir J. van der Laan
345cb52e8b
Merge pull request #4297
b917555 qt: PeerTableModel: Fix potential deadlock. #4296 (Ashley Holman)
2014-06-06 10:13:48 +02:00
Ashley Holman
b917555b04
qt: PeerTableModel: Fix potential deadlock. #4296 2014-06-06 16:59:15 +09:30
Cory Fields
efe6888407 build: fix version dependency 2014-06-05 16:05:57 -04:00
Cory Fields
f4d81129f0 build: quit abusing AM_CPPFLAGS
Now that the build is non-recursive, adding to AM_CPPFLAGS means adding to
_all_ cppflags.

Logical groups of includes have been added instead, and are used individually
by various targets.
2014-06-05 16:05:57 -04:00
Cory Fields
56c157d5e0 build: avoid the use of top_ and abs_ dir paths
Using them has the side effect of confusing the dependency-tracking logic.
2014-06-05 16:05:57 -04:00
Cory Fields
70c71c50ce build: Tidy up file generation output
- Some file generation was still noisy, silence it.
- AM_V_GEN is used rather than @ so that 'make V=1' works as intended
- Cut down on file copies and moves when using sed, use pipes instead
- Avoid the use of top_ and abs_ dirs where possible
2014-06-05 16:05:57 -04:00
Cory Fields
6b9f0d5554 build: nuke Makefile.include from orbit
Rules and targets no longer need to be shared between subdirectories, so
this is no longer needed.
2014-06-05 16:05:57 -04:00
Cory Fields
8b09ef7b63 build: add stub makefiles for easier subdir builds 2014-06-05 16:05:43 -04:00
Cory Fields
be4e9aeb14 build: delete old Makefile.am's 2014-06-05 16:05:42 -04:00
Cory Fields
65e8ba4dbe build: Switch to non-recursive make
Build logic moves from individual Makefile.am's to include files, which
the main src/Makefile.am includes. This avoids having to manage a gigantic
single Makefile.

TODO: Move the rules from the old Makefile.include to where they actually
belong and nuke the old file.
2014-06-05 16:05:17 -04:00
Wladimir J. van der Laan
7d4dda7630 Remove global strWalletFile
As it says on the tin. There is no need to have this variable be
global, it's only used in AppInit2.
2014-06-05 14:52:34 +02:00
Wladimir J. van der Laan
a92aded70e
Fix GUI build with --disable-wallet
fe6bff2 and 65f78a1 broke it. Minor build changes.
2014-06-05 07:00:16 +02:00
Wladimir J. van der Laan
d900ab9e66
Merge pull request #4291
fe6bff2 [Qt] add BerkeleyDB version info to RPCConsole (Philip Kaufmann)
2014-06-05 06:29:11 +02:00
Gavin Andresen
4fee61a905 Merge pull request #4287 from laanwj/2014_06_sideeffect
Remove side effect in assertion in ProcessGetData
2014-06-04 20:15:45 -04:00
Philip Kaufmann
fe6bff2eae [Qt] add BerkeleyDB version info to RPCConsole
- to match info function between debug.log and RPCConsole
2014-06-04 22:00:59 +02:00
Philip Kaufmann
5bd02cf715 log used config file to debug.log on startup 2014-06-04 21:19:22 +02:00
Jeff Garzik
b8ac6cdf53 Merge pull request #4282 from jgarzik/fix-wallet-init
CWallet: fix nTimeFirstKey init, by making constructor init common code
2014-06-04 15:00:58 -04:00
Jeff Garzik
c79897af31 Merge pull request #4247 from Diapolo/listen
rename fNoListen to fListen and move to net
2014-06-04 15:00:38 -04:00
Wladimir J. van der Laan
f0f4904bec
Merge pull request #4258
7b45d94 Make max number of orphan blocks kept in memory a startup parameter (fixes #4253) (shshshsh)
2014-06-04 19:30:44 +02:00
Wladimir J. van der Laan
d24310d23a
Merge pull request #4260
aab2c0f Remove template matching params from GetOpName() (Huang Le)
2014-06-04 19:27:03 +02:00
Wladimir J. van der Laan
4a48a0671d
Remove side effect in assertion in ProcessGetData
A side-effect was introduced into an assertion in 7a0e84d. This commit
fixes that.
2014-06-04 16:02:04 +02:00
jtimon
f0a83fc256 Use Params().NetworkID() instead of TestNet() from the payment protocol 2014-06-04 15:33:11 +02:00
shshshsh
7b45d943b2 Make max number of orphan blocks kept in memory a startup parameter (fixes #4253) 2014-06-04 11:58:18 +00:00
jtimon
2871889e83 net.h was using std namespace through chainparams.h included in protocol.h 2014-06-04 13:29:36 +02:00
jtimon
c8c52de3a0 Replace virtual methods with static attributes, chainparams.h depends on
protocol.h instead of the other way around
2014-06-04 13:29:36 +02:00
jtimon
a3d946ebdc Get rid of TestNet() 2014-06-04 13:29:36 +02:00
jtimon
6fc0fa63d9 Add RPCisTestNet chain parameter 2014-06-04 13:29:36 +02:00
jtimon
cfeb8235fd Add RequireStandard chain parameter 2014-06-04 13:29:36 +02:00
jtimon
21913a9ac9 Add AllowMinDifficultyBlocks chain parameter 2014-06-04 13:29:36 +02:00
jtimon
d754f34e8d Move majority constants to chainparams 2014-06-04 13:29:36 +02:00
jtimon
8d26721498 Get rid of RegTest() 2014-06-04 13:29:35 +02:00
jtimon
cb9bd83bba Add DefaultCheckMemPool chain parameter 2014-06-04 13:29:35 +02:00
jtimon
2595b9ac23 Add DefaultMinerThreads chain parameter 2014-06-04 13:29:35 +02:00
jtimon
bfa9a1a638 Add MineBlocksOnDemand chain parameter 2014-06-04 13:29:35 +02:00
jtimon
1712adbe0b Add MiningRequiresPeers chain parameter 2014-06-04 13:29:35 +02:00
Kosta Zertsekel
71aaff393f Remove double-dash parameters from mapArgs
Should be merged after pull request #4281
("Add `-version` option to get just the version #4281"),
because is changed "--help" to "-help".

Checked that grep of 'mapArgs.count("--' returned only
three places that are fixed by pull request #4281.
2014-06-04 11:27:15 +03:00
Wladimir J. van der Laan
358a61ee06
Merge pull request #4223
06a91d9 VerifyDB progress (Cozz Lovan)
2014-06-04 09:14:51 +02:00
Andrew Poelstra
4a09e1df51
key.cpp: fail with a friendlier message on missing ssl EC support
Previously if bitcoind is linked with an OpenSSL which is compiled
without EC support, this is seen as an assertion failure "pKey !=
NULL" at key.cpp:134, which occurs after several seconds. It is an
esoteric piece of knowledge to interpret this as "oops, I linked
with the wrong OpenSSL", and because of the delay it may not even
be noticed.

The new output is

: OpenSSL appears to lack support for elliptic curve cryptography. For
more information, visit
https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries
: Initialization sanity check failed. Bitcoin Core is shutting down.

which occurs immediately after attempted startup.

This also blocks in an InitSanityCheck() function which currently only
checks for EC support but should eventually do more. See #4081.
2014-06-03 12:09:51 -07:00
Jeff Garzik
d04fd3e2af CWallet: fix nTimeFirstKey init, by making constructor init common code
Don't repeat yourself etc.
2014-06-03 12:55:33 -04:00
Cozz Lovan
06a91d9698 VerifyDB progress 2014-06-03 15:21:47 +02:00
Philip Kaufmann
bbe1925ce3 [Qt] style police and small addition in rpcconsole
- fix spaces, indentation and coding style glitches
2014-06-03 15:01:50 +02:00
Wladimir J. van der Laan
4c097f9669
Merge pull request #4225
65f78a1 Qt: Add GUI view of peer information. #4133 (Ashley Holman)
2014-06-03 11:13:51 +02:00
Ashley Holman
65f78a111f
Qt: Add GUI view of peer information. #4133 2014-06-03 17:37:34 +09:30
tm314159
91855f279d Properly initialize CWallet::nTimeFirstKey 2014-06-02 11:32:33 -07:00
Wladimir J. van der Laan
73b072252b
Merge pull request #3837
75ebced added many rpc wallet tests (Alon Muroch)
2014-06-02 18:00:37 +02:00
Wladimir J. van der Laan
52d7a54434
Merge pull request #3683
bdc83e8 [Qt] ensure payment request network matches client network (Philip Kaufmann)
2014-06-02 17:59:20 +02:00
Wladimir J. van der Laan
51615e1693
Merge pull request #4213
516053c Make links on 'About Bitcoin Core' into clickable (squashed 5 comits into one) (Tawanda Kembo)
2014-06-02 15:21:42 +02:00
Wladimir J. van der Laan
be7d0adcdb
Merge pull request #4238
b90711c [Qt] Fix Transaction details shows wrong To: (Cozz Lovan)
2014-06-02 15:12:12 +02:00
Wladimir J. van der Laan
42d87749eb
Merge pull request #4261
09a54a6 Use pnode->nLastRecv as sync score directly (Huang Le)
2014-06-02 14:25:09 +02:00
Wladimir J. van der Laan
ead1f65256
Merge pull request #4268
223a6f7 Fix stray uppercase A in tx_valid.json. (Andreas Schildbach)
2014-06-02 10:54:20 +02:00
Tawanda Kembo
516053c349 Make links on 'About Bitcoin Core' into clickable (squashed 5 comits into one)
Made the following links clickable:
http://www.opensource.org/licenses/mit-license.php
http://www.openssl.org/
eay@cryptsoft.com

(Squashed commits into one commit as suggested by @laanwj)

Replaced label with text browser on About Bitcoin Core Screen

So that the links on the About screen can be clickable

Replaced html property with text property

I have now removed unnecessary html so this should make life easier for
translators and you @Diapolo :). What do you think?

The size of the window needs to change

The size of the window needs to change when you make links clickable.
Thanks  for pointing that out @laanwj

Using the https://www.openssl.org over the http link

Using the https://www.openssl.org over the http link as suggested by
@Diapolo
2014-06-02 09:21:53 +02:00
Wladimir J. van der Laan
11ef78f115
Periodic language update
Pull updated translations from Transifex before 0.9.2
2014-06-01 16:25:22 +02:00
Andreas Schildbach
223a6f7800 Fix stray uppercase A in tx_valid.json. 2014-06-01 15:25:21 +02:00
Wladimir J. van der Laan
cc342a3ede
Merge pull request #4257
5823449 Limit number of known addresses per peer (Pieter Wuille)
2014-06-01 09:53:04 +02:00
Philip Kaufmann
cb7a3edc3d remove dup of extern int nConnectTimeout; in netbase 2014-05-31 12:04:34 +02:00
Huang Le
aab2c0fd7e Remove template matching params from GetOpName()
Since they are not real opcodes, being reported as OP_UNKNOWN is less confusing for human-readable decoding.

Signed-off-by: Huang Le <4tarhl@gmail.com>
2014-05-31 01:23:53 +08:00
Huang Le
09a54a65c0 Use pnode->nLastRecv as sync score directly
NodeSyncScore() should find the node which we recv data most recently, so put a negative sign to pnode->nLastRecv is indeed wrong.

Also change the return value type to int64_t.

Signed-off-by: Huang Le <4tarhl@gmail.com>
2014-05-30 23:44:44 +08:00
Pieter Wuille
5823449e2d Limit number of known addresses per peer 2014-05-30 12:01:53 +02:00
Cory Fields
c21c74bec4 osx: Fix missing dock menu with qt5
Qt5 Removed the qt_mac_set_dock_menu function and left no replacement. It was
later re-added and deprecated for backwards-compatibility.

Qt5.2 adds the non-deprecated QMenu::setAsDockMenu(). Use that when possible.
2014-05-29 15:32:24 -04:00
Pieter Wuille
b5ef85c7a2 No references to centralized databases in help text. 2014-05-29 18:17:34 +02:00
Philip Kaufmann
53a088154c rename fNoListen to fListen and move to net
- better code readability and it belongs to net
- this is a prerequisite for a pull to add -listen to the GUI
2014-05-29 14:01:39 +02:00
Wladimir J. van der Laan
67f43a99ae
Merge pull request #4132
d4e1c61 add DEFAULT_UPNP constant in net (Philip Kaufmann)
2014-05-29 11:46:28 +02:00
Cozz Lovan
066d9a53c7 [Qt] Fix Start bitcoin on system login 2014-05-29 05:23:37 +02:00
Mathy Vanvoorden
d2b82dd7d8
Spelling fix in comment
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 3704a6a
2014-05-28 15:55:22 +02:00
Wladimir J. van der Laan
37634587a7
Merge pull request #4184
122549f Fix incorrect checkpoint data for testnet3 (David Hill)
2014-05-28 10:11:42 +02:00
Cozz Lovan
b90711cabf [Qt] Fix Transaction details shows wrong To: 2014-05-28 01:38:40 +02:00
Wladimir J. van der Laan
bdc7f1a101
Merge pull request #3861
9ec0306 Add CODESEPARATOR/FindAndDelete() tests (Peter Todd)
2014-05-27 09:41:00 +02:00
Wladimir J. van der Laan
73f7153f43
Merge pull request #4206
79d06dc Remove redundant c_str (R E Broadley)
2014-05-25 16:46:49 +02:00
Wladimir J. van der Laan
0f1040ba52
Merge pull request #4183
f40dbee remove CPubKey::VerifyCompact( ) which is never used (Kamil Domanski)
28b6c1d remove GetMedianTime( ) which is never used (Kamil Domanski)
5bd4adc remove LookupHostNumeric( ) which is never used (Kamil Domanski)
595f691 remove LogException( ) which is never used (Kamil Domanski)
f4057cb remove CTransaction::IsNewerThan which is never used (Kamil Domanski)
0e31e56 remove CWallet::AddReserveKey which is never used (Kamil Domanski)
2014-05-25 16:19:54 +02:00
Cory Fields
e9df7f8757 Qt: Fix monospace font in osx 10.9
The "Monospace" hint was added in Qt 4.8, and it works as intended as opposed
to "TypeWriter" which fails to load a font.
2014-05-24 11:13:39 -04:00
Federico Bond
cdb36eff9f Fix warning when compiling in OS X 2014-05-23 14:00:14 -03:00
Wladimir J. van der Laan
a8a0db6f21
qt: Periodic language update
Last-minute language update before release 0.9.2.
2014-05-23 17:56:07 +02:00
Wladimir J. van der Laan
97b53b581b
Merge pull request #4152
3e8ac6a Replace non-threadsafe gmtime and setlocale (Wladimir J. van der Laan)
a60838d Replace non-threadsafe strerror (Wladimir J. van der Laan)
2014-05-23 15:52:45 +02:00
Wladimir J. van der Laan
3e8ac6af9a
Replace non-threadsafe gmtime and setlocale
Make DateTimeStrFormat use boost::posix_time.

Also re-enable the util_DateTimeStrFormat tests, as they are no
longer platform specific.
2014-05-23 15:23:11 +02:00
Wladimir J. van der Laan
7cdcfa3524
Merge pull request #4212
d90491a Update test_main.cpp (LongShao007)
2014-05-23 11:42:36 +02:00
Wladimir J. van der Laan
1b7bcba1c1
Merge pull request #4166
b641c9c Fix addnode "onetry": Connect with OpenNetworkConnection (Cozz Lovan)
2014-05-23 11:39:18 +02:00
Wladimir J. van der Laan
a60838d09a Replace non-threadsafe strerror
Log the name of the error as well as the error code if a network problem
happens. This makes network troubleshooting more convenient.

Use thread-safe strerror_r and the WIN32 equivalent FormatMessage.
2014-05-23 09:45:04 +02:00
LongShao007
d90491a766 Update test_main.cpp
i think should delete (#include "bitcoin-config.h")。
2014-05-22 21:41:59 +08:00
Wladimir J. van der Laan
a48355dc44
Remove forward declaration for non-existent class CCoinsDB
Found by stephenreed on #bitcoin.dev.
2014-05-22 13:09:31 +02:00
R E Broadley
79d06dc6e0 Remove redundant c_str 2014-05-22 00:23:03 +07:00
Wladimir J. van der Laan
8cd900711c
Merge pull request #4204
305ccaa Add missing LOCK(cs_main) (Pieter Wuille)
2014-05-21 14:10:51 +02:00
Wladimir J. van der Laan
6fcdad787f
qt: Periodic language update 2014-05-21 12:27:54 +02:00
Pieter Wuille
305ccaa275 Add missing LOCK(cs_main) 2014-05-20 21:45:12 +02:00
Philip Kaufmann
d4e1c61212 add DEFAULT_UPNP constant in net
- as this is a shared Core/GUI setting, this makes it easier to keep them
  in sync (also no new includes are needed)
2014-05-20 15:34:19 +02:00
Kamil Domanski
f40dbeedde remove CPubKey::VerifyCompact( ) which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
28b6c1def5 remove GetMedianTime( ) which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
5bd4adca71 remove LookupHostNumeric( ) which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
595f691d0a remove LogException( ) which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
f4057cb749 remove CTransaction::IsNewerThan which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
0e31e5631c remove CWallet::AddReserveKey which is never used 2014-05-20 14:58:20 +02:00
Wladimir J. van der Laan
9d97e83bf6
Merge pull request #4197
0b78ba8 Remove fDaemon flag checking on return from main(), which is useless and looks really strange. (Huang Le)
2014-05-20 12:38:27 +02:00
Wladimir J. van der Laan
dff9d2f293
Merge pull request #4199
0a59723 Remove extraneous c_str (R E Broadley)
2014-05-20 09:45:40 +02:00
R E Broadley
0a59723ff6 Remove extraneous c_str 2014-05-20 12:31:26 +08:00
Huang Le
0b78ba8ad6 Remove fDaemon flag checking on return from main(), which is useless and looks really strange. 2014-05-20 01:22:33 +08:00
Wladimir J. van der Laan
aed38cbcb5
Merge pull request #4173
8c93bf4 LoadBlockIndexDB(): Require block db reindex if any blk*.dat files are missing. (Ashley Holman)
7a0e84d ProcessGetData(): abort if a block file is missing from disk (Ashley Holman)
2014-05-19 17:02:29 +02:00
Wladimir J. van der Laan
c26acfc308
Merge pull request #4174
5248ff4 SetupEnvironment() - clean commit (Stuart Cardall)
2014-05-19 15:08:48 +02:00
Roy Badami
7007402956 Implement SI-style (thin space) thoudands separator 2014-05-17 14:49:02 +01:00
David Hill
122549f6de Fix incorrect checkpoint data for testnet3 2014-05-13 16:38:36 -04:00
Stuart Cardall
5248ff4099 SetupEnvironment() - clean commit 2014-05-13 10:15:00 +00:00
Kamil Domanski
be54b87f22 remove ParseString(...) which is never used 2014-05-13 12:00:24 +02:00
Kamil Domanski
d56e30ca89 removed a few unnecessary casts 2014-05-13 11:42:00 +02:00
Kamil Domanski
3e74ac22d5 json_spirit: #include <stdint.h> 2014-05-13 11:41:59 +02:00
Kamil Domanski
4b61a6a478 switch from boost int types to <stdint.h> 2014-05-13 11:41:59 +02:00
Wladimir J. van der Laan
f923c07754 Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost
First query in the current way (intelligently determining which network
has a non-localhost interface). If this does not succeed, try plain
lookup.

Needed for testing.

Fixes #1827 by always allowing IPv6 to be used.
2014-05-13 07:23:23 +02:00
Wladimir J. van der Laan
deb3572ab1 Add -rpcbind option to allow binding RPC port on a specific interface
Add -rpcbind command option to specify binding RPC service on one
or multiple specific interfaces.

Functionality if -rpcbind is not specified remains the same as before:

- If no -rpcallowip specified, bind on localhost
- If no -rpcbind specified, bind on any interface

Implements part of #3111.
2014-05-13 07:23:23 +02:00
Wladimir J. van der Laan
fa41db8779
Merge pull request #4181
f25e3ad Fix build in OS X 10.9 (Federico Bond)
2014-05-13 07:11:10 +02:00
Wladimir J. van der Laan
795b921dd2
qt: periodic language update
Pull updated translations from Transifex.

Add mn (Mongolian) language.

Do not update English translation for now as we want to keep
compatibility with 0.9.
2014-05-13 07:06:37 +02:00
Federico Bond
f25e3adf7d Fix build in OS X 10.9 2014-05-13 01:39:42 -03:00
Wladimir J. van der Laan
53d9709e1c
Merge pull request #4142
cef4494 rpc: keep track of acceptors, and cancel them in StopRPCThreads (Wladimir J. van der Laan)
381b25d doc: remove mention of `-rpctimeout` from man page (Wladimir J. van der Laan)
1a44522 rpc: Make sure conn object is always cleaned up (Wladimir J. van der Laan)
0a0cd34 rpc: pass errors from async_accept (Wladimir J. van der Laan)
2014-05-12 17:51:45 +02:00
Ashley Holman
8c93bf4c28 LoadBlockIndexDB(): Require block db reindex if any blk*.dat files are missing. 2014-05-12 08:09:09 -05:00
Wladimir J. van der Laan
c3ad56f4e0
Merge pull request #4138
783b182 Remove dummy PRIszX macros for formatting (Wladimir J. van der Laan)
2014-05-12 14:01:48 +02:00
Wladimir J. van der Laan
68d5fb3cb3
Merge pull request #4165
f6b7c64 Move base58.h implementation code to base58.cpp (Pieter Wuille)
2014-05-12 13:52:03 +02:00
Pieter Wuille
cd01a5e185 Enable paranoid corruption checks in LevelDB >= 1.16 2014-05-12 12:52:39 +02:00
Peter Todd
9ec030622f
Add CODESEPARATOR/FindAndDelete() tests 2014-05-12 06:51:41 -04:00
Wladimir J. van der Laan
029f4904d1
Merge pull request #4161
938b689 Squashed 'src/leveldb/' changes from 9094c7f..7924331 (Pieter Wuille)
2014-05-12 11:30:03 +02:00
Wladimir J. van der Laan
cef44941e7 rpc: keep track of acceptors, and cancel them in StopRPCThreads
Fixes #4156.

The problem is that the boost::asio::io_service destructor
waits for the acceptors to finish (on windows, and boost 1.55).

Fix this by keeping track of the acceptors and cancelling them before
stopping the event loops.
2014-05-12 09:31:06 +02:00
Wladimir J. van der Laan
1a445225f6 rpc: Make sure conn object is always cleaned up
Make sure conn object always gets cleaned up by using a
`boost::shared_ptr`.

This makes valgrind happy - before this commit, one connection object
always leaked at shutdown, as well as can avoid other leaks, when
for example an exception happens.

Also add an explicit Close() to the !ClientAllowed path to make it similar
to the normal path (I'm not sure whether it is needed, but it
can't hurt).
2014-05-12 09:30:46 +02:00
Wladimir J. van der Laan
0a0cd34552 rpc: pass errors from async_accept
According to the [boost::asio documentation](http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/overload2.html),
the function signature of the handler must be:

    void handler(
      const boost::system::error_code& error // Result of operation.
    );

We were binding *all* the arguments, instead of all but the error,
resulting in nullary function that never got the error. Fix this
by adding an input argument substitution.
2014-05-12 09:30:46 +02:00
shshshsh
283e405c06 Switch stdout to line buffering
Use line buffering (instead of block buffering) so that messages arrive
immediately in systemd-journald, tail -f debug.log, and the like.
2014-05-11 23:09:21 +00:00
Ashley Holman
7a0e84dd63 ProcessGetData(): abort if a block file is missing from disk 2014-05-11 07:06:26 -05:00
Wladimir J. van der Laan
2653e00b12
Merge pull request #4160
7cd0af7 Move bignum.h to test/ (Pieter Wuille)
ccc84e0 Reduce bignum.h now it is only needed for scriptnum_tests (Pieter Wuille)
2014-05-10 15:32:18 +02:00
Pieter Wuille
f6b7c644c9 Move base58.h implementation code to base58.cpp 2014-05-10 00:42:31 +02:00
Cozz Lovan
b641c9cd21 Fix addnode "onetry": Connect with OpenNetworkConnection 2014-05-10 00:39:49 +02:00
Matthew Bogosian
90fd87376d fixes #4163 2014-05-09 12:39:24 -07:00
Pieter Wuille
aca47d2a24 Merge src/leveldb changes for LevelDB 1.17. 2014-05-09 18:23:34 +02:00
Pieter Wuille
7cd0af7cc2 Move bignum.h to test/ 2014-05-09 17:56:16 +02:00
Pieter Wuille
ccc84e0963 Reduce bignum.h now it is only needed for scriptnum_tests 2014-05-09 17:38:44 +02:00
Wladimir J. van der Laan
605d5b5558
Merge pull request #4102
21bf3d2 Add tests for BoostAsioToCNetAddr (Wladimir J. van der Laan)
fdbd707 Remove unused function WildcardMatch (Wladimir J. van der Laan)
ee21912 rpc: Use netmasks instead of wildcards for IP address matching (Wladimir J. van der Laan)
e16be73 net: Add CSubNet class for subnet matching (Wladimir J. van der Laan)
d864275 Use new function parseint32 in SplitHostPort (Wladimir J. van der Laan)
0d4ea1c util: add parseint32 function with strict error reporting (Wladimir J. van der Laan)
2014-05-09 17:26:42 +02:00
Wladimir J. van der Laan
8bcfccbc2d
Merge pull request #4076
397668e Deduplicate uint* comparison operator logic (Pieter Wuille)
df9eb5e Move {Get,Set}Compact from bignum to uint256 (Pieter Wuille)
a703150 Add multiplication and division to uint160/uint256 (Pieter Wuille)
4d480c8 Exception instead of assigning 0 in case of wrong vector length (Pieter Wuille)
eb2cbd7 Deduplicate shared code between uint160 and uint256 (Pieter Wuille)
2014-05-09 17:03:51 +02:00
Wladimir J. van der Laan
82564e21e7
Merge pull request #4134
aa250f0 Remove NumBlocksOfPeers (Wladimir J. van der Laan)
2014-05-09 16:54:07 +02:00
Wladimir J. van der Laan
21bf3d257b Add tests for BoostAsioToCNetAddr 2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
fdbd7075ca Remove unused function WildcardMatch
No longer necessary after implementing netmask-based matching.
Also remove a longer-unused function `skipspaces`.
2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
ee21912510 rpc: Use netmasks instead of wildcards for IP address matching
`-rpcallowip` currently has a wacky wildcard-based format. After this
commit it will accept the more standard format, for example:

- Ranges with netmask 127.0.0.0/255.255.255.0, ::/0
- Ranges with cidr 12.3.4.5/24, 12:34:56:78:9a:bc:de:00/112
- Loose IPs ::1, 127.0.0.1

Trying to use the old *?-based format will result in an error message at
launch.
2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
e16be73753 net: Add CSubNet class for subnet matching 2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
d864275299 Use new function parseint32 in SplitHostPort
Use the new function parseint32 in SplitHostPort instead of calling
strtol directly.
2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
0d4ea1cf8a util: add parseint32 function with strict error reporting
None of the current integer parsing functions in util
check whether the result is valid and fits in the range
of the type. This is required for less sloppy error reporting.
2014-05-09 16:45:56 +02:00
Pieter Wuille
397668ea63 Deduplicate uint* comparison operator logic 2014-05-09 16:45:00 +02:00
Pieter Wuille
df9eb5e14f Move {Get,Set}Compact from bignum to uint256 2014-05-09 16:44:59 +02:00
Pieter Wuille
a7031507e6 Add multiplication and division to uint160/uint256 2014-05-09 16:39:48 +02:00
Pieter Wuille
4d480c8a3f Exception instead of assigning 0 in case of wrong vector length 2014-05-09 16:39:48 +02:00
Pieter Wuille
eb2cbd754d Deduplicate shared code between uint160 and uint256 2014-05-09 16:39:48 +02:00
Wladimir J. van der Laan
e443ed2462
Fix transaction tests
Conflict between low-s (6fd7ef2) and test updates in d3a33fc.
2014-05-09 16:35:30 +02:00
Wladimir J. van der Laan
72f754cf51
Merge pull request #3637
6fd7ef2 Also switch the (unused) verification code to low-s instead of even-s. (Pieter Wuille)
2014-05-09 16:24:57 +02:00
Wladimir J. van der Laan
54f102248b
Merge pull request #3843
787ee0c Check redeemScript size does not exceed 520 byte limit (Peter Todd)
4d79098 Increase IsStandard() scriptSig length (Peter Todd)
f80cffa Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails (Peter Todd)
6380180 Add rejection of non-null CHECKMULTISIG dummy values (Peter Todd)
29c1749 Let tx (in)valid tests use any SCRIPT_VERIFY flag (Peter Todd)
68f7d1d Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants (Peter Todd)
2014-05-09 16:09:20 +02:00
Wladimir J. van der Laan
1c0319bb2b
Merge pull request #3965
b1fdd54 script: Add test for CScriptNum (Cory Fields)
90320d6 script: add additional script tests (Cory Fields)
05e3ecf script: remove bignum dependency (Cory Fields)
4f497cd script: switch outside users to CScriptNum (Cory Fields)
27bff74 script: switch to CScriptNum usage for scripts (Cory Fields)
48d8eb1 script: add CScriptNum class (Cory Fields)
2014-05-09 16:03:07 +02:00
Wladimir J. van der Laan
d54985f3f1
Merge pull request #3884
942b33a Split AcceptBlockHeader from AcceptBlock. (Pieter Wuille)
f457347 Split up CheckBlock in a block and header version (Pieter Wuille)
2014-05-09 16:00:41 +02:00
Gavin Andresen
aaab675a78 Merge pull request #3860 from petertodd/test-checkmulti-n-m-zero
Test CHECKMULTISIG with m == 0 and/or n == 0
2014-05-09 10:00:16 -04:00
Wladimir J. van der Laan
da257a7b36
Merge pull request #4136
01ce711 [Qt] fix Qt slot problem in receivecoinsdialog (Philip Kaufmann)
2014-05-09 12:31:57 +02:00
Wladimir J. van der Laan
9b4b3cf9cf
qt: fix compile issue in Qt GUI
This was introduced in 3e1cf9b. Needs a cast to qint64.
2014-05-08 12:23:56 +02:00
David A. Harding
e0c06d2c49
Typo Fix In decoderawtransaction Help: s/txid/hex/
Help text appears to have been copy/pasted from getrawtransaction,
so it erroneously asked for a txid where rawtransaction hex should appear.

Remove lines which were copy/pasted from getrawtransaction but which
aren't displayed by decoderawtransaction.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 5cc0133 80c521e
Github-Pull: #4106
2014-05-08 11:49:02 +02:00
Wladimir J. van der Laan
0ecd8aae20
Merge pull request #4131
3e1cf9b add DEFAULT_TRANSACTION_FEE constant in wallet (Philip Kaufmann)
2014-05-08 10:48:07 +02:00
Wladimir J. van der Laan
69e264b6f8
Merge pull request #4141
9d558e1 ui: Check for !pixmap() before trying to export QR code (Wladimir J. van der Laan)
2014-05-08 10:32:14 +02:00
Peter Todd
787ee0c913 Check redeemScript size does not exceed 520 byte limit
redeemScripts >520bytes can't be spent due to the
MAX_SCRIPT_ELEMENT_SIZE limit; previously the addmultisigaddress and
createmultisig RPC calls would let you violate that limit unknowingly.

Also made the wallet code itself check the redeemScript prior to adding
it to the wallet, which in the (rare) instance that a user has added an
invalid oversized redeemScript to their wallet causes an error on
startup. The affected key isn't added to the wallet; other keys are
unaffected.
2014-05-08 00:55:01 -04:00
Peter Todd
4d79098ad5 Increase IsStandard() scriptSig length
Removes the limits on number of pubkeys for P2SH CHECKMULTISIG outputs.
Previously with the 500 byte scriptSig limit there were odd restrictions
where even a 1-of-12 P2SH could be spent in a standard transaction(1),
yet multisig scriptPubKey's requiring more signatures quickly ran out of
scriptSig space.

From a "stuff-data-in-the-blockchain" point of view not much has changed
as with the prior commit now only allowing the dummy value to be null
the newly allowed scriptSig space can only be used for signatures. In
any case, just using more outputs is trivial and doesn't cost much.

1) See 779b519480d8c5346de6e635119c7ee772e97ec872240c45e558f582a37b4b73
   Mined by BTC Guild.
2014-05-08 00:55:01 -04:00
Peter Todd
f80cffa213 Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails 2014-05-08 00:55:01 -04:00
Peter Todd
6380180821 Add rejection of non-null CHECKMULTISIG dummy values
This is a source of transaction mutability as the dummy value was
previously not checked and could be modified to something other than the
usual OP_0 value.
2014-05-08 00:55:01 -04:00
Philip Kaufmann
4629f95b22
[Qt] fix ugly typo in bitcoin.cpp
Closes #4145.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 1e4b083
2014-05-07 15:48:17 +02:00
Wladimir J. van der Laan
a475285a53
Add missing cs_main lock to VerifyDB
Fixes issue #4139.
2014-05-07 15:15:28 +02:00
Wladimir J. van der Laan
9d558e1c18 ui: Check for !pixmap() before trying to export QR code
Adds null pointer checks as well as prevents the Save/Copy context
menu from appearing at all if no image is shown.

Fixes issue #4140
2014-05-07 08:42:12 +02:00
Philip Kaufmann
bdc83e8f45 [Qt] ensure payment request network matches client network
- replaces checks in SendCoinsDialog::handlePaymentRequest() that belong
  to PaymentServer (normal URIs are special cased, as only an isValid
  check is done on BTC addresses)
- prevents the client to handle payment requests that do not match the
  clients network and shows an error instead (mainly a problem with
  drag&drop payment requests onto the client window)
- includes some small comment changes also
2014-05-06 21:20:00 +02:00
Wladimir J. van der Laan
acc2d2ca5f
Merge pull request #4127
d387b8e rpc: add `getblockchaininfo` and `getnetworkinfo` (Wladimir J. van der Laan)
2014-05-06 16:36:55 +02:00
Wladimir J. van der Laan
783b182c8f Remove dummy PRIszX macros for formatting
Size specifiers are no longer needed now that we use typesafe tinyformat
for string formatting, instead of the system's sprintf.

No functional changes.

This continues the work in #3735.
2014-05-06 15:29:16 +02:00
Philip Kaufmann
01ce711798 [Qt] fix Qt slot problem in receivecoinsdialog
- fixes error from debug.log:
  QMetaObject::connectSlotsByName: No matching signal for
  on_recentRequestsView_selectionChanged(QItemSelection,QItemSelection)
- small style fixes (e.g. alphabetical ordering if includes etc.)
- fixes #3992
2014-05-06 12:52:21 +02:00
Wladimir J. van der Laan
b733288d95
qt: periodic translations update 2014-05-06 12:21:26 +02:00
Wladimir J. van der Laan
aa250f0453 Remove NumBlocksOfPeers
Generally useless information. Only updates on connect time, not after
that. Peers can easily lie and the median filter is not effective in
preventing that.

In the past it was used for progress display in the GUI but
`CheckPoints::guessVerificationProgress` provides a better way that is now used.
It was too easy to mislead it. Peers do lie about it in practice, see issue #4065.

From the RPC, `getpeerinfo` gives the peer raw values, which are more
useful.
2014-05-06 11:09:19 +02:00
Wladimir J. van der Laan
d387b8ec15 rpc: add getblockchaininfo and getnetworkinfo
Adds two new info query commands that take over information from
hodge-podge `getinfo`.

Also some new information is added:
- `getblockchaininfo`
  - `chain`: (string) current chain (main, testnet3, regtest)
  - `verificationprogress: (numeric) estimated verification progress
  - `chainwork`
- `getnetworkinfo`
  - `localaddresses`: (array) local addresses, from mapLocalHost (fixes #1734)
2014-05-06 09:34:54 +02:00
Philip Kaufmann
3e1cf9b6f6 add DEFAULT_TRANSACTION_FEE constant in wallet
- as this is a shared Core/GUI setting, this makes it easier to keep them
  in sync (also no new includes are needed)
2014-05-05 20:54:00 +02:00
Peter Todd
29c17498a5 Let tx (in)valid tests use any SCRIPT_VERIFY flag
Previously only P2SH could be set.
2014-05-05 05:59:59 -04:00
Peter Todd
68f7d1d7af Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants 2014-05-05 05:35:27 -04:00
Wladimir J. van der Laan
d4ffe4e425
Merge pull request #4120
dbe8f75 don't use sed's -i option to stay posix compliant (Fabian Raetz)
2014-05-05 08:58:16 +02:00
Fabian Raetz
dbe8f75262 don't use sed's -i option to stay posix compliant
POSIX does not define sed's -i option. To stay as portable
as possible we should not relay on it.
2014-05-02 21:32:12 +02:00
Wladimir J. van der Laan
ab4bd3bdbb
Merge pull request #4119
2364b11 reorder includes to compile on OpenBSD (Fabian Raetz)
2014-05-02 21:31:31 +02:00
Fabian Raetz
2364b118f2 reorder includes to compile on OpenBSD
From getifaddr(3) manual:
"If both <net/if.h> and <ifaddrs.h> are being
included, <net/if.h> must be included before <ifaddrs.h>"

http://www.openbsd.org/cgi-bin/man.cgi?query=getifaddrs&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
2014-05-02 20:45:03 +02:00
Wladimir J. van der Laan
1ab62973d3
Merge pull request #4074
d3081fa Removed LevelDB changes (super3)
2014-05-02 20:36:26 +02:00
Wladimir J. van der Laan
3e578aa9b9
Merge pull request #4114
bfb154e Update build instructions for Berkeley DB (Wladimir J. van der Laan)
d0a2e2e Log BerkeleyDB version at startup (Wladimir J. van der Laan)
2014-05-02 18:14:39 +02:00
Philip Kaufmann
2fdd4c7933 better std::exception logging for CAddrDb
- also small logging text changes
2014-05-02 14:35:30 +02:00
Wladimir J. van der Laan
583df73acd
Merge pull request #4110
3a54ad9 Full translation update (Wladimir J. van der Laan)
9dd5d79 devtools: add a script to fetch and postprocess translations (Wladimir J. van der Laan)
58c01a3 qt: add transifex configuration file (Wladimir J. van der Laan)
2014-05-02 11:50:59 +02:00
Wladimir J. van der Laan
bf35cae1ae
Merge pull request #4115
e27c411 Remove build-time no-IPv6 setting (Wladimir J. van der Laan)
2014-05-02 10:27:27 +02:00
Wladimir J. van der Laan
83d7dc44ef
Merge pull request #4032
c0e0b05 Bugfix: configure: Look in libx32 subdirectory for boost libraries (Luke Dashjr)
2014-05-02 09:25:52 +02:00
super3
d3081fa231 Removed LevelDB changes
Syntax Highlighting
2014-05-01 12:10:06 -04:00
Wladimir J. van der Laan
e27c4110d9 Remove build-time no-IPv6 setting
The year is 2014. All supported operating systems have IPv6 support,
most certainly at build time (this doesn't mean that IPv6 is configured,
of course).

If noone is exercising the functionality to disable it, that means it
doesn't get tested, and IMO it's better to get rid of it.

(it's also not used consistently in RPC/boost and Net code...)
2014-05-01 12:15:36 +02:00
Wladimir J. van der Laan
3a54ad9aba Full translation update
Last update (48be9ce) missed quite a lot, for some reason.

This is also the first update done with the new script
`contrib/devtools/update-translations.py`
2014-05-01 10:16:06 +02:00
Wladimir J. van der Laan
d0a2e2eb87 Log BerkeleyDB version at startup
Prints the actual version of BerkeleyDB that is linked against, if
wallet support is enabled.

Useful for troubleshooting.

For example:

    2014-05-01 07:44:02 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)

    2014-05-01 07:54:25 Using BerkeleyDB version Berkeley DB 5.1.29: (October 25, 20 11)
2014-05-01 09:56:14 +02:00
Wladimir J. van der Laan
d69427a0c4
Merge pull request #4092
40c5b93 [Qt] Optionally add third party links to transaction context menu (Cozz Lovan)
2014-05-01 08:20:11 +02:00
Wladimir J. van der Laan
191b087e0e
Merge pull request #4109
6b29ccc Correct indentation (R E Broadley)
2014-05-01 08:09:20 +02:00
Philip Kaufmann
1cc7f54a8d use standard __func__ instead of __PRETTY_FUNCTION__ 2014-04-30 14:45:24 +02:00
R E Broadley
6b29ccc9f9 Correct indentation 2014-04-30 14:57:11 +08:00
Wladimir J. van der Laan
48be9ceaa0
qt: Periodic translations update
Update English translation from source code, and pull other translations
from Transifex.
2014-04-29 16:02:36 +02:00
Wladimir J. van der Laan
c63b2e25a5
Merge pull request #4043
d282c1f [Qt] catch Windows shutdown events while client is running (Philip Kaufmann)
2014-04-27 18:22:12 +02:00
Cozz Lovan
40c5b939f2 [Qt] Optionally add third party links to transaction context menu 2014-04-25 20:01:20 +02:00
Pieter Wuille
942b33a19d Split AcceptBlockHeader from AcceptBlock.
Also modify some connection logic to deal with non-full blocks in the index.
2014-04-25 00:35:58 +02:00
Pieter Wuille
f457347053 Split up CheckBlock in a block and header version 2014-04-25 00:33:13 +02:00
Simon de la Rouviere
0caf2b187f Add MESSAGE_START_SIZE from chainparams when loading blocks from external files. 2014-04-24 14:32:11 +02:00
Wladimir J. van der Laan
89bbd54fbf
Merge pull request #4085
b39a07d Add missing AssertLockHeld in ConnectBlock (Wladimir J. van der Laan)
41106a5 qt: get required locks upfront in polling functions (Wladimir J. van der Laan)
ed67100 Add required locks in tests (Wladimir J. van der Laan)
2014-04-23 17:06:28 +02:00
Wladimir J. van der Laan
b39a07dc42 Add missing AssertLockHeld in ConnectBlock 2014-04-23 09:07:18 +02:00
Wladimir J. van der Laan
41106a50d2 qt: get required locks upfront in polling functions
This avoids the GUI from getting stuck on
periodical polls if the core is holding the locks for a longer time -
for example, during a wallet rescan.
2014-04-23 09:07:18 +02:00
Wladimir J. van der Laan
ed67100565 Add required locks in tests
Unit tests with DEBUG_LOCKORDER were running into assertions.
2014-04-23 08:05:05 +02:00
Cozz Lovan
bb1f1c90d6 [Qt] importwallet progress 2014-04-23 01:50:25 +02:00
Wladimir J. van der Laan
bbe53f61db
Merge pull request #4042
05c20a5 build: add symbol for upcoming gcc 4.9's libstdc++ (Cory Fields)
49a3352 gitian-linux: --enable-glibc-back-compat (Warren Togami)
d5aab70 build: add an option for enabling glibc back-compat (Cory Fields)
ffc6b67 build: add glibc/libstdc++ back-compat stubs (Cory Fields)
2014-04-22 16:24:43 +02:00
Wladimir J. van der Laan
2bbecc84e2
Merge pull request #4058
55a1db4 Solve chainActive-related locking issues (Wladimir J. van der Laan)
e07c943 Add AssertLockHeld for cs_main to ChainActive-using functions (Wladimir J. van der Laan)
2014-04-22 13:35:37 +02:00
Pieter Wuille
b58be132c9 Replace DecodeBase58/EncodeBase58 with direct implementation.
This removes the bignum/OpenSSL dependency.

The base58 transformation code is also moved to a separate .cpp file.
2014-04-22 09:30:21 +02:00
Cory Fields
b1fdd5475d script: Add test for CScriptNum
Because this class replaces some usages of CBigNum, tests have been added to
verify that they function the same way. The only difference in their usage is
the handling of out-of-range numbers.

While operands are constrained to [-0x7FFFFFFF,0x7FFFFFFF], the results may
overflow. The overflowing result is technically unbounded, but in practice
it can be no bigger than the result of an operation on two operands. This
implementation limits them to the size of an int64.

CBigNum was unaware of this constraint, so it allowed for unbounded results,
which were then checked before use. CScriptNum asserts if an arithmetic
operation will overflow an int64_t, since scripts are not able to reach those
numbers anyway. Additionally, CScriptNum will throw an exception when
constructed from a vector containing more than 4 bytes This mimics the previous
CastToBigNum behavior.
2014-04-22 00:43:31 -04:00
Cory Fields
90320d6777 script: add additional script tests 2014-04-22 00:32:30 -04:00
Cory Fields
05e3ecffa4 script: remove bignum dependency 2014-04-22 00:32:30 -04:00
Cory Fields
4f497cd97d script: switch outside users to CScriptNum 2014-04-22 00:32:30 -04:00
Cory Fields
27bff74e39 script: switch to CScriptNum usage for scripts 2014-04-22 00:32:30 -04:00
Cory Fields
48d8eb1847 script: add CScriptNum class
This class holds an int64_t and replaces the use of CBigInt for script
integrals.
2014-04-22 00:32:30 -04:00
Wladimir J. van der Laan
8da64ca47e
Merge pull request #4014
4e9667b Improve and expand base58 comments (rxl)
2014-04-19 09:05:42 +02:00
Wladimir J. van der Laan
913e90db9a
Merge pull request #3701
09ec3af AddToWallet implies BindWallet (Wladimir J. van der Laan)
2014-04-19 08:51:40 +02:00
Gregory Maxwell
fe451fe944 Merge pull request #4037 from gmaxwell/fdleaks
Prevent socket leak in ThreadSocketHandler.
2014-04-18 15:16:52 -07:00
Wladimir J. van der Laan
55a1db4fa2 Solve chainActive-related locking issues
- In wallet and GUI code LOCK cs_main as well as cs_wallet when
  necessary
- In main.cpp SendMessages move the TRY_LOCK(cs_main) up, to encompass the call
  to IsInitialBlockDownload.
- Make ActivateBestChain, AddToBlockIndex, IsInitialBlockDownload,
  InitBlockIndex acquire the cs_main lock

Fixes #3997
2014-04-18 12:49:41 +02:00
Wladimir J. van der Laan
e07c943ce8 Add AssertLockHeld for cs_main to ChainActive-using functions
All functions that use ChainActive but do not aquire the cs_main
lock themselves, need to be called with the cs_main lock held.

This commit adds assertions to all externally callable functions
that use chainActive or chainMostWork.

This will flag usages when built with -DDEBUG_LOCKORDER.
2014-04-17 16:46:01 +02:00
Wladimir J. van der Laan
2f3308f2d2
Translation update 2014-04
Push new English translation, as well as pull other translations that
changed since last month.
2014-04-17 13:47:14 +02:00
Warren Togami
3d20cd5f61 VERSION obtained from source instead of the previous git tag.
Drawback: The version string is no longer a valid git identifier.
          For this reason the 'g' short hash prefix has been removed.

Exception: When building directly from a tag this behaves exactly like the previous behavior.
           This allows formatting release versions with precision     i.e. v0.9.2
           This also allows arbitrary topicbranch names               i.e. v0.9.1-glibc-compat
2014-04-15 21:48:44 -10:00
Philip Kaufmann
d282c1fb64 [Qt] catch Windows shutdown events while client is running
- prevents unsafe shutdowns on Windows, which is known to be
  able to cause problems with wallet.dat
- if a users ends a Windows session, this will initiate a client shutdown
  and show a Windows dialog, that tells the user what is going on (for
  Windows Vista and higher it will even show a reason for blocking the
  Windows session end)
2014-04-15 11:57:55 +02:00
Wladimir J. van der Laan
74dd52a9fc
qt: remove de_AT translation
Got too many complaints that is was unserious and written by trolls.
I have also removed the translation from transifex.
Fixes #4054 and #3918.
2014-04-14 14:20:40 +02:00
rxl
4e9667b844 Improve and expand base58 comments
update comments so doxygen will pick them up
2014-04-12 11:36:52 -04:00
Cory Fields
05c20a553a build: add symbol for upcoming gcc 4.9's libstdc++ 2014-04-11 19:02:01 -04:00
Wladimir J. van der Laan
8562179612
Merge pull request #3912
b1b9c76 Fix bloom filter not to use bit_mask (peryaudo)
2014-04-11 15:13:23 +02:00
Cory Fields
d5aab70490 build: add an option for enabling glibc back-compat
Using "./configure --enable-glibc-back-compat" will attempt to be
compatible with a target running glibc abi 2.9 and libstdc++ abi 3.4.
2014-04-10 22:28:26 -04:00
Cory Fields
ffc6b678b9 build: add glibc/libstdc++ back-compat stubs
glibc/libstdc++ have added new symbols in later releases. When running a new
binary against an older glibc, the run-time linker is unable to resolve the
new symbols and the binary refuses to run.

This can be fixed by adding our own versions of those functions, so that the
build-time linker does not emit undefined symbols for them.

This enables our binary releases to work on older Linux distros, while not
incurring the downsides of a fully static binary.
2014-04-10 22:27:09 -04:00
Gregory Maxwell
0bd05b53b1 Correct some proxy related socket leaks. 2014-04-09 17:09:45 -07:00
Gregory Maxwell
d20791b0e5 Prevent socket leak in ThreadSocketHandler.
When we are over our outbound limit ThreadSocketHandler would try to
 keep the connection if the peer was addnoded.

This didn't actually work for two reasons: It didn't actually run
 the accept code due to mistaken code flow, and because we have a
 limited number of outbound semaphores it couldn't actually use the
 connection.

Instead it leaked the socket, which might have caused issue #4034.

This patch just takes out the non-functioning white-listing for now.
2014-04-09 09:30:36 -07:00
Wladimir J. van der Laan
20ecf5c27d
Merge pull request #4024
ab64381 Fix a typo in RPC signrawtransaction help (Hector Jusforgues)
2014-04-09 16:25:24 +02:00
Luke Dashjr
c0e0b05aec Bugfix: configure: Look in libx32 subdirectory for boost libraries 2014-04-09 12:59:17 +00:00
Wladimir J. van der Laan
06d1fc6112
Merge pull request #4020
71f82bf Restart-warning for spendZeroConfChange option (langerhans)
2014-04-09 10:34:31 +02:00
Hector Jusforgues
ab643811ea Fix a typo in RPC signrawtransaction help 2014-04-08 22:53:41 +07:00
Wladimir J. van der Laan
a7101b13f7
Merge pull request #4019
13a2283 build: Sync ax_boost_base.m4 with upstream. (Cory Fields)
2014-04-08 10:24:26 +02:00
langerhans
71f82bf2ab Restart-warning for spendZeroConfChange option
According to the options model, a restart is required after changing this option. So let's notify the user about it.
2014-04-07 19:26:30 +02:00
Cory Fields
13a2283a6d build: Sync ax_boost_base.m4 with upstream.
This should fix 32bit boost detection on Ubuntu Saucy+. Fixes #3945.
2014-04-07 13:19:01 -04:00
Wladimir J. van der Laan
4ae5e72128
Show error message if ReadConfigFile fails
A runaway exception was raised if ReadConfigFile fails (usually
due to a parse error in bitcoin.conf). Show an error message instead.

Fixes #4013.
2014-04-07 10:16:09 +02:00
Wladimir J. van der Laan
f4e1c347cf
Merge pull request #3972
fbf617a remove an assignment which is never used. (Yoichi Hirai)
2014-04-07 08:09:42 +02:00
Gregory Maxwell
94c8bfb23b Move assert(pindexNew); to above where we dereference pindexNew. 2014-04-05 22:11:16 -07:00
Wladimir J. van der Laan
b12dcb2c9e
Merge pull request #3572
f7257cf unified and better log/error messages for CDBEnv/CDB (Philip Kaufmann)
2014-04-04 14:10:58 +02:00
Wladimir J. van der Laan
fecda6853d
Merge pull request #3929
4c35366 Fix importwallet nTimeFirstKey (Cozz Lovan)
2014-04-03 13:50:59 +02:00
Wladimir J. van der Laan
9bd1bdd08c
Merge pull request #3928
3927836 [Qt] rescan progress (Cozz Lovan)
2014-04-03 11:51:02 +02:00
Gavin Andresen
8556b0298d Merge pull request #3842 from ditto-b/master
Fix for GetBlockValue() after block 13,440,000
2014-04-02 21:31:17 -04:00
ditto-b
5cfd3a70a6 Edit subsidy_limit_test to account for BIP42
Because no one wants 4 gold mines being discovered every mibillenium.
2014-04-02 18:00:08 -05:00
Cozz Lovan
392783697c [Qt] rescan progress 2014-04-02 03:48:07 +02:00
Wladimir J. van der Laan
397521d632
Merge pull request #3931
f61287c RPC command getmininginfo showing right genproclimit (Isidoro Ghezzi)
2014-04-01 18:11:38 +02:00
Alon Muroch
75ebced499 added many rpc wallet tests
deleted the empty no throw test in rpc_wallet_tests line 65

fixed some comments

starting verify tests

finished verify message tests

changed some comments
2014-04-01 16:08:53 +02:00
Wladimir J. van der Laan
e5681a4fa8
Merge pull request #3986
65adc3a qt: Don't require db_cxx.h when wallet disabled (Wladimir J. van der Laan)
4babd08 doc: Add note about memory reqs for compilation (Wladimir J. van der Laan)
25333a2 build: improve missing boost error reporting (Wladimir J. van der Laan)
2014-04-01 15:48:50 +02:00
Philip Kaufmann
d34b958406 [Qt] small cleanup of coincontroldialog
- use a little more Qt-style
- check for NULL pointers first and return in updateView()
- small space and formating changes
2014-04-01 10:11:18 +02:00
Philip Kaufmann
f7257cfbd9 unified and better log/error messages for CDBEnv/CDB 2014-04-01 09:41:49 +02:00
Manuel Araoz
81bfb5aebf add checks for deserialization errors 2014-03-31 15:07:46 -03:00
Manuel Araoz
232aa9e034 Add code generating data/sighash.json test data 2014-03-31 12:39:32 -03:00
Manuel Araoz
43cb41859e Add sighash tests from data file 2014-03-31 11:19:19 -03:00
paveljanik
db3a5e4151
Use the new name Bitcoin Core Daemon instead of Bitcoin server
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From-Github-Pull: #3801
2014-03-31 12:05:16 +02:00
Brandon Dahler
2b7709dc84
Wrap create_directory calls in try...catch blocks.
Ignores any exceptions thrown if directory exists, otherwise re-throws exception.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-03-31 09:51:58 +02:00
Wladimir J. van der Laan
e3e3728f46
Fix typo in createmultisig help
iCreateMultisig is not a thing.
2014-03-31 09:04:51 +02:00
Wladimir J. van der Laan
b86ed6ff23
Merge pull request #3969
ffeb473 Add nHighTransactionFeeWarning as per #3969. (Bardi Harborow)
2014-03-31 09:01:16 +02:00
Wladimir J. van der Laan
ab88ed93ef Organize RPCCommands table
Use sensible categories (overall control, P2P, blockchain/UTXO and
mining, wallet, wallet-enabled mining) and sort within each.

Also remove unnecessary #ifdef ENABLE_WALLET from `rpcnet.cpp`.

Functionality-neutral change.
2014-03-31 08:41:45 +02:00
Wladimir J. van der Laan
65adc3a893 qt: Don't require db_cxx.h when wallet disabled
Fix #3978.
2014-03-31 06:13:40 +02:00
Wladimir J. van der Laan
25333a2619 build: improve missing boost error reporting 2014-03-31 05:24:45 +02:00
Wladimir J. van der Laan
09b9c2fcd5
Merge pull request #3980
af4c2ac Fix `-printblocktree` output (Wladimir J. van der Laan)
2014-03-31 04:47:32 +02:00
Wladimir J. van der Laan
8adb7bca21
Merge pull request #3875
89d72f3 Add new DNS seed from bitnodes.io. (Addy Yeow)
2014-03-29 19:38:23 +01:00
Wladimir J. van der Laan
af4c2ac8ce Fix -printblocktree output
PrintBlockTree output was broken starting from e010af70.
Everything appears on one line.

PrintWallet() added the newline after a block, but this functionality
was removed and no newline was added.

Seemingly, no one noticed. Add a newline after the block information
to fix this.
2014-03-29 16:25:47 +01:00
Bardi Harborow
ffeb47366d Add nHighTransactionFeeWarning as per #3969. 2014-03-29 05:17:28 -04:00
Wladimir J. van der Laan
55027a8c85
Merge pull request #3973
a60ab0b Make GetAvailableCredit run GetHash() only once per transaction. (Gregory Maxwell)
2014-03-29 09:35:11 +01:00
Wladimir J. van der Laan
e9d2e6ed90
Merge pull request #3922
c17f0a5 [Qt] remove space from translation of client bitness (Philip Kaufmann)
2014-03-29 06:03:08 +01:00
Gregory Maxwell
a60ab0ba89 Make GetAvailableCredit run GetHash() only once per transaction.
This makes the first getbalance/getinfo 63x faster on my wallet.
2014-03-28 09:58:40 -07:00
Yoichi Hirai
fbf617a5f1 remove an assignment which is never used. 2014-03-28 20:22:00 +09:00
Wladimir J. van der Laan
acac57b8af
Merge pull request #3730
1d46fe3 'sendrawtransaction' improvements (Wladimir J. van der Laan)
2014-03-28 09:53:49 +01:00
Wladimir J. van der Laan
e33cc87212
Merge pull request #3698
5409404 add constant for shared (GUI/core) -par settings (Philip Kaufmann)
2014-03-27 13:02:24 +01:00
Wladimir J. van der Laan
1d46fe3327 'sendrawtransaction' improvements
- Make it report the reject code and reason
- Make it possible to re-send transactions that are already in the mempool
2014-03-27 12:33:55 +01:00
Philip Kaufmann
5409404d75 add constant for shared (GUI/core) -par settings
- introduce DEFAULT_SCRIPTCHECK_THREADS in main.h
- only show values from -"MAX_HW_THREADS" up to 16 for -par, as it
  makes no sense to try to leave more "cores free" than the system
  supports anyway
- use the new constant in optionsdialog and remove defaults from
  .ui file
2014-03-27 11:54:13 +01:00
Wladimir J. van der Laan
ebb783a9f2
Merge pull request #3603
a486abd replace custom GetFilesize() with boost::filesystem::file_size() (Philip Kaufmann)
2014-03-27 11:38:34 +01:00
Wladimir J. van der Laan
77eaa6fc45
Merge pull request #3682
3e0753b always show syncnode in getpeerinfo (fixes #2717) (Philip Kaufmann)
2014-03-27 11:20:49 +01:00
Wladimir J. van der Laan
410c2fa317
Merge pull request #3619
7398f4a improve command-line options output (Cozz Lovan)
2014-03-27 11:07:37 +01:00
Philip Kaufmann
cfe4cad9e5 [Qt] fix style, formating, comment and indentation problems
- introduced by #3920
2014-03-27 09:22:15 +01:00
Wladimir J. van der Laan
47ef190637
Merge pull request #3958
dfd3996 Remove duplicate from src/makefile.am (Wladimir J. van der Laan)
2014-03-26 12:03:54 +01:00
Wladimir J. van der Laan
95f0af5cb1
Merge pull request #3951
3cb1edb Update moved and dead links (Luke Dashjr)
2014-03-26 10:44:47 +01:00
Wladimir J. van der Laan
dfd3996217 Remove duplicate from src/makefile.am
chainparams.cpp should not be in both libbitcoin_common and
libbitcoin_server. Also re-sort the sources list.
2014-03-26 10:22:01 +01:00
Cozz Lovan
7398f4a796 improve command-line options output 2014-03-25 13:09:20 +01:00
Wladimir J. van der Laan
c61fe44194 qt: Only override -datadir if different from the default
Fixes #3905.
2014-03-25 09:26:11 +01:00
Wladimir J. van der Laan
7e591c19e7 qt: Do proper boost::path conversion
Convert from QString unicode from/to the OS-dependent locale
as used by boost::filesystem::path as needed.

Solves #3916.
2014-03-25 09:20:10 +01:00
Wladimir J. van der Laan
e3f5d4338d
Fix test build after d138598
Building the tests was giving some vague error message about a doubly-defined
symbol.

The solution is to define ShutdownRequested in test_bitcoin.cpp as well
so that init.cpp does not get pulled in.
2014-03-25 07:54:53 +01:00
Luke Dashjr
3cb1edbfb6 Update moved and dead links 2014-03-24 20:26:02 +00:00
Gavin Andresen
d138598f63
Fix regression tests
Taught bitcoind to close the HTTP connection after it gets a 'stop' command,
to make it easier for the regression tests to cleanly stop.
Move bitcoinrpc files to correct location.
Tidied up the python-based regression tests.
2014-03-24 19:14:51 +01:00
Wladimir J. van der Laan
d3c3210fa3
Merge pull request #3927
ab1edd4 [Qt] Fix enable/disable show and remove buttons (Cozz Lovan)
2014-03-23 11:28:52 +01:00
Isidoro Ghezzi
f61287c9b1 RPC command getmininginfo showing right genproclimit 2014-03-22 15:03:06 +01:00
Chris Beams
6540025f10 Remove stale and redundant src/.gitignore file
This commit removes completely the src/.gitignore file, given that the
precedent for ignoring artifacts within the `src` directory is to
add entries for them to the root .gitignore file.

Note also that the lone entry in src/.gitignore is stale anyway. As of
the switch to Autotools in 35b8af9, the build no longer build creates
artifacts in `src/test_bitcoin`. They are now written to
`src/test/test_bitcoin`, and this latter path is already ignored in the
root .gitignore file.
2014-03-22 13:52:27 +01:00
Cozz Lovan
ab1edd44d8 [Qt] Fix enable/disable show and remove buttons 2014-03-21 17:13:00 +01:00
Cozz Lovan
4c35366bdc Fix importwallet nTimeFirstKey 2014-03-21 14:23:45 +01:00
Wladimir J. van der Laan
788590736d qt: translation update 2014-03-21 12:13:10 +01:00
Wladimir J. van der Laan
fc5d85c4bb
Merge pull request #3806
9e2872c Adjust branding in datadir lock error message (Michagogo)
d30d379 Slightly tweak error when unable to bind port (Michagogo)
2014-03-21 09:58:02 +01:00
Wladimir J. van der Laan
be0afe238b
Merge pull request #3850
16d281b [Qt] add expert section to wallet tab in optionsdialog (Cozz Lovan)
2014-03-21 09:26:30 +01:00
Wladimir J. van der Laan
162c33d246
Merge pull request #3892
b8edf6c Qt: Fix ESC in disablewallet mode (Wladimir J. van der Laan)
2014-03-21 09:24:20 +01:00
Philip Kaufmann
c17f0a58b4 [Qt] remove space from translation of client bitness
- its rather easy to leave out the space on Transifex, so remove it from
  the string
2014-03-21 08:49:51 +01:00
gubatron
8c29273ff0 [QT] Fixes feel when resizing the last column on tables (issue #2862)
Re-submitting this pull request with a single commit.

This patch introduces a GUIUtil class that is used when setting up the 2 tables we have so far on the Qt-GUI.
In the past you could only resize the last column, which has BTC amounts from the right border of the column header, something that was rather unnatural.

If a new table were ever to be added to the interface, fixing the last columns resizing behavior is rather simple. Just look at how we initialize here a TableViewLastColumnResizingFixer object when setting up the table header's behavior, and then how we override the resize event of the component (can be the table, or the dialog) and we invoke columnResizingFixer->stretchColumnWidth(columnIndex);
2014-03-21 01:45:47 -04:00
Wladimir J. van der Laan
5c80b9a7fb build: build qt tests after qt libs/executable
Autotools defaults to a depth-first recursion which causes the qt tests
to be built before the executables and libraries.

This is inconvenient as make needs to be called twice to make sure the
tests are up to date after changing a source file.

Update the Makefile.am to change this order.
2014-03-20 17:35:40 +01:00
peryaudo
b1b9c76262 Fix bloom filter not to use bit_mask 2014-03-20 13:21:23 +09:00
Wladimir J. van der Laan
0d8e80fe07
Merge pull request #3895
74f66a5 Fixed compile error on Debian jessie (gcc version 4.8.2 (Debian 4.8.2-16)) (Meeh)
2014-03-19 09:24:35 +01:00
Meeh
74f66a5e29 Fixed compile error on Debian jessie (gcc version 4.8.2 (Debian 4.8.2-16)) 2014-03-18 22:54:47 +01:00
Wladimir J. van der Laan
b8edf6c0d8 Qt: Fix ESC in disablewallet mode
Fixes issue #3854
2014-03-18 14:51:28 +01:00
Cozz Lovan
16d281ba84 [Qt] add expert section to wallet tab in optionsdialog 2014-03-18 13:48:59 +01:00
Wladimir J. van der Laan
3fc6846181 Add licenses for tests and test data
- Add license headers to source files (years based on commit dates)
  in `src/test` as well as `qa`
- Add `README.md` to `src/test/data` specifying MIT license

Fixes #3848
2014-03-18 10:20:55 +01:00
Wladimir J. van der Laan
61774f82b3
Merge pull request #3855
0fde3bb [Qt] Fill in label from address book also for URIs (Cozz Lovan)
2014-03-18 09:24:02 +01:00
Wladimir J. van der Laan
5b6e9811fa
Merge pull request #3867
b40bdd6 qt: Show also value for options overridden on command line (Wladimir J. van der Laan)
2014-03-17 10:38:37 +01:00
Wladimir J. van der Laan
ff0c0dd6a9
Merge pull request #3874
caee92d qt: Enable and disable the Show and Remove buttons for requested payments history based on whether any entry is selected. (Haakon Nilsen)
2014-03-17 10:17:39 +01:00
Cory Fields
a22e9a32b3 build: fix explicit --disable-qt-dbus
It worked in the auto/yes cases, but an explicit disable actually forced
it on.
2014-03-15 21:52:02 -04:00
Wladimir J. van der Laan
cb0c42e7da
Merge pull request #3876
a1465ac qt: Show weeks as well as years behind for long timespans (Wladimir J. van der Laan)
2014-03-15 16:40:02 +01:00
Wladimir J. van der Laan
acfe60677c
Merge pull request #3650
2b45345 minor style cleanups (Philip Kaufmann)
2014-03-15 10:24:04 +01:00
Wladimir J. van der Laan
a1465ac8e6 qt: Show weeks as well as years behind for long timespans
Closes #3811.
2014-03-15 10:13:37 +01:00
philsong
2834bc8013 qt: change CT_NOW string to CT_NEW in log message
Closes #3852.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 5f2907a, 88d3df4
2014-03-15 09:00:48 +01:00
Wladimir J. van der Laan
a9801cf7ee
Merge pull request #3871
b51700a [Qt] Dont set table color in coin control (Cozz Lovan)
2014-03-15 07:41:13 +01:00
Addy Yeow
89d72f3d9b Add new DNS seed from bitnodes.io. 2014-03-15 14:15:40 +11:00
Haakon Nilsen
caee92dfa8 qt: Enable and disable the Show and Remove buttons for requested payments history
based on whether any entry is selected.
2014-03-15 00:41:23 +01:00
Cozz Lovan
b51700a852 [Qt] Dont set table color in coin control 2014-03-14 13:45:43 +01:00
Wladimir J. van der Laan
b40bdd6532 qt: Show also value for options overridden on command line
Currently only the name of the option is shown for GUI options
overridden by command line (or configuration file). This commit
adds the value of the options as well, which is useful for
troubleshooting.
2014-03-14 07:22:59 +01:00
Gregory Maxwell
1294cdc43f Add a "relayfee" field to getinfo.
This shows the minimum relay fee for non-free transactions in btc/kb.

The armory developers requested this so that they can prevent users from
 creating transactions that not even their local bitcoind will relay.

This also slightly reorders the getinfo output so that the fee related
 lines are grouped and changes the help text to reflect that the units
 are btc/kb.
2014-03-13 23:22:18 -07:00
Gavin Andresen
1e13f57f56 Merge pull request #3849 from cozz/cozz2
Fix missing wallet lock in CWallet::SyncTransaction(..)
2014-03-13 11:43:25 -04:00
Wladimir J. van der Laan
74502e753b
Merge pull request #3846
3f2a017 [Qt] Fix coin control qt5 checkbox bug in tree mode (Cozz Lovan)
2014-03-13 15:19:26 +01:00
Peter Todd
d3a33fc869
Test CHECKMULTISIG with m == 0 and n == 0 2014-03-12 21:18:07 -04:00
Peter Todd
b41e594773
Fix script test handling of empty scripts
Previously an empty script would evaluate to OP_0
2014-03-12 20:14:01 -04:00
Michagogo
9e2872c234 Adjust branding in datadir lock error message 2014-03-12 22:14:11 +02:00
Gavin Andresen
ca0b8acbf3 Merge pull request #3841 from schildbach/script-tests-OP_0
Add script test to prove that OP_0 evaluates as the empty vector.
2014-03-12 15:12:08 -04:00
Cozz Lovan
0fde3bbf07 [Qt] Fill in label from address book also for URIs 2014-03-12 17:08:00 +01:00
Cozz Lovan
53d56881a8 Fix missing wallet lock in CWallet::SyncTransaction(..) 2014-03-11 23:39:51 +01:00
Philip Kaufmann
2b45345aac minor style cleanups 2014-03-11 17:26:05 +01:00
Wladimir J. van der Laan
fbdf4e5efa
Merge pull request #3844
c52c4e5 qt: Make it possible again to specify -testnet in config file (Wladimir J. van der Laan)
2014-03-11 17:03:24 +01:00
Gavin Andresen
669264c176 Merge branch 'match_relay_fee' of git://github.com/mikehearn/bitcoin 2014-03-11 11:20:07 -04:00
Cozz Lovan
3f2a0172f5 [Qt] Fix coin control qt5 checkbox bug in tree mode 2014-03-11 14:16:48 +01:00
Wladimir J. van der Laan
1264b3647d
Merge pull request #3696
c4656e0 Add progress to initial display of latest block downloaded. (R E Broadley)
75b8953 Display progress of rescan. (R E Broadley)
2014-03-11 09:18:16 +01:00
Wladimir J. van der Laan
c52c4e5d14 qt: Make it possible again to specify -testnet in config file
Changes for the datadir chooser have made it impossible to specify
the network (testnet/regtest) in the configuration file for the GUI.

Reorganize the initialization sequence to make this possible again.

- Moves the "datadir" QSetting so that is no longer dependent on the
  network-specific application name (doing otherwise would create a
  chicken-and-egg problem).

- Re-initialize translations after choosing network. There may be a
  different language configured in network-specific settings
  (slim chance, but handle it for sanity).

Fixes point 1 of #3840.
2014-03-11 08:46:01 +01:00
ditto-b
c5a9d2ca9e Fix for GetBlockValue() after block 13,440,000
Forces the block reward to zero when right shift in GetBlockValue() is
undefined, after 64 reward halvings (block height 13,440,000).
2014-03-10 19:02:36 -05:00
Andreas Schildbach
ffd082a6a3 Add script test to prove that OP_0 evaluates as the empty vector, rather than [0]. 2014-03-11 00:59:33 +01:00
Pieter Wuille
6fd7ef2bbf Also switch the (unused) verification code to low-s instead of even-s.
a81cd968 introduced a malleability breaker for signatures
(using an even value for S). In e0e14e43 this was changed to
the lower of two potential values, rather than the even one.
Only the signing code was changed though, the (for now unused)
verification code wasn't adapted.
2014-03-10 20:38:32 +01:00
Mike Hearn
037b4f1485 Make mining fee policy match relay fee policy.
This resolves a case in which a mismatch could be used to bloat up the
mempool by sending transactions that pay enough fee to relay, but not
to be mined, with the default policies.
2014-03-10 19:17:18 +01:00
Jeff Garzik
a63f8b7b36 Merge pull request #3717 from djpnewton/wallet-txcount
add getwalletinfo RPC call with wallet transaction count
2014-03-10 13:37:03 -04:00
Wladimir J. van der Laan
0ffd87f1c1
qt: Remove control characters from ko_KR translation
Last Transifex pull (064a690) introduced a few control characters
into the Korean translation, which sometimes causes the build to fail.

Manually remove these characters for now to get the build working --
they should still be removed at Transifex too.
2014-03-10 17:04:35 +01:00
Wladimir J. van der Laan
636d8e4de6
Merge pull request #3815
5283410 Remove unused includes of boost lexical_cast (Wladimir J. van der Laan)
2014-03-10 16:32:50 +01:00
Wladimir J. van der Laan
064a690515 Transifex pull pre-0.9.0rc3/final 2014-03-10 14:15:46 +01:00
Wladimir J. van der Laan
b76733d8e8
Merge pull request #3514
f59d8f0 Per-peer block download tracking and stalled download detection. (Pieter Wuille)
2014-03-10 13:23:18 +01:00
Wladimir J. van der Laan
70b8cb9ce8
qt: Adjust BLOCK_CHAIN_SIZE to 20GB
This increases the space requirement for selecting a data directory in
the UI.
As suggested by @bardiharborow, fixes #3830.
2014-03-10 10:06:15 +01:00
Wladimir J. van der Laan
218be95903
Merge pull request #3685
8e29623 [Qt] show number of in/out connections in debug console (Philip Kaufmann)
2014-03-10 10:03:53 +01:00
Wladimir J. van der Laan
1cab453ff8
Merge pull request #3817
e935293 Minor code cleanup: remove indentation (Mark Friedenbach)
2014-03-10 09:33:19 +01:00
Mark Friedenbach
e935293e17 Minor code cleanup: remove indentation
This indentation should have been stripped out when AreInputsStandard was made a top-level function instead of a CTransaction method.
2014-03-08 00:43:35 -08:00
jtimon
89ec3a2911 MainNet is the special case for the GUI 2014-03-07 22:59:30 -08:00
Wladimir J. van der Laan
5283410568 Remove unused includes of boost lexical_cast
We don't use lexical_cast anywhere, no need to include it.
2014-03-07 17:55:13 +01:00
Wladimir J. van der Laan
09ec3af166 AddToWallet implies BindWallet
Now that AddToWallet is called when loading transactions from the
wallet database, BindWallet can be integrated into that and does not
need to be an extra step.

Leaves behaviour unchanged, but makes the
fFromLoadWallet/!fFromLoadWallet paths in AddToWallet a bit more
symmetric.
2014-03-07 09:20:11 +01:00
Wladimir J. van der Laan
c7c3262774
Merge pull request #3768
fecba4e Total money limit test (Pieter Wuille)
2014-03-07 08:59:03 +01:00
Wladimir J. van der Laan
9b7449bae6
Merge pull request #3805
8a6894c Log which wallet is used during init (Wladimir J. van der Laan)
2014-03-07 07:51:53 +01:00
Wladimir J. van der Laan
1bcf81e042 gui: Prevent status icons from being cut off
After the Qt5 switch, status icons were being cut off by 1-2px.

Also fixes some other cases where the UI is slightly off mentioned in #3800.

Fixes #3800.
2014-03-06 14:56:31 +01:00
Michagogo
d30d379beb Slightly tweak error when unable to bind port
A slight improvement over 2d2d8fae3d -- we don't know that it's the daemon, it could be the GUI.
2014-03-05 18:25:35 +02:00
Wladimir J. van der Laan
8a6894ca3e Log which wallet is used during init
Now that the wallet can be selected using -wallet it is important
to log which wallet is being used for later troubleshooting.
2014-03-05 16:15:04 +01:00
Cozz Lovan
ba51c7da40 Fix null pointer in IsTrusted() 2014-03-05 15:05:44 +01:00
Pieter Wuille
fecba4e269 Total money limit test
Added bounds check by @il--ya.

Updated-by: Wladimir van der Laan <laanwj@gmail.com>
2014-03-05 12:07:58 +01:00
paveljanik
2d2d8fae3d Clarify the error message when unable to bind to port 2014-03-05 10:42:52 +01:00
paveljanik
094eeff0ba Bitcoin is running fine...
When bitcoind can't bind, bitcoin server (or Bitcoin Core Daemon) is probably already running. Add the missing word "server". Bitcoin itself is definitely running ;-)

Add _(...) so the string can be localized.

I apologize for such trivial changes, learning github interface.
2014-03-05 00:02:18 +01:00
Wladimir J. van der Laan
c975e99ca9
Merge pull request #3784
dc01ba7 Fix coin control sorts date as text (Cozz Lovan)
2014-03-04 15:06:18 +01:00
Wladimir J. van der Laan
ad6ae48939
build: Version bump to 0.9.99, disable IS_RELEASE
`master` is not a release. Use the same convention as before and label
these intermediate builds as x.x.99.
2014-03-04 13:33:39 +01:00
Cozz Lovan
dc01ba7b0c Fix coin control sorts date as text 2014-03-03 23:26:00 +01:00
Philip Kaufmann
8e29623077 [Qt] show number of in/out connections in debug console 2014-03-03 22:35:02 +01:00
Philip Kaufmann
a486abd419 replace custom GetFilesize() with boost::filesystem::file_size() 2014-03-03 22:33:09 +01:00
Wladimir J. van der Laan
098316c70f English translation update
A few new messages have been added since last update.
2014-03-01 09:06:10 +01:00
Gavin Andresen
7be6ebcf08 Merge pull request #3744 from petertodd/document-isvalid-is-consensus-critical
Document that CPubKey.IsValid() is consensus critical
2014-02-28 15:27:58 -05:00
Gavin Andresen
829f822267 Merge pull request #3767 from laanwj/2014_02_tinyformat_errors_non_fatal
Make tinyformat errors raise an exception instead of assert()ing
2014-02-28 15:17:28 -05:00
Gavin Andresen
f60e49d49c Merge pull request #3694 from gavinandresen/vfspent
Remove CWalletTx::vfSpent
2014-02-28 15:16:25 -05:00
Wladimir J. van der Laan
f642fd9dd6 qt: Modernize 'confirmed' terminology in shown tx status
These days we regard transactions with one confirmation to be
'Confirmed'.
Waiting for 6 confirmations is a recommendation but should not
keep the transaction shown as unconfirmed.

Misc code sanity:

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

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

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

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

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

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

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

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

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

(an alternative would be to sweep the entire codebase using sed -i to
get rid of the size specifiers but this has less diff impact)
2014-02-22 11:36:37 +01:00
Wladimir J. van der Laan
b96f6a77f8 Remove "conflicted" as transaction category.
We were losing information about sent/received by overriding the
category in case of a conflicted transaction.

Hence, remove the "conflicted" category.

Conflicted status of a transaction can still be determined by looking
for confirmations<0.
2014-02-21 16:34:06 +01:00
Jeff Garzik
595b6d88d4 script: tighten multisig non-standard rules: do not relay pubkeys above 65 bytes 2014-02-21 02:26:51 -05:00
Christian von Roques
a3138ed42b add test of DecodeBase58 skipping whitespace 2014-02-21 01:01:48 +00:00
Wladimir J. van der Laan
76a77059f3
Merge pull request #2910
d8b4b49 Don't store or send side-chain blocks lower than last checkpoint. (Ashley Holman)
2014-02-20 12:32:32 +01:00
R E Broadley
c4656e0d88 Add progress to initial display of latest block downloaded. 2014-02-19 18:23:13 -08:00
R E Broadley
75b8953a2c Display progress of rescan. 2014-02-19 18:23:12 -08:00
Wladimir J. van der Laan
7f080fbef7
Merge pull request #3703
ad54a9b Change new constants in txdb.h to int64_t (Wladimir J. van der Laan)
2014-02-19 09:04:09 +01:00
Wladimir J. van der Laan
38ebd0fee8
Merge pull request #3699
ddcabae qt: Rename 'Confirmed' balance to 'Spendable' on overview page (Wladimir J. van der Laan)
2014-02-19 08:50:22 +01:00
Wladimir J. van der Laan
ddcabae0de qt: Rename 'Confirmed' balance to 'Spendable' on overview page
The word 'Spendable' more precisely says what the balance actually means.

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

I also changed the AssertLockHeld() routine print to stderr and
abort, instead of printing to debug.log and then assert()'ing.
It is annoying to look in debug.log to find out which
AssertLockHeld is failing.
2014-02-18 12:11:46 -05:00
Wladimir J. van der Laan
ad54a9b83f Change new constants in txdb.h to int64_t
A shift overflow was happening when using these to check against in init.cpp.
Fixes #3702.
2014-02-18 17:13:32 +01:00
Wladimir J. van der Laan
5c99323459
Merge pull request #3693
f05fa03 [Qt] small .ui cleanup for optionsdialog and coincontrol (Philip Kaufmann)
2014-02-18 14:37:58 +01:00
Wladimir J. van der Laan
bd8e3751d7
Merge pull request #3687
82e9600 add constants for shared (GUI/core) -dbcache settings (Philip Kaufmann)
879b390 Increase default dbcache to 100 MiB (Pieter Wuille)
2014-02-18 08:35:45 +01:00
Wladimir J. van der Laan
0a0cf14337
Merge pull request #3691
a143d4c Fix crash in importwallet and dumpwallet formatting (Wladimir J. van der Laan)
2014-02-17 18:45:10 +01:00
Wladimir J. van der Laan
a143d4ce58 Fix crash in importwallet and dumpwallet formatting
- DecodeDumpTime was passing a statically allocated facet object to
  std::locale. However, "The constructed locale object takes over
  responsibility for deleting this facet object." causing a free()
  crash on scope exit. Fixes #3670.

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

Metadata from the original transaction is copied to the mutant,
so the transaction time and "from" account of the mutant are
reported correctly.
2014-02-14 18:13:42 -05:00
Gavin Andresen
05d3ded072 Merge pull request #3669 from gavinandresen/dead_txns
Handle "conflicted" transactions properly
2014-02-14 14:40:32 -05:00
Wladimir J. van der Laan
9a3d936fc2 qt: GUI for conflicted transactions
- Exclamation mark icon for conflicted transactions
- Show mouseover status for conflicted transactions as "conflicted"
- Don't show inactive transactions on overview page overview
2014-02-14 13:25:24 -05:00
Jeff Garzik
518f3bdae3 Add -zapwallettxes cli/config option, used for wallet recovery
This diagnostic tool removes all "tx" records from the wallet db,
then forces a full rescan, to rebuild "tx" records accurately.
2014-02-14 11:33:07 -05:00
Gavin Andresen
2b72d46f42 Handle "conflicted" transactions properly
Extend CMerkleTx::GetDepthInMainChain with the concept of
a "conflicted" transaction-- a transaction generated by the wallet
that is not in the main chain or in the mempool, and, therefore,
will likely never be confirmed.

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

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

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

After: all agree, 49 BTC available to spend.
2014-02-14 11:08:40 -05:00
Wladimir J. van der Laan
6056c87d25
Merge pull request #3662
0542619 Rename IsConfirmed to IsTrusted to better match the intended behavior. (Gregory Maxwell)
2014-02-13 20:12:46 +01:00
Wladimir J. van der Laan
3a1c20b77a Add raw transaction hex to gettransaction wallet RPC
This allows getting raw transaction data from the wallet even if the
transaction is no longer in the blockchain / mempool (for example if it
got orphaned due to malleability abuse).
2014-02-13 17:30:00 +01:00
Philip Kaufmann
bbfce8a4c9 fix non-standard reason string in main.cpp 2014-02-13 15:12:18 +01:00
Gregory Maxwell
0542619d93 Rename IsConfirmed to IsTrusted to better match the intended behavior.
This doesn't change the functionality at all.
2014-02-12 16:23:06 -08:00
b6393ce9-d324-4fe1-996b-acf82dbc3d53
fdbc2b142d If requested, actually treat uncomfirmed change as being uncomfirmed
This commit strengthens 1bbca249b2 by updating the CWalletTx::IsConfirmed() function.

If (bSpendZeroConfChange==false), then IsConfirmed() should actually treat unconfirmed change as being unconfirmed.
2014-02-12 05:41:32 +00:00
Wladimir J. van der Laan
19e5b9d2df
Merge pull request #3651
1bbca24 Add option to avoid spending unconfirmed change (Wladimir J. van der Laan)
2014-02-11 22:14:13 +01:00
Pieter Wuille
87fe71e1fc Add HasCanonicalPushes(), and use it in IsStandardTx 2014-02-11 21:11:59 +01:00
Pieter Wuille
9aea601b05 Move IsPushOnly() to script.cpp 2014-02-11 20:38:23 +01:00
Wladimir J. van der Laan
1bbca249b2 Add option to avoid spending unconfirmed change 2014-02-11 12:49:33 +01:00
gubatron
57702541a2 Copyright header updates s/2013/2014 on files whose last git commit was done in 2014.
contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
2014-02-09 21:06:06 -05:00
Wladimir J. van der Laan
b19bcb752b
Merge pull request #3638
cdb6c16 remove setting methods in wallet/walletdb (Cozz Lovan)
44eb59e [Qt] remove broken OptionsModel::Upgrade() (Cozz Lovan)
2014-02-09 13:04:02 +01:00
Wladimir J. van der Laan
0514fb3b4c
Merge pull request #3606
6943cb9 small changes to rpc command help message strings (Philip Kaufmann)
2014-02-09 09:56:37 +01:00
Wladimir J. van der Laan
d54e819f65 Log warnings when bootstrap files are specified but cannot be opened
- Log a warning when bootstrap files are specified using `-loadblock`
but cannot be opened.
- Log a warning when bootstrap.dat exists in the home directory
but cannot be opened.
2014-02-09 09:12:57 +01:00
Pieter Wuille
f59d8f0b64 Per-peer block download tracking and stalled download detection.
Keep track of which block is being requested (and to be requested) from
each peer, and limit the number of blocks in-flight per peer. In addition,
detect stalled downloads, and disconnect if they persist for too long.

This means blocks are never requested twice, and should eliminate duplicate
downloads during synchronization.
2014-02-08 16:52:19 +01:00
Gavin Andresen
95e66247eb Merge pull request #3609 from sipa/limitorphanblocks
Limit the number of orphan blocks in memory
2014-02-08 10:49:49 -05:00
Cozz Lovan
cdb6c16935 remove setting methods in wallet/walletdb 2014-02-07 12:59:46 +01:00
Cozz Lovan
44eb59e4a6 [Qt] remove broken OptionsModel::Upgrade() 2014-02-07 12:27:41 +01:00
Cozz Lovan
b920148258 [Qt] Improve single step in bitcoinamountfield 2014-02-02 07:57:50 +01:00
Cozz Lovan
eb0d9ecb6e [Qt] Fix nTransactionFee in qt-settings 2014-02-02 01:59:57 +01:00
Pieter Wuille
bbde1e99c8 Limit the number of orphan blocks
In case the total number of orphan blocks in memory exceeds a limit
(currently set to 750), a random orphan block (which is not
depended on by another orphan block) is dropped. This means it will
need to be downloaded again, but it won't consume memory until then.
2014-01-31 14:16:06 +01:00
Wladimir J. van der Laan
19007cf552
Merge pull request #3592
c117d9e Support for error messages and a few more rejection reasons (Luke Dashjr)
14e7ffc Use standard BIP 22 rejection reasons where applicable (Luke Dashjr)
2014-01-30 16:45:26 +01:00
Philip Kaufmann
6943cb9b4f small changes to rpc command help message strings 2014-01-30 14:13:30 +01:00
Wladimir J. van der Laan
39d4eee96e
Merge pull request #3601
c32a486 Add more data-driven tests. (Matt Corallo)
2014-01-30 11:26:56 +01:00
Wladimir J. van der Laan
f64b5de4e0 Final bitcoin_en update before 0.9.0rc1
Just for completeness. Only a few messages changed or moved since last time.

Don't change any translatable messages until 0.9 final unless really necessary.
2014-01-30 10:14:00 +01:00
Matt Corallo
c32a486f4b Add more data-driven tests. 2014-01-30 03:53:52 -05:00
Wladimir J. van der Laan
9b818ed8bf
Merge pull request #3588
df966d1 log parameter interactions to debug.log (Philip Kaufmann)
2014-01-30 08:47:10 +01:00
Gavin Andresen
3581abdd46 Merge pull request #3370 from sipa/headersfirst3
Prepare block connection logic for headers-first
2014-01-29 13:49:15 -08:00
Luke Dashjr
c117d9e93a Support for error messages and a few more rejection reasons 2014-01-29 17:39:24 +00:00
Luke Dashjr
14e7ffcc64 Use standard BIP 22 rejection reasons where applicable 2014-01-29 17:39:18 +00:00
Wladimir J. van der Laan
a7f3aedec3 Re-add BTC/KB in help message for settxfee
Commit a22eed6a got reverted in a RPC documentation update, redo it.
2014-01-29 17:25:04 +01:00
Wladimir J. van der Laan
de9b4c7abc qt: Add closing newline to help message
`bitcoin-qt --help` was missing a final newline.
2014-01-29 17:20:26 +01:00
Wladimir J. van der Laan
f9a2f08882 Bump version numbers for 0.9.0rc1 release 2014-01-29 16:09:11 +01:00
Wladimir J. van der Laan
9bbbfe188c qt: Fix Windows/Darwin executable metadata
.rc's should be linked into the executable directly,
not through a helper library.
2014-01-29 15:05:42 +01:00
Wladimir J. van der Laan
c3d966690c
qt: Transifex pull before 0.9.0rc1 2014-01-29 14:51:44 +01:00
Wladimir J. van der Laan
4412c5a759 Fix getaddednodeinfo RPC call with dns=false
The getaddednodeinfo RPC call, when invoked with the dns flag set to
false, returns a malformed JSON object with duplicate keys.

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

Fixes #3581.
2014-01-29 14:46:06 +01:00
Wladimir J. van der Laan
69d03bc6e2 qt: Fix tab order in send and receive tab 2014-01-29 14:41:41 +01:00
Cozz Lovan
79fb0557cf [Qt] minor receive tab improvements 2014-01-29 14:20:15 +01:00
Wladimir J. van der Laan
624154114f
Merge pull request #3597
3cf1f43 Mention `*` value for account in documentation for `getbalance` RPC (Wladimir J. van der Laan)
2014-01-29 14:17:20 +01:00
Philip Kaufmann
c78bd93701
[Qt] extend validate line edit and btc address validator
- remove btc address length from address validator
- add an optional btc address check in validated line edit that defaults
  to off and is used in GUIUtil::setupAddressWidget()
- an isAcceptable() check is added to validated line edit on focus out
  which only kicks in, when a validator is used with that widget
- remove an isAcceptable() check from sendcoinsentry.cpp
- remove obsolete attributes from ui files, which are set by calling
  GUIUtil::setupAddressWidget()
- move some more things to GUIUtil::setupAddressWidget() and remove them
  from normal code e.g. placeholder text
2014-01-29 14:15:55 +01:00
Wladimir J. van der Laan
3cf1f43694 Mention * value for account in documentation for getbalance RPC 2014-01-29 13:43:47 +01:00
Wladimir J. van der Laan
aab8fc58c6
Merge pull request #3450
4c0b2cd Win32: use a more modern API call in FileCommit() (Philip Kaufmann)
2014-01-29 09:09:50 +01:00
Wladimir J. van der Laan
2383e4883d
Re-add newline to error() messages
As reported by @Subo1978, error messages don't have a trailing newline
anymore after commit b77dfdc9. Add back this newline.
2014-01-29 08:46:15 +01:00
Wladimir J. van der Laan
0524bdd636
Merge pull request #3582
e5aadb2 Updated fallback seed nodes from sipa's DNS seeds (Gavin Andresen)
2014-01-29 07:50:45 +01:00
Wladimir J. van der Laan
6ebcec7d3c
Merge pull request #3593
c7f9332 Add check for valid keys in `importprivkey` (Wladimir J. van der Laan)
2014-01-28 18:38:31 +01:00
Wladimir J. van der Laan
7ff13ef2d2
Merge pull request #3590
edd735d [Qt] Fix coin control labels update (Cozz Lovan)
2014-01-28 11:00:40 +01:00
Wladimir J. van der Laan
f9355f1f2b
Merge pull request #3594
d7aa1ec [Qt] fix bitcoin: URI strings (spelling fixes) (Philip Kaufmann)
2014-01-28 10:54:17 +01:00
Philip Kaufmann
d7aa1ec8dd [Qt] fix bitcoin: URI strings (spelling fixes) 2014-01-28 10:48:41 +01:00
Wladimir J. van der Laan
c7f9332596 Add check for valid keys in importprivkey
The base58 armoring was checked, but not the resulting private key,
which could be out of range. Fix this by adding a check.
2014-01-28 09:57:57 +01:00
Wladimir J. van der Laan
dfd0d38fae
Merge pull request #3591
6986861 build: use -mwindows for gui targets when linking with mingw (Cory Fields)
2014-01-28 09:40:12 +01:00
Philip Kaufmann
b34e88a88f use english for all reason strings in IsStandardTx() 2014-01-28 07:45:42 +01:00
Cory Fields
6986861fda build: use -mwindows for gui targets when linking with mingw 2014-01-27 15:30:51 -05:00
Pieter Wuille
75f51f2a63 Prepare block connection logic for headers-first.
This changes the block processing logic from "try to atomically switch
to a new block" to a continuous "(dis)connect a block, aiming for the
assumed best chain".

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

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

Additionally the UI had a similar misunderstanding.

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

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

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

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

Tinyformat is a typesafe drop-in replacement for C99 printf functions:
https://github.com/c42f/tinyformat
2014-01-23 16:05:00 +01:00
Wladimir J. van der Laan
53e9d3aa44
build: fix typo in configure help message
--with-qt-libdir etc, not --with-gui-libdir.
The typo was introduced in a9dbcf036b.
2014-01-23 14:05:43 +01:00
Wladimir J. van der Laan
17b409b2e6 qt: Fix richtext detection hang issue on very old Qt versions
Alternative implementation. Thanks to @awoland for the original.
Fixes #3486.
2014-01-23 12:44:28 +01:00
Wladimir J. van der Laan
8b2cf12b53
Merge pull request #3553
a8db31c qt: allow `walletpassphrase` in debug console without -server (Wladimir J. van der Laan)
2014-01-23 08:44:31 +01:00
Wladimir J. van der Laan
6746787a0c
Merge pull request #3560
fe14e8d build: Change package name to Bitcoin Core (Wladimir J. van der Laan)
6c980c7 build: Package docs/ and don't package source. (Wladimir J. van der Laan)
39db27c build: Add bitcoin-cli.exe to installer (Wladimir J. van der Laan)
2f87b38 Adapt Windows installer for 64 bit (Wladimir J. van der Laan)
f622232 gitian: Windows 64 bit support (Wladimir J. van der Laan)
2014-01-23 08:26:11 +01:00
Philip Kaufmann
f0219813d5 [Qt] move helpmessage from debug window to main menu
- the option to show our help message dialog resides now in main menu
  under help
2014-01-22 15:28:50 +01:00
Wladimir J. van der Laan
fe87b20717
Merge pull request #3568
4bee715 [Qt] very minor style cleanups (Philip Kaufmann)
2014-01-22 13:36:31 +01:00
Wladimir J. van der Laan
7dbe9ac1f3
Merge pull request #3567
22a5120 [Qt] Show and store message of normal bitcoin:URI (Cozz Lovan)
2014-01-22 13:33:15 +01:00
Philip Kaufmann
4bee715bfd [Qt] very minor style cleanups
- rebuilt some ui file layout to remove unreal values from the files
- remove an unneeded attribute from an ui file
- add / remove some spaces in files
2014-01-22 09:46:15 +01:00
Wladimir J. van der Laan
2f06b5965a
Merge pull request #3452
1ba3560 [Qt] let OptionsModel::getProxySettings() directly query proxy (Philip Kaufmann)
2014-01-22 08:55:57 +01:00
Wladimir J. van der Laan
ceab53b41d
Merge pull request #3521
4d90102 [Qt] Add sorting feature to the requested payments table (Cozz Lovan)
8476d5d [Qt] Permanently store requested payments in wallet (Cozz Lovan)
b10e147 wallet: add interface for storing generic data on destinations (Wladimir J. van der Laan)
2014-01-22 08:07:56 +01:00
Wladimir J. van der Laan
6586bc3b51
Merge pull request #3502
1f12844 Fix importprivkey / rescan (Cozz Lovan)
2014-01-22 08:06:11 +01:00
Cozz Lovan
22a51207ae [Qt] Show and store message of normal bitcoin:URI 2014-01-21 23:54:49 +01:00
Wladimir J. van der Laan
d0a7c682c6
build: Fix warning about space after trailing backslash 2014-01-21 14:32:05 +01:00
Wladimir J. van der Laan
f622232bcf gitian: Windows 64 bit support
- Build a 64 bit version of all dependencies
- Show 32/64 bit version in "About..." for x86
- Export 64-bit .exes and installer from gitian build
2014-01-21 14:02:13 +01:00
Wladimir J. van der Laan
77a1607ce8
Merge pull request #3548
7b50bb2 [Qt] add utilitydialog.cpp/h and helpmessage class (Philip Kaufmann)
2014-01-21 09:01:38 +01:00
Wladimir J. van der Laan
a682bc7e46
Merge pull request #3242
2041365 Bugfix: Use BOOST_CPPFLAGS when testing for boost sleep vs sleep_for (Luke Dashjr)
e18e100 configure: Minor grammatical changes to be more clear (Luke Dashjr)
a9dbcf0 configure: Change --with[out]-qt to --with[out]-gui and add --with[out]-cli and --with[out]-daemon to support more build configurations (Luke Dashjr)
f472990 Bugfix: Correct captitalisation of Qt (Luke Dashjr)
f930341 configure: Internal changes to make building bitcoind and bitcoin-cli optional (Luke Dashjr)
4a290b5 Cleanup LevelDB library dependencies (Luke Dashjr)
9b4e03b Bugfix: Undefine _FORTIFY_SOURCE before redefining it, to avoid warnings on compilers that define it by default (Luke Dashjr)
123e4f8 Bugfix: configure: Allow user-provided CXXFLAGS to override default optimisation, debug, and warning flags (Luke Dashjr)
2014-01-21 08:55:07 +01:00
Ashley Holman
d8b4b49667 Don't store or send side-chain blocks lower than last checkpoint. 2014-01-19 18:15:38 -06:00
Cozz Lovan
4d901023b7 [Qt] Add sorting feature to the requested payments table 2014-01-19 18:21:54 +01:00
Cozz Lovan
8476d5d407 [Qt] Permanently store requested payments in wallet 2014-01-19 18:21:54 +01:00
Wladimir J. van der Laan
b10e147096 wallet: add interface for storing generic data on destinations 2014-01-19 18:21:54 +01:00
Noel Tiernan
e6c6bc92f4 Adds additional zero checks for setCompact
These encoded values should all decode to zero

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

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

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

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

Solve this with a very minimal change: by making the GUI start a
dummy RPC thread just to handle timeouts.
2014-01-17 16:55:20 +01:00
Philip Kaufmann
1ba3560fe8 [Qt] let OptionsModel::getProxySettings() directly query proxy
- as a proxy set via GUI can be overridden via -proxy, directly query the
  core to get active proxy
- give a warning, if active proxy is not SOCKS5 (needs to be SOCKS5 for
  the Qt networking code to work)
- also remove an obsolete connect() call from optionsdialog.cpp and a
  reference to Bitcoin-Qt (now just GUI)
2014-01-17 15:43:44 +01:00
Wladimir J. van der Laan
08ede8ef5e
Merge pull request #3512
04aa828 [Qt] don't regenerate autostart link on every client startup (Philip Kaufmann)
2014-01-17 10:11:46 +01:00
Gavin Andresen
8c31f037b1 Merge pull request #3527 from laanwj/2014_01_gitian_win32_qt5
build: update win32 deps
2014-01-15 04:20:58 -08:00
Wladimir J. van der Laan
f8b48ed297
Merge pull request #3426
16ec904 Don't create empty transactions when reading corrupted wallet (Wladimir J. van der Laan)
2014-01-14 18:59:07 +01:00
Wladimir J. van der Laan
1aac1448de
Merge pull request #3538
81bad8b [Qt] 2 minor translation changes (Philip Kaufmann)
2014-01-14 18:55:39 +01:00