Commit graph

4508 commits

Author SHA1 Message Date
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
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