Commit graph

8460 commits

Author SHA1 Message Date
Cory Fields
cb78c60534 gui: fix ban from qt console
Rather than doing a circle and re-resolving the node's IP, just use the one
from nodestats directly.

This requires syncing the addr field from CNode.
2016-10-04 19:43:53 -04:00
Luke Dashjr
a78e5428ac Bugfix: Trivial: RPC: getblockchaininfo help: pruneheight is the lowest, not highest, block 2016-10-04 22:22:07 +00:00
Luke Dashjr
178cd887ec Qt/splash: Specifically keep track of which wallet(s) we are connected to for later disconnecting 2016-10-04 20:30:10 +00:00
Luke Dashjr
1880aeb033 Qt: Get the private key for signing messages via WalletModel 2016-10-04 20:30:10 +00:00
Matt Corallo
a9aec5c24d Use BlockChecked signal to send reject messages from mapBlockSource 2016-10-04 13:54:29 -04:00
Matt Corallo
7565e03b96 Remove SyncWithWallets wrapper function 2016-10-04 13:53:04 -04:00
Matt Corallo
12ee1fe018 Always call UpdatedBlockTip, even if blocks were only disconnected 2016-10-04 13:52:57 -04:00
Matt Corallo
f5efa28393 Remove CConnman parameter from ProcessNewBlock/ActivateBestChain 2016-10-04 13:51:32 -04:00
Matt Corallo
fef1010199 Use CValidationInterface from chain logic to notify peer logic
This adds a new CValidationInterface subclass, defined in main.h,
to receive notifications of UpdatedBlockTip and use that to push
blocks to peers, instead of doing it directly from
ActivateBestChain.
2016-10-04 13:49:44 -04:00
Matt Corallo
aefcb7b70c Move net-processing logic definitions together in main.h 2016-10-04 13:36:11 -04:00
Pieter Wuille
6aa28abf53 Use cmpctblock type 2 for segwit-enabled transfer
Contains version negotiation logic by Matt Corallo and bugfixes by
Suhas Daftuar.
2016-10-04 19:10:41 +02:00
Matt Corallo
0278fb5f48 Remove duplicate nBlocksEstimate cmp (we already checked IsIBD()) 2016-10-04 12:35:07 -04:00
Matt Corallo
87e7d72807 Make validationinterface.UpdatedBlockTip more verbose
In anticipation of making all the callbacks out of block processing
flow through it. Note that vHashes will always have something in it
since pindexFork != pindexNewTip.
2016-10-04 12:35:07 -04:00
Matt Corallo
06128da751 Make GetFetchFlags always request witness objects from witness peers
This fixes a bug where we might (in exceedingly rare circumstances)
accidentally ban a node for sending us the first (potentially few)
segwit blocks in non-segwit mode.
2016-10-04 18:24:10 +02:00
MarcoFalke
eeeebdd3cb [doc] Rework docs
* Minor formatting such as adjusting links
* Move sections of `doc/multiwallet-qt.md` to the source code and delete
  the file, as it is outdated
* Fix typo in the release notes
* Amend release process to mention update of BLOCK_CHAIN_SIZE
2016-10-04 13:27:38 +02:00
Wladimir J. van der Laan
2c09a5209a protocol.h: Move MESSAGE_START_SIZE into CMessageHeader
Also move the enum to the top, and remove a deceptive TODO
comment.
2016-10-04 11:12:55 +00:00
Wladimir J. van der Laan
f9bd92d235 version.h: s/shord/short/ in comment 2016-10-04 11:11:21 +00:00
Wladimir J. van der Laan
d7615af34e
Merge #8848: Add NULLDUMMY verify flag in bitcoinconsensus.h
2fa0063 Add NULLDUMMY verify flag in bitcoinconsensus.h (Johnson Lau)
2016-10-04 12:18:16 +02:00
Wladimir J. van der Laan
d93f0c6184
Merge #8862: Fix a few cases where messages were sent after requested disconnect
905bc68 net: fix a few cases where messages were sent rather than dropped upon disconnection (Cory Fields)
2016-10-04 12:13:50 +02:00
Wladimir J. van der Laan
7dce175f5d
Merge #8850: Implement (begin|end)_ptr in C++11 and add deprecation comment
f00705a serialize: Deprecate `begin_ptr` / `end_ptr` (Wladimir J. van der Laan)
47314e6 prevector: add C++11-like data() method (Wladimir J. van der Laan)
2016-10-04 11:08:06 +02:00
jnewbery
5f274a1749 log block size and weight correctly. 2016-10-03 13:55:26 -04:00
Wladimir J. van der Laan
a7e5cbb209
Merge #8856: Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs
3450c18 Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs (Jorge Timón)
2016-10-03 15:25:09 +02:00
Wladimir J. van der Laan
eafc5f4fae
Merge #8863: univalue: Pull subtree
2ca7faa Squashed 'src/univalue/' changes from daf1285..16a1f7f (MarcoFalke)
2016-10-03 08:45:13 +02:00
Wladimir J. van der Laan
f00705ae7f
serialize: Deprecate begin_ptr / end_ptr
Implement `begin_ptr` and `end_ptr` in terms of C++11 code,
and add a comment that they are deprecated.

Follow-up to developer notes update in 654a211622.
2016-10-02 09:50:25 +02:00
Cory Fields
905bc68d05 net: fix a few cases where messages were sent rather than dropped upon disconnection
75ead758 turned these into crashes in the event of a handshake failure, most
notably when a peer does not offer the expected services.

There are likely other cases that these assertions will find as well.
2016-10-01 19:13:10 -04:00
Wladimir J. van der Laan
1c80386bce rpc: Generate auth cookie in hex instead of base64
Base64 contains '/', and the '/' character in credentials is problematic
for AuthServiceProxy which represents the RPC endpoint as an URI with
user and password embedded.

Closes #8399.
2016-10-01 16:57:25 +02:00
Jorge Timón
3450c18a12
Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs 2016-10-01 08:12:19 +02:00
MarcoFalke
e757115164 Merge commit '2ca7faab4205822b06dc2ab2bbda0a9a70fce7e0' into HEAD 2016-09-30 19:58:11 +02:00
Wladimir J. van der Laan
940748b4b0
Merge #8851: [wallet] Move key derivation logic from GenerateNewKey to DeriveNewChildKey (pstratem)
e198c52 Move key derivation logic from GenerateNewKey to DeriveNewChildKey (Patrick Strateman)
2016-09-30 19:56:03 +02:00
Patrick Strateman
e198c521d3 Move key derivation logic from GenerateNewKey to DeriveNewChildKey 2016-09-30 19:11:00 +02:00
Wladimir J. van der Laan
fb24d7eeb4
Merge #8813: bitcoind: Daemonize using daemon(3)
a92bf4a bitcoind: Daemonize using daemon(3) (Matthew King)
2016-09-30 18:19:31 +02:00
Wladimir J. van der Laan
47314e6daa prevector: add C++11-like data() method
This returns a pointer to the beginning of the vector's data.
2016-09-30 17:19:51 +02:00
Wladimir J. van der Laan
9bc6a6bd7b
Merge #8822: net: Consistent checksum handling
305087b net: Hardcode protocol sizes and use fixed-size types (Wladimir J. van der Laan)
41e58fa net: Consistent checksum handling (Wladimir J. van der Laan)
2016-09-30 17:10:58 +02:00
Johnson Lau
2fa0063c26 Add NULLDUMMY verify flag in bitcoinconsensus.h 2016-09-30 23:09:19 +08:00
Wladimir J. van der Laan
ef0801bd13
Merge #8830: [test] Add option to run bitcoin-util-test.py manually
b82f493 Add option to run bitcoin-util-test.py manually (jnewbery)
2016-09-30 17:03:21 +02:00
Wladimir J. van der Laan
90adfabd5d
Merge #8836: bitcoin-util-test.py should fail if the output file is empty
da94697 bitcoin-util-test.py should fail if the output file is empty (jnewbery)
2016-09-30 12:36:02 +02:00
Wladimir J. van der Laan
f560d9564f
Merge #8826: Do not include env_win.cc on non-Windows systems
7e5fd71 Do not include env_win.cc on non-Windows systems (Pavel Janík)
2016-09-29 17:27:28 +02:00
jnewbery
da94697708 bitcoin-util-test.py should fail if the output file is empty 2016-09-29 10:16:56 -04:00
Wladimir J. van der Laan
9b94cca41f
Merge #8658: Remove unused statements in serialization
64d9507 [WIP] Remove unused statement in serialization (Pavel Janík)
2016-09-29 15:00:22 +02:00
jnewbery
b82f493938 Add option to run bitcoin-util-test.py manually 2016-09-29 08:54:56 -04:00
MarcoFalke
fa85e860a9 [qt] sync-overlay: Don't show estimated number of headers left 2016-09-29 13:24:29 +02:00
MarcoFalke
8ca69a2a88
Merge #8829: Add bitcoin-tx JSON tests
54e5d7c Add bitcoin-tx JSON tests (jnewbery)
2016-09-29 10:50:05 +02:00
Wladimir J. van der Laan
7d563cc16d
Merge #8832: [rpc] throw JSONRPCError when utxo set can not be read
fa05cfd [rpc] throw JSONRPCError when utxo set can not be read (MarcoFalke)
2016-09-29 08:12:55 +02:00
Wladimir J. van der Laan
d675984fdf
Merge #8784: Copyright headers for build scripts
0c4e6ce Add MIT license to build-aux/m4 scripts (Luke Dashjr)
3f8a5d8 Trivial: build-aux/m4/l_atomic: Fix typo (Luke Dashjr)
3b4b6dc Add MIT license to autogen.sh and share/genbuild.sh (Luke Dashjr)
f4dffdd Add MIT license to Makefiles (Luke Dashjr)
2016-09-29 07:58:08 +02:00
MarcoFalke
fa05cfdf25 [rpc] throw JSONRPCError when utxo set can not be read 2016-09-28 21:00:58 +02:00
jnewbery
54e5d7c1b8 Add bitcoin-tx JSON tests 2016-09-28 13:38:42 -04:00
Pavel Janík
7e5fd7198e Do not include env_win.cc on non-Windows systems 2016-09-28 16:40:20 +02:00
Wladimir J. van der Laan
305087bdf6 net: Hardcode protocol sizes and use fixed-size types
The P2P network uses a fixed protocol, these sizes shouldn't change
based on what happens to be the architecture.
2016-09-28 15:33:45 +02:00
Wladimir J. van der Laan
41e58faf04 net: Consistent checksum handling
In principle, the checksums of P2P packets are simply 4-byte blobs which
are the first four bytes of SHA256(SHA256(payload)).

Currently they are handled as little-endian 32-bit integers half of the
time, as blobs the other half, sometimes copying the one to the other,
resulting in somewhat confused code.

This PR changes the handling to be consistent both at packet creation
and receiving, making it (I think) easier to understand.
2016-09-28 12:44:13 +02:00
Wladimir J. van der Laan
14b7b3fb9f
Merge #8814: [wallet, policy] ParameterInteraction: Don't allow 0 fee
fa4bfb4 [wallet, policy] ParameterInteraction: Don't allow 0 fee (MarcoFalke)
2016-09-28 08:09:42 +02:00
Johnson Lau
e41bd449ab Add policy: null signature for failed CHECK(MULTI)SIG 2016-09-27 23:40:59 +08:00
Wladimir J. van der Laan
5a4f6d72e6
Merge #8526: Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH
c72c5b1 Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH (Johnson Lau)
2016-09-27 17:10:15 +02:00
Wladimir J. van der Laan
e9d5f6fec8
Merge #8357: [mempool] Fix relaypriority calculation error
94a34a5 Fix relaypriority calculation error (maiiz)
2016-09-27 16:33:32 +02:00
Pavel Janík
4731cab8fb Do not shadow variables 2016-09-27 09:25:15 +02:00
MarcoFalke
faa4de2a2a [qt] sync-overlay: Don't block during reindex 2016-09-26 22:29:45 +02:00
MarcoFalke
2f71490d21
Merge #8805: Trivial: Grammar and capitalization
c9ce17b Trivial: Grammar and capitalization (Derek Miller)
2016-09-26 22:27:45 +02:00
Wladimir J. van der Laan
8f1fbf36a7
Merge #8796: [trivial] fix mempool comment (outdated by BIP125)
c14ffd5 [trivial] fix mempool comment (outdated by BIP125) (jonnynewbs)
2016-09-26 15:11:02 +02:00
Wladimir J. van der Laan
dd20ed1223
Merge #8780: [rpc] Deprecate getinfo
fa6e71b [qa] Add getinfo smoke tests and rework versionbits test (MarcoFalke)
ddddaaf [rpc] Deprecate getinfo (MarcoFalke)
2016-09-26 15:03:06 +02:00
Wladimir J. van der Laan
bb843adc8d
Merge #8722: bitcoin-cli: More detailed error reporting
381826d bitcoin-cli: More detailed error reporting (Wladimir J. van der Laan)
2016-09-26 14:53:38 +02:00
jonnynewbs
c14ffd524b [trivial] fix mempool comment (outdated by BIP125) 2016-09-26 08:52:52 -04:00
MarcoFalke
fa4bfb4819 [wallet, policy] ParameterInteraction: Don't allow 0 fee 2016-09-26 14:44:24 +02:00
Wladimir J. van der Laan
ab0b411868
Merge #8486: [wallet] Add high transaction fee warnings
faef293 [wallet] Add high transaction fee warnings (MarcoFalke)
2016-09-26 13:57:10 +02:00
Matthew King
a92bf4af66 bitcoind: Daemonize using daemon(3)
Simplified version of #8278. Assumes that every OS that (a) is supported
by Bitcoin Core (b) supports daemonization has the `daemon()` function
in its C library.

- Removes the fallback path for operating systems that support
  daemonization but not `daemon()`. This prevents never-exercised code from
  ending up in the repository (see discussion here:
  https://github.com/bitcoin/bitcoin/pull/8278#issuecomment-242704745).

- Removes the windows-specific path. Windows doesn't support `daemon()`,
  so it don't support daemonization there, automatically.

Original code by Matthew King, adapted by Wladimir van der Laan.
2016-09-26 13:37:44 +02:00
MarcoFalke
faef293cf3 [wallet] Add high transaction fee warnings 2016-09-26 01:11:27 +02:00
Wladimir J. van der Laan
37871f216e
Merge #8807: [univalue] Pull subtree from upstream
3650668 Squashed 'src/univalue/' changes from f32df99..daf1285 (MarcoFalke)
2016-09-25 16:21:43 +02:00
MarcoFalke
9bf41af708 Merge commit '3650668cdbbf369dd8f30c8e8eb5bb883325942d' into HEAD 2016-09-25 15:19:23 +02:00
Wladimir J. van der Laan
b8d10fd4ef
Merge #8802: Fix future copyright year
edeaf24 Fix future copyright year (Mitchell Cash)
2016-09-25 13:12:01 +02:00
Derek Miller
c9ce17beed Trivial: Grammar and capitalization 2016-09-24 12:22:47 -05:00
MarcoFalke
08cc5fd666
Merge #8790: [test] Remove redundant debug print in addrman_tests
3333bd2 [test] Remove redundant print in addrman_tests (MarcoFalke)
2016-09-24 15:38:38 +02:00
Mitchell Cash
edeaf24e4c Fix future copyright year 2016-09-24 13:46:08 +10:00
Jonas Schnelli
24f72e9f3f
Merge #8371: [Qt] Add out-of-sync modal info layer
08827df [Qt] modalinfolayer: removed unused comments, renamed signal, code style overhaul (Jonas Schnelli)
d8b062e [Qt] only update "amount of blocks left" when the header chain is in-sync (Jonas Schnelli)
e3245b4 [Qt] add out-of-sync modal info layer (Jonas Schnelli)
e47052f [Qt] ClientModel add method to get the height of the header chain (Jonas Schnelli)
a001f18 [Qt] Always pass the numBlocksChanged signal for headers tip changed (Jonas Schnelli)
bd44a04 [Qt] make Out-Of-Sync warning icon clickable (Jonas Schnelli)
0904c3c [Refactor] refactor function that forms human readable text out of a timeoffset (Jonas Schnelli)
2016-09-23 18:22:48 +02:00
Jonas Schnelli
08827df3ec
[Qt] modalinfolayer: removed unused comments, renamed signal, code style overhaul 2016-09-23 16:07:21 +02:00
Wladimir J. van der Laan
d2e46558ba
Merge #8661: Do not set an addr time penalty when a peer advertises itself.
6d0ced1 Do not set an addr time penalty when a peer advertises itself. (Gregory Maxwell)
2016-09-23 13:56:01 +02:00
Wladimir J. van der Laan
5d0219d983
Merge #8793: Do not shadow in src/qt
f839350 Do not shadow in src/qt (Pavel Janík)
2016-09-23 12:44:35 +02:00
Pavel Janík
f839350420 Do not shadow in src/qt 2016-09-23 12:42:00 +02:00
Johnson Lau
c72c5b1e3b Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH 2016-09-23 13:07:38 +08:00
Wladimir J. van der Laan
2b514aa2ea
Merge #8785: Comment on CNode::nLocalServices meaning
b5ccded Comment on CConnman::nLocalServices meaning (instagibbs)
2016-09-22 16:41:02 +02:00
instagibbs
b5ccded57f Comment on CConnman::nLocalServices meaning 2016-09-22 08:19:44 -04:00
MarcoFalke
3333bd2d15 [test] Remove redundant print in addrman_tests 2016-09-22 12:50:39 +02:00
Wladimir J. van der Laan
26b370a937
Merge #8636: Implement NULLDUMMY softfork (BIP147)
482f852 Implement NULLDUMMY softfork (Johnson Lau)
2016-09-22 10:58:00 +02:00
Luke Dashjr
f4dffdd6bf Add MIT license to Makefiles 2016-09-21 22:35:12 +00:00
MarcoFalke
ddddaafa4a [rpc] Deprecate getinfo
This was replaced by getmininginfo, getnetworkinfo and getwalletinfo
2016-09-21 21:19:20 +02:00
Wladimir J. van der Laan
cf5ebaa921
Merge #8656: Trivial: Do not shadow global variable fileout
7c069a7 Do not shadow global variable (Pavel Janík)
2016-09-21 14:13:44 +02:00
Wladimir J. van der Laan
381826dfee bitcoin-cli: More detailed error reporting
Register a evhttp error handler to get a more detailed error message
if the HTTP request fails.
2016-09-21 14:02:42 +02:00
Wladimir J. van der Laan
fec6af7440
Merge #8777: [qt] WalletModel: Expose disablewallet
6666ca6 [qt] WalletModel: Expose disablewallet (MarcoFalke)
2016-09-21 13:45:20 +02:00
MarcoFalke
6666ca6379 [qt] WalletModel: Expose disablewallet 2016-09-21 13:11:15 +02:00
Wladimir J. van der Laan
886e8c9b72
Merge #8768: init: Get rid of fDisableWallet
fa58edb [wallet] Introduce DEFAULT_DISABLE_WALLET (MarcoFalke)
fab9107 init: Get rid of fDisableWallet (MarcoFalke)
2016-09-21 12:27:56 +02:00
MarcoFalke
fa58edbffe [wallet] Introduce DEFAULT_DISABLE_WALLET 2016-09-21 12:06:58 +02:00
Wladimir J. van der Laan
b4f53641a9
Merge #8765: [Wallet] remove "unused" ThreadFlushWalletDB from removeprunedfunds
c6f5ca8 [Wallet] remove "unused" ThreadFlushWalletDB from removeprunedfunds (Jonas Schnelli)
2016-09-21 08:15:33 +02:00
MarcoFalke
fab91070d3 init: Get rid of fDisableWallet 2016-09-20 17:32:05 +02:00
Jonas Schnelli
c6f5ca822f
[Wallet] remove "unused" ThreadFlushWalletDB from removeprunedfunds 2016-09-20 16:18:24 +02:00
Jonas Schnelli
6052d50910
Merge #8672: Qt: Show transaction size in transaction details window
c015634 qt: Adding transaction size to transaction details window (Hampus Sjöberg)
 \-- merge fix for s/size/total size/
fdf82fb Adding method GetTotalSize() to CTransaction (Hampus Sjöberg)
2016-09-20 15:34:33 +02:00
Wladimir J. van der Laan
4335d5a41b
Merge #7783: [Qt] RPC-Console: support nested commands and simple value queries
1586044 [Qt] RPC-Console: support nested commands and simple value queries (Jonas Schnelli)
2016-09-20 14:15:35 +02:00
Wladimir J. van der Laan
a1f8d3ed95
Merge #8696: [Wallet] Remove last external reference to CWalletDB
2ca6b9d Remove last reference to CWalletDB from accounting_tests.cpp (Patrick Strateman)
02e2a81 Remove pwalletdb parameter from CWallet::AddAccountingEntry (Patrick Strateman)
d2e678d Add CWallet::ReorderTransactions and use in accounting_tests.cpp (Patrick Strateman)
59adc86 Add CWallet::ListAccountCreditDebit (Patrick Strateman)
2016-09-20 12:47:31 +02:00
Wladimir J. van der Laan
02ac669730
Merge #8760: [init] Get rid of some ENABLE_WALLET
faddd62 init: Get rid of some ENABLE_WALLET (MarcoFalke)
2016-09-20 12:45:46 +02:00
Wladimir J. van der Laan
82eacc786d
Merge #8700: [copyright] add MIT license headers to .sh scripts where missing
0766d1c [copyright] add MIT license headers to .sh scripts where missing (isle2983)
2016-09-20 10:02:33 +02:00
maiiz
94a34a5d95 Fix relaypriority calculation error 2016-09-20 11:45:30 +08:00
Wladimir J. van der Laan
047ded0b12
Merge #8688: Move static global randomizer seeds into CConnman
d9ff591 Move static global randomizer seeds into CConnman (Pieter Wuille)
2016-09-19 18:02:01 +02:00
Wladimir J. van der Laan
8bae52a9a0
Merge #8737: Trivial: UndoReadFromDisk works on undo files (rev), not on block files.
b4fb512 UndoReadFromDisk works on undo files (rev), not on block files. (Pavel Janík)
2016-09-19 16:54:17 +02:00
Wladimir J. van der Laan
f07424a671
Merge #8707: net: fix maxuploadtarget setting
f3552da net: fix maxuploadtarget setting (Cory Fields)
2016-09-19 16:46:50 +02:00
MarcoFalke
faddd62518 init: Get rid of some ENABLE_WALLET 2016-09-19 16:14:18 +02:00
Pieter Wuille
d9ff591d42 Move static global randomizer seeds into CConnman 2016-09-19 15:53:47 +02:00
Wladimir J. van der Laan
2ebb8099d9
Merge #8742: Specify Protobuf version 2 in paymentrequest.proto
c4084c2 Specify Protobuf version 2 in paymentrequest.proto (fanquake)
2016-09-19 15:43:51 +02:00
Wladimir J. van der Laan
a5b20edd3d
Merge #8494: [init, wallet] ParameterInteraction() iff wallet enabled
fa5d276 [init] ParameterInteraction() iff wallet enabled (MarcoFalke)
2016-09-19 11:38:16 +02:00
Jiaxing Wang
e892dc1268 Use prefix operator in for loop of DecodeBase58. 2016-09-16 19:13:01 +08:00
fanquake
c4084c2085
Specify Protobuf version 2 in paymentrequest.proto 2016-09-16 11:45:08 +08:00
Wladimir J. van der Laan
d9c99c3058 net: No longer send local address in addrMe
After #8594 the addrFrom sent by a node is not used anymore at all,
so don't bother sending it.

Also mitigates the privacy issue in (#8616). It doesn't completely solve
the issue as GetLocalAddress is also called in AdvertiseLocal, but at
least when advertising addresses it stands out less as *our* address.
2016-09-15 23:42:01 +02:00
Patrick Strateman
2ca6b9df1d Remove last reference to CWalletDB from accounting_tests.cpp 2016-09-15 13:51:04 -07:00
Patrick Strateman
02e2a81536 Remove pwalletdb parameter from CWallet::AddAccountingEntry 2016-09-15 13:50:59 -07:00
Patrick Strateman
d2e678d7d2 Add CWallet::ReorderTransactions and use in accounting_tests.cpp 2016-09-15 06:52:15 -07:00
Patrick Strateman
59adc86680 Add CWallet::ListAccountCreditDebit
Simple pass through for CWalletDB::ListAccountCreditDebit
2016-09-15 06:52:15 -07:00
Pavel Janík
b4fb512719 UndoReadFromDisk works on undo files (rev), not on block files. 2016-09-15 12:40:09 +02:00
Jiaxing Wang
159ed95f74 base58: Improve DecodeBase58 performance.
Improve DecodeBase58 performance the same way as commit 3252208 did
for EncodeBase58.
2016-09-15 17:39:54 +08:00
Cory Fields
f3552da813 net: fix maxuploadtarget setting
This was broken by 63cafa6329.

Note that while this fixes the settings, it doesn't fix the actual usage of
-maxuploadtarget completely, as there is currently a bug in the
nOptimisticBytesWritten accounting that causes a delayed response if the target
is reached. That bug will be addressed separately.
2016-09-14 13:14:04 -04:00
Wladimir J. van der Laan
881d7eaf29
Merge #8715: net: only delete CConnman if it's been created
36fa01f net: only delete CConnman if it's been created (Cory Fields)
2016-09-14 10:16:25 +02:00
Cory Fields
36fa01f217 net: only delete CConnman if it's been created
In the case of (for example) an already-running bitcoind, the shutdown sequence
begins before CConnman has been created, leading to a null-pointer dereference
when g_connman->Stop() is called.

Instead, Just let the CConnman dtor take care of stopping.
2016-09-13 22:43:23 -04:00
Spencer Lievens
a56037805c [WALLET] Addition of ImmatureCreditCached to MarkDirty()
To protect against possible invalidation and to bring conformity to the code.
2016-09-13 23:30:32 +01:00
Jonas Schnelli
1b6bcdd3aa
Remove maxuploadtargets recommended minimum 2016-09-13 18:08:17 +02:00
Jonas Schnelli
d8b062ef5e
[Qt] only update "amount of blocks left" when the header chain is in-sync 2016-09-13 17:57:25 +02:00
Wladimir J. van der Laan
fa7caf6d91
Merge #8693: add witness address to address book
62ffbbd add witness address to address book (instagibbs)
2016-09-13 17:10:28 +02:00
Wladimir J. van der Laan
c9914c2094
Merge #8699: Remove createwitnessaddress RPC command
86c3f8d Remove createwitnessaddress (Johnson Lau)
2016-09-13 17:03:00 +02:00
Wladimir J. van der Laan
37ac67816a
Merge #8601: Add option to opt into full-RBF when sending funds (rebase, original by petertodd)
86726d8 Rename `-optintofullrbf` option to `-walletrbf` (Wladimir J. van der Laan)
05fa823 wallet: Add BIP125 comment for MAXINT-1/-2 behavior (Wladimir J. van der Laan)
152f45b Add option to opt into full-RBF when sending funds (Peter Todd)
2016-09-13 11:35:26 +02:00
Wladimir J. van der Laan
86726d8680 Rename -optintofullrbf option to -walletrbf
This makes it clear that this is a wallet option.
2016-09-13 11:32:29 +02:00
Johnson Lau
86c3f8db0b Remove createwitnessaddress
This RPC command is unsafe as it will return an address even if the script is invalid.
2016-09-13 11:35:14 +08:00
R E Broadley
1f951c67a4 Allow filterclear messages for enabling TX relay only.
An example of where this might be useful is allowing a node to connect blocksonly during IBD but then becoming a full-node once caught up with the latest block. This might also even want to be the default behaviour since during IBD most TXs appear to be orphans, and are routinely dropped (for example when a node disconnects). Therefore, this can waste a lot of bandwidth.

Additionally, another pull could be written to stop relaying of TXs to nodes that are clearly far behind the latest block and are running a node that doesn't store many orphan TXs, such as recent versions of Bitcoin Core.
2016-09-13 09:10:22 +07:00
isle2983
0766d1cac3 [copyright] add MIT license headers to .sh scripts where missing
Years are set according to 'git log' history
2016-09-11 13:36:22 -06:00
rodasmith
1d635ae61b fix op order to append first alert 2016-09-10 11:41:01 -07:00
instagibbs
62ffbbdec3 add witness address to address book 2016-09-09 12:15:08 -04:00
Jonas Schnelli
702e6e059b
Merge #8678: [Qt][CoinControl] fix UI bug that could result in paying unexpected fee
0480293 [Qt][CoinControl] fix UI bug that could result in paying unexpected fee (Jonas Schnelli)
2016-09-09 14:34:03 +02:00
Pavel Janík
64d9507ea5 [WIP] Remove unused statement in serialization 2016-09-09 13:59:34 +02:00
Pieter Wuille
6898213409
Merge #8681: Performance Regression Fix: Pre-Allocate txChanged vector
ec81881 Performance Regression Fix: Pre-Allocate txChanged vector (Jeremy Rubin)
2016-09-09 13:41:15 +02:00
Wladimir J. van der Laan
2abfe5956e
Merge #8664: Fix segwit-related wallet bug
c40b034 Clear witness with vin/vout in CWallet::CreateTransaction() (Suhas Daftuar)
2016-09-09 12:24:39 +02:00
Wladimir J. van der Laan
6423116741
Merge #8085: p2p: Begin encapsulation
0103c5b net: move MAX_FEELER_CONNECTIONS into connman (Cory Fields)
e700cd0 Convert ForEachNode* functions to take a templated function argument rather than a std::function to eliminate std::function overhead (Jeremy Rubin)
d1a2295 Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting (Jeremy Rubin)
98591c5 net: move vNodesDisconnected into CConnman (Cory Fields)
fa2f8bc net: add nSendBufferMaxSize/nReceiveFloodSize to CConnection::Options (Cory Fields)
a19553b net: Introduce CConnection::Options to avoid passing so many params (Cory Fields)
bafa5fc net: Drop StartNode/StopNode and use CConnman directly (Cory Fields)
e81a602 net: pass CClientUIInterface into CConnman (Cory Fields)
f60b905 net: Pass best block known height into CConnman (Cory Fields)
fdf69ff net: move max/max-outbound to CConnman (Cory Fields)
8a59369 net: move semOutbound to CConnman (Cory Fields)
bd72937 net: move nLocalServices/nRelevantServices to CConnman (Cory Fields)
be9c796 net: move SendBufferSize/ReceiveFloodSize to CConnman (Cory Fields)
63cafa6 net: move send/recv statistics to CConnman (Cory Fields)
adf5d4c net: SocketSendData returns written size (Cory Fields)
ee44fa9 net: move messageHandlerCondition to CConnman (Cory Fields)
960cf2e net: move nLocalHostNonce to CConnman (Cory Fields)
551e088 net: move nLastNodeId to CConnman (Cory Fields)
6c19d92 net: move whitelist functions into CConnman (Cory Fields)
53347f0 net: create generic functor accessors and move vNodes to CConnman (Cory Fields)
c0569c7 net: Add most functions needed for vNodes to CConnman (Cory Fields)
8ae2dac net: move added node functions to CConnman (Cory Fields)
502dd3a net: Add oneshot functions to CConnman (Cory Fields)
a0f3d3c net: move ban and addrman functions into CConnman (Cory Fields)
aaf018e net: handle nodesignals in CConnman (Cory Fields)
b1a5f43 net: move OpenNetworkConnection into CConnman (Cory Fields)
02137f1 net: Move socket binding into CConnman (Cory Fields)
5b446dd net: Pass CConnection to wallet rather than using the global (Cory Fields)
8d58c4d net: Pass CConnman around as needed (Cory Fields)
d7349ca net: Add rpc error for missing/disabled p2p functionality (Cory Fields)
cd16f48 net: Create CConnman to encapsulate p2p connections (Cory Fields)
d93b14d net: move CBanDB and CAddrDB out of net.h/cpp (Cory Fields)
531214f gui: add NodeID to the peer table (Cory Fields)
2016-09-09 11:52:22 +02:00
Wladimir J. van der Laan
4daf02a03f
Merge #8677: Do not shadow upper local variable 'send', prevent -Wshadow compiler warning.
125b946 Do not shadow upper local variable 'send', prevent -Wshadow compiler warning. (Pavel Janík)
2016-09-09 10:25:39 +02:00
Wladimir J. van der Laan
666eaf03cf
Merge #8680: Address Travis spurious failures
d6a5dc4 add waitfornewblock/waitforblock/waitforblockheight rpcs and use them for tests (Cory Fields)
2016-09-09 08:33:54 +02:00
Wladimir J. van der Laan
80a4f21d37
Merge #8525: Do not store witness txn in rejection cache
ca10a03 Add basic test for IsStandard witness transaction blinding (instagibbs)
34521e4 Do not store witness txn in rejection cache (Pieter Wuille)
2016-09-09 07:47:48 +02:00
Cory Fields
0103c5b90f net: move MAX_FEELER_CONNECTIONS into connman 2016-09-08 13:06:05 -04:00
Jeremy Rubin
e700cd0bc8 Convert ForEachNode* functions to take a templated function argument rather than a std::function to eliminate std::function overhead 2016-09-08 13:06:05 -04:00
Jeremy Rubin
d1a2295f0d Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting 2016-09-08 13:06:05 -04:00
Cory Fields
98591c5027 net: move vNodesDisconnected into CConnman 2016-09-08 13:06:05 -04:00
Cory Fields
fa2f8bc47f net: add nSendBufferMaxSize/nReceiveFloodSize to CConnection::Options 2016-09-08 13:06:00 -04:00
Cory Fields
a19553b992 net: Introduce CConnection::Options to avoid passing so many params 2016-09-08 13:04:29 -04:00
Cory Fields
bafa5fc5a1 net: Drop StartNode/StopNode and use CConnman directly 2016-09-08 12:24:07 -04:00
Cory Fields
e81a602cf0 net: pass CClientUIInterface into CConnman 2016-09-08 12:24:07 -04:00
Cory Fields
f60b9059e4 net: Pass best block known height into CConnman
CConnman then passes the current best height into CNode at creation time.

This way CConnman/CNode have no dependency on main for height, and the signals
only move in one direction.

This also helps to prevent identity leakage a tiny bit. Before this change, an
attacker could theoretically make 2 connections on different interfaces. They
would connect fully on one, and only establish the initial connection on the
other. Once they receive a new block, they would relay it to your first
connection, and immediately commence the version handshake on the second. Since
the new block height is reflected immediately, they could attempt to learn
whether the two connections were correlated.

This is, of course, incredibly unlikely to work due to the small timings
involved and receipt from other senders. But it doesn't hurt to lock-in
nBestHeight at the time of connection, rather than letting the remote choose
the time.
2016-09-08 12:24:06 -04:00
Cory Fields
fdf69ff21a net: move max/max-outbound to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
8a593694b1 net: move semOutbound to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
bd72937dc4 net: move nLocalServices/nRelevantServices to CConnman
These are in-turn passed to CNode at connection time. This allows us to offer
different services to different peers (or test the effects of doing so).
2016-09-08 12:24:06 -04:00
Cory Fields
be9c796dc5 net: move SendBufferSize/ReceiveFloodSize to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
63cafa6329 net: move send/recv statistics to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
adf5d4c2e4 net: SocketSendData returns written size 2016-09-08 12:24:06 -04:00
Cory Fields
ee44fa9576 net: move messageHandlerCondition to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
960cf2e405 net: move nLocalHostNonce to CConnman
This behavior seems to have been quite racy and broken.

Move nLocalHostNonce into CNode, and check received nonces against all
non-fully-connected nodes. If there's a match, assume we've connected
to ourself.
2016-09-08 12:24:06 -04:00
Cory Fields
551e0887db net: move nLastNodeId to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
6c19d92361 net: move whitelist functions into CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
53347f0cb9 net: create generic functor accessors and move vNodes to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
c0569c7fa1 net: Add most functions needed for vNodes to CConnman 2016-09-08 12:12:58 -04:00
Cory Fields
8ae2dac1c6 net: move added node functions to CConnman 2016-09-08 12:12:58 -04:00
Cory Fields
502dd3a8a0 net: Add oneshot functions to CConnman 2016-09-08 12:12:57 -04:00
Cory Fields
a0f3d3cdad net: move ban and addrman functions into CConnman 2016-09-08 12:12:57 -04:00
Cory Fields
aaf018e3b7 net: handle nodesignals in CConnman 2016-09-08 12:06:24 -04:00
Cory Fields
b1a5f43208 net: move OpenNetworkConnection into CConnman 2016-09-08 12:06:24 -04:00
Cory Fields
02137f11e2 net: Move socket binding into CConnman 2016-09-08 12:06:24 -04:00
Cory Fields
5b446dd5b1 net: Pass CConnection to wallet rather than using the global 2016-09-08 12:04:35 -04:00
Cory Fields
8d58c4d81f net: Pass CConnman around as needed 2016-09-08 12:04:35 -04:00
Cory Fields
d7349ca50d net: Add rpc error for missing/disabled p2p functionality 2016-09-08 12:04:35 -04:00
Cory Fields
cd16f48028 net: Create CConnman to encapsulate p2p connections 2016-09-08 12:04:35 -04:00
Cory Fields
d93b14dc5d net: move CBanDB and CAddrDB out of net.h/cpp
This will eventually solve a circular dependency
2016-09-08 12:03:22 -04:00
Cory Fields
531214fb10 gui: add NodeID to the peer table 2016-09-08 12:03:22 -04:00
MarcoFalke
ddc308068d
Merge #8671: Minimal fix to slow prevector tests as stopgap measure
f71d4a3 Minimal fix to slow prevector tests as stopgap measure (Jeremy Rubin)
2016-09-08 11:12:50 +02:00
Jeremy Rubin
ec81881b86 Performance Regression Fix: Pre-Allocate txChanged vector 2016-09-07 20:10:50 -04:00
MarcoFalke
ec139a5621
Merge #8673: Trivial: Fix obvious assignment/equality error in test
426e7bc Fix obvious assignment/equality error in test (Jeremy Rubin)
2016-09-07 19:36:43 +02:00
Cory Fields
d6a5dc4a2e add waitfornewblock/waitforblock/waitforblockheight rpcs and use them for tests
waitfornewblock waits until a new block is received, or the timeout expires, then
returns the current block height/hash.

waitforblock waits for a specific blockhash, or until the timeout expires, then
returns the current block height/hash. If the target blockhash is the current
tip, it will return immediately.

waitforblockheight waits until the tip has reached a certain height or higher,
then returns the current height and hash.

waitforblockheight is used to avoid polling in the rpc tests.
2016-09-07 12:46:01 -04:00
Jonas Schnelli
04802930d4
[Qt][CoinControl] fix UI bug that could result in paying unexpected fee 2016-09-07 16:05:27 +02:00
Pavel Janík
125b946cb4 Do not shadow upper local variable 'send', prevent -Wshadow compiler warning. 2016-09-07 13:45:13 +02:00
Pieter Wuille
5b2ea29cf4
Merge #8594: Do not add random inbound peers to addrman.
eb3596f Do not add random inbound peers to addrman. (Gregory Maxwell)
2016-09-07 13:19:53 +02:00
Pieter Wuille
e2a1a1ee89
Merge #8606: Fix some locks
144ed76 Fix some locks (Pieter Wuille)
2016-09-07 13:10:10 +02:00
Hampus Sjöberg
c015634400 qt: Adding transaction size to transaction details window 2016-09-06 22:31:36 +02:00
Hampus Sjöberg
fdf82fba31 Adding method GetTotalSize() to CTransaction
GetTotalSize() returns the total transaction size (including witness) in
bytes.
2016-09-06 22:30:30 +02:00
Jeremy Rubin
426e7bce0e Fix obvious assignment/equality error in test 2016-09-06 16:22:13 -04:00
Jeremy Rubin
f71d4a3786 Minimal fix to slow prevector tests as stopgap measure 2016-09-06 16:19:25 -04:00
Wladimir J. van der Laan
d077f43f7e
Merge #8663: trivial: remove unnecessary variable fDaemon
ff2ed7a trivial: remove unnecessary variable fDaemon (mruddy)
2016-09-06 15:20:08 +02:00
Pieter Wuille
34521e4d7d Do not store witness txn in rejection cache 2016-09-05 17:48:56 +02:00
Pieter Wuille
e82fb872ff
Merge #8651: Predeclare PrecomputedTransactionData as struct
4424af5 Predeclare PrecomputedTransactionData as sturct (Pieter Wuille)
2016-09-05 13:30:09 +02:00
Suhas Daftuar
c40b034327 Clear witness with vin/vout in CWallet::CreateTransaction() 2016-09-04 20:09:13 -04:00
mruddy
ff2ed7a5bc trivial: remove unnecessary variable fDaemon 2016-09-04 11:42:07 -04:00
Gregory Maxwell
6d0ced1865 Do not set an addr time penalty when a peer advertises itself.
Claims a peer makes about itself are inherently more credible.
2016-09-03 10:24:37 +00:00
Pavel Janík
7c069a7093 Do not shadow global variable 2016-09-02 20:50:59 +02:00
Wladimir J. van der Laan
cbe9ae8c69
Merge #8466: [Trivial] Do not shadow variables in networking code
b7c349d Do not shadow variables in networking code (Pavel Janík)
2016-09-02 12:51:56 +02:00
Wladimir J. van der Laan
381d0ddc8a
Merge #8449: [Trivial] Do not shadow local variable, cleanup
a159f25 Remove redundand (and shadowing) declaration (Pavel Janík)
cce3024 Do not shadow local variable, cleanup (Pavel Janík)
2016-09-02 12:25:59 +02:00
Pieter Wuille
4424af5190 Predeclare PrecomputedTransactionData as sturct 2016-09-02 11:43:06 +02:00
Wladimir J. van der Laan
6f939c9080
Merge #8629: C++11: s/boost::scoped_ptr/std::unique_ptr/
cdd79eb C++11: s/boost::scoped_ptr/std::unique_ptr/ (Jorge Timón)
2016-09-02 09:56:33 +02:00
Jorge Timón
cdd79eb70f C++11: s/boost::scoped_ptr/std::unique_ptr/ 2016-09-01 19:05:07 +02:00
Pieter Wuille
854f1af22e Make the dummy argument to getaddednodeinfo optional 2016-09-01 16:27:30 +02:00
Wladimir J. van der Laan
f061415d12
Merge #8638: rest.cpp: change HTTP_INTERNAL_SERVER_ERROR to HTTP_BAD_REQUEST
f012a85 rest.cpp: change HTTP_INTERNAL_SERVER_ERROR to HTTP_BAD_REQUEST (djpnewton)
2016-09-01 15:58:43 +02:00
Wladimir J. van der Laan
0e563d89c0
Merge #8472: Do not shadow LOCK's criticalblock variable for LOCK inside LOCK
33d15a3 Do not shadow LOCK's criticalblock variable for LOCK inside LOCK (Pavel Janík)
2016-09-01 14:42:00 +02:00
Pieter Wuille
19b0f33de0
Merge #8524: Precompute sighashes
35fe039 Rename to PrecomputedTransactionData (Pieter Wuille)
ab48c5e Unit test for sighash caching (Nicolas DORIER)
d2c5d04 Precompute sighashes (Pieter Wuille)
2016-09-01 12:20:43 +02:00
djpnewton
f012a857f5 rest.cpp: change HTTP_INTERNAL_SERVER_ERROR to HTTP_BAD_REQUEST 2016-09-01 22:12:19 +12:00
Wladimir J. van der Laan
84decb54f2
Merge #8612: Check for compatibility with download in FindNextBlocksToDownload
887919c Check for compatibility with download in FindNextBlocksToDownload (Pieter Wuille)
2016-08-31 17:59:56 +02:00
Wladimir J. van der Laan
abc677c9a9
Merge #8191: Do not shadow variables in src/wallet
b175cb7 Do not shadow variables. (Pavel Janík)
2016-08-31 16:40:29 +02:00
Wladimir J. van der Laan
5cac8b123e
Merge #8291: [util] CopyrightHolders: Check for untranslated substitution
33336e1 [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke)
2016-08-31 16:17:00 +02:00
Pavel Janík
b175cb755b Do not shadow variables. 2016-08-31 16:16:05 +02:00
Wladimir J. van der Laan
0c8875d23b
Merge #8163: Do not shadow global RPC table variable (tableRPC)
de1bbe3 Do not shadow global RPC table variable (tableRPC) (Pavel Janík)
2016-08-31 16:07:58 +02:00
Wladimir J. van der Laan
df3f12d409
Merge #8626: Berkeley DB v6 compatibility fix
323a5fe Berkeley DB v6 compatibility fix (Alexey Vesnin)
2016-08-31 14:42:45 +02:00
Johnson Lau
482f852da6 Implement NULLDUMMY softfork 2016-08-31 19:38:23 +08:00
Wladimir J. van der Laan
2b23dbaee5
Merge #8611: Reduce default number of blocks to check at startup
203f212 Reduce default number of blocks to check at startup (Pieter Wuille)
2016-08-30 13:38:42 +02:00
Alexey Vesnin
323a5fe06a Berkeley DB v6 compatibility fix
Fixes building error looking like this:
CXX wallet/libbitcoin_wallet_a-db.o
wallet/db.cpp: In member function ‘void CDBEnv::EnvShutdown()’:
wallet/db.cpp:46:16: error: call of overloaded ‘DbEnv(int)’ is ambiguous
DbEnv(0).remove(strPath.c_str(), 0);
^
wallet/db.cpp:46:16: note: candidates are:
In file included from wallet/db.h:21:0,
from wallet/db.cpp:6:
/usr/include/db_cxx.h:916:2: note: DbEnv::DbEnv(const DbEnv&)
DbEnv(const DbEnv &);
^
/usr/include/db_cxx.h:518:2: note: DbEnv::DbEnv(DB_ENV)
DbEnv(DB_ENV *dbenv);
^
/usr/include/db_cxx.h:516:2: note: DbEnv::DbEnv(u_int32_t)
DbEnv(u_int32_t flags);
^
Makefile:5780: recipe for target 'wallet/libbitcoin_wallet_a-db.o' failed
make[2]: ** [wallet/libbitcoin_wallet_a-db.o] Error 1
2016-08-30 09:00:55 +03:00
Pieter Wuille
01680195f8
Merge #8564: [Wallet] remove unused code/conditions in ReadAtCursor
beef966 [Wallet] remove unused code/conditions in ReadAtCursor (Jonas Schnelli)
2016-08-29 16:16:23 +02:00
Wladimir J. van der Laan
a5bb6387f7
Merge #8607: [doc] Fix doxygen off-by-one comments, fix typos
fafe7b3 contrib: Make fix-copyright-headers.py more portable (MarcoFalke)
fa27c0a [doc] Fix typos in comments, doxygen: Fix comment syntax (MarcoFalke)
fabfd5d [qa] pull-tester: Don't mute zmq ImportError (MarcoFalke)
67a5502 init: Fix typo in help message for -whitelistforcerelay (Wladimir J. van der Laan)
2016-08-28 16:06:03 +02:00
Pieter Wuille
05e1c85fb6
Merge #8573: Set jonasschnellis dns-seeder filter flag
40a95cf Set jonasschnellis dns-seeder filter flag (Jonas Schnelli)
2016-08-28 13:17:30 +02:00
Pieter Wuille
203f2121be Reduce default number of blocks to check at startup 2016-08-27 15:28:20 +02:00
Pieter Wuille
5127c4f21c Add preciousblock RPC
Includes a bugfix by Luke-Jr.
2016-08-26 23:05:45 +02:00
Pieter Wuille
887919c7b7 Check for compatibility with download in FindNextBlocksToDownload 2016-08-26 21:44:44 +02:00
Pieter Wuille
144ed76ea0 Fix some locks
This makes sure that cs_filter is never held while taking cs_main
or CNode::cs_vSend.
2016-08-26 21:11:57 +02:00
Pieter Wuille
35fe0393f2 Rename to PrecomputedTransactionData 2016-08-26 18:44:10 +02:00
Pieter Wuille
9a0ed08b40
Merge #8109: Do not shadow member variables
ff8d279 Do not shadow member variables (Pavel Janík)
2016-08-26 18:13:22 +02:00
Wladimir J. van der Laan
12892dbb9f
Merge #8590: Remove unused variables
fa6dc9f Remove unused variables (MarcoFalke)
2016-08-26 13:24:12 +02:00
Wladimir J. van der Laan
05fa823bf6 wallet: Add BIP125 comment for MAXINT-1/-2 behavior 2016-08-26 12:57:28 +02:00
Peter Todd
152f45ba58 Add option to opt into full-RBF when sending funds 2016-08-26 12:10:42 +02:00
Jonas Schnelli
e3245b43d5
[Qt] add out-of-sync modal info layer 2016-08-26 11:34:30 +02:00
Wladimir J. van der Laan
65837375d9
Merge #8581: [wallet] rpc: Drop misleading option
fab5ecb [wallet] rpc: Drop misleading option (MarcoFalke)
2016-08-26 11:21:55 +02:00
Wladimir J. van der Laan
c19f8a4a77
Merge #8583: Show XTHIN in GUI
4c3e2cb Show XTHIN in GUI (R E Broadley)
2016-08-26 11:20:36 +02:00
Wladimir J. van der Laan
6c9f1b8c24
Merge #8561: Show "end" instead of many zeros when getheaders request received with a hashStop of Null
259ee09 Show "end" instead of many zeros when getheaders request received with a hashStop of Null. (R E Broadley)
2016-08-26 10:04:26 +02:00
Jonas Schnelli
e47052f6b5
[Qt] ClientModel add method to get the height of the header chain 2016-08-26 09:53:09 +02:00
Jonas Schnelli
a001f18802
[Qt] Always pass the numBlocksChanged signal for headers tip changed 2016-08-26 09:53:09 +02:00
Jonas Schnelli
bd44a04dc3
[Qt] make Out-Of-Sync warning icon clickable 2016-08-26 09:53:09 +02:00
Jonas Schnelli
0904c3cda4
[Refactor] refactor function that forms human readable text out of a timeoffset 2016-08-26 09:53:09 +02:00
Gregory Maxwell
eb3596f7c2 Do not add random inbound peers to addrman.
We should learn about new peers via address messages.

An inbound peer connecting to us tells us nothing about
 its ability to accept incoming connections from us, so
 we shouldn't assume that we can connect to it based on
 this.

The vast majority of nodes on the network do not accept
 incoming connections, adding them will only slow down
 the process of making a successful connection in the
 future.

Nodes which have configured themselves to not announce would prefer we
 not violate their privacy by announcing them in GETADDR responses.
2016-08-25 23:48:59 +00:00
MarcoFalke
fa8b02d36d [rpc] rawtx: Prepare fLimitFree to make it an option 2016-08-25 15:28:04 +02:00
MarcoFalke
fa28bfa341 [wallet] Set fLimitFree = true 2016-08-25 15:27:48 +02:00
Pieter Wuille
53f8f226bd
Merge #8462: Move AdvertiseLocal debug output to net category
f13c1ba Move AdvertiseLocal debug output to net category (Michael Rotarius)
2016-08-25 15:15:16 +02:00
Pavel Janík
de1bbe3b78 Do not shadow global RPC table variable (tableRPC) 2016-08-25 15:02:26 +02:00
MarcoFalke
fa6dc9f0e5 Remove unused variables 2016-08-25 14:59:38 +02:00
Jonas Schnelli
0606f95b1e
Merge #7579: [Qt] show network/chain errors in the GUI
2f32c82 [Qt] show network/chain errors in the GUI (Jonas Schnelli)
2016-08-25 14:55:26 +02:00
Jonas Schnelli
d26234a9e2
Merge #8487: Persist the datadir after option reset
57acb82 Load choose datadir dialog after options reset (Andrew Chow)
15df3c1 Persist the datadir after option reset (Andrew Chow)
2016-08-25 11:42:57 +02:00
MarcoFalke
95a983d56d
Merge #8578: [test] Remove unused code
fa1cf9e [test] Remove unused code (MarcoFalke)
2016-08-25 11:00:21 +02:00
Wladimir J. van der Laan
026c6edac9
Merge #8282: net: Feeler connections to increase online addrs in the tried table.
dbb1f64 Added feeler connections increasing good addrs in the tried table. (Ethan Heilman)
2016-08-25 10:48:24 +02:00
R E Broadley
4c3e2cb2df Show XTHIN in GUI 2016-08-25 09:22:46 +07:00
MarcoFalke
fa1cf9e7b8 [test] Remove unused code 2016-08-24 20:21:31 +02:00
MarcoFalke
fab5ecb771 [wallet] rpc: Drop misleading option 2016-08-24 19:28:04 +02:00
Andrew Chow
57acb82e70 Load choose datadir dialog after options reset 2016-08-24 09:40:48 -04:00
Jonas Schnelli
62a5a8a018
Merge #8463: [qt] Remove Priority from coincontrol dialog
fa8dd78 [qt] Remove Priority from coincontrol dialog (MarcoFalke)
2016-08-24 13:58:43 +02:00
Wladimir J. van der Laan
21857d2bf7
Merge #8450: [Test] Replace rpc_wallet_tests.cpp with python RPC unit tests
9578333 Remove rpc_wallet_tests.cpp (Patrick Strateman)
25400c4 Account wallet feature RPC tests. (Patrick Strateman)
2016-08-24 12:10:42 +02:00
MarcoFalke
fa8dd785a2 [qt] Remove Priority from coincontrol dialog 2016-08-24 11:37:30 +02:00
Pieter Wuille
f12d2b5a8a
Merge #8560: Trivial: Fix two VarInt examples in serialize.h
7bd5ff4 Trivial: Fix two VarInt examples in serialize.h (Christian Barcenas)
2016-08-24 10:42:08 +02:00
Wladimir J. van der Laan
f9167003d9
Merge #8445: Move CWallet::setKeyPool to private section of CWallet.
8680d3a Move wallet initialization logic from AppInit2 to CWallet::InitLoadWallet (Patrick Strateman)
e86eb71 Move CWallet::setKeyPool to private section of CWallet (Patrick Strateman)
2016-08-24 10:33:16 +02:00
Jonas Schnelli
40a95cfd8f
Set jonasschnellis dns-seeder filter flag 2016-08-24 09:06:56 +02:00
Ethan Heilman
dbb1f640e6 Added feeler connections increasing good addrs in the tried table.
Tests if addresses are online or offline by briefly connecting to them. These short lived connections are referred to as feeler connections. Feeler connections are designed to increase the number of fresh online addresses in tried by selecting and connecting to addresses in new. One feeler connection is attempted on average once every two minutes.

This change was suggested as Countermeasure 4 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.
2016-08-23 16:26:42 -04:00
Jonas Schnelli
beef966e36
[Wallet] remove unused code/conditions in ReadAtCursor 2016-08-23 15:36:23 +02:00
Jonas Schnelli
15860448d3
[Qt] RPC-Console: support nested commands and simple value queries
Commands can be executed with bracket syntax, example: `getwalletinfo()`.
Commands can be nested, example: `sendtoaddress(getnewaddress(), 10)`.
Simple queries are possible: `listunspent()[0][txid]`
Object values are accessed with a non-quoted string, example: [txid].

Fully backward compatible.
`generate 101` is identical to `generate(101)`
Result value queries indicated with `[]` require the new brackets syntax.
Comma as argument separator is now also possible: `sendtoaddress,<address>,<amount>`
Space as argument separator works also with the bracket syntax, example: `sendtoaddress(getnewaddress() 10)

No dept limitation, complex commands are possible:
`decoderawtransaction(getrawtransaction(getblock(getbestblockhash())[tx][0]))[vout][0][value]`
2016-08-23 15:32:39 +02:00
R E Broadley
259ee09f88 Show "end" instead of many zeros when getheaders request received with a hashStop of Null. 2016-08-23 13:14:07 +07:00
Christian Barcenas
7bd5ff4623 Trivial: Fix two VarInt examples in serialize.h 2016-08-22 20:49:36 -04:00
Wladimir J. van der Laan
41d8e78f94
Merge #8539: CDB: fix debug output
fab2e26 CDB: fix debug output (crowning-)
2016-08-22 16:40:08 +02:00
MarcoFalke
fa27c0a2c4 [doc] Fix typos in comments, doxygen: Fix comment syntax 2016-08-22 10:51:41 +02:00
Wladimir J. van der Laan
67a55025a1 init: Fix typo in help message for -whitelistforcerelay
Reported by pryds on Transifex in the Danish translation.
2016-08-22 10:51:13 +02:00
Wladimir J. van der Laan
37e77c106c
Merge #8554: trivial: remove unused variable
4207630 trivial: remove unused variable (Daniel Kraft)
2016-08-22 10:36:37 +02:00
Wladimir J. van der Laan
bb0f763a25
Merge #8558: Add copyright header to wallet_text_fixture.cpp
653bb3d Add copyright header to wallet_text_fixture.cpp (Wladimir J. van der Laan)
2016-08-22 10:32:30 +02:00
Wladimir J. van der Laan
a55a018d5f
Merge #8548: [wallet] Use __func__ to get function name for output printing
fa785d1 Use __func__ to get function name for output printing (MarcoFalke)
2016-08-22 09:58:28 +02:00
Wladimir J. van der Laan
653bb3d640 Add copyright header to wallet_text_fixture.cpp
I created the file but forgot to add this header.
2016-08-22 09:24:50 +02:00
Patrick Strateman
8680d3aa80 Move wallet initialization logic from AppInit2 to CWallet::InitLoadWallet 2016-08-20 14:03:47 -07:00
Daniel Kraft
4207630f5a trivial: remove unused variable
Remove the unused variable "blockTmp" in CMerkleTx::SetMerkleBranch.  It
was previously used to read the block from disk if not provided as
argument, but is no longer needed.
2016-08-20 10:28:06 +02:00
MarcoFalke
fa785d1211 Use __func__ to get function name for output printing 2016-08-19 18:59:00 +02:00
Jonas Schnelli
2468292a03
Merge #8517: [Qt] show wallet HD state in statusbar
914154f [Qt] add HD enabled/disabled icon to the status bar (Jonas Schnelli)
2016-08-19 18:47:49 +02:00
Jonas Schnelli
56ac046960
Merge #8443: [Wallet] Trivial cleanup of HD wallet changes
7e5d94d [Wallet] Trivial cleanup of HD wallet changes (Jonas Schnelli)
2016-08-19 18:39:19 +02:00
Jonas Schnelli
7e5d94df1f
[Wallet] Trivial cleanup of HD wallet changes 2016-08-19 16:23:37 +02:00
Wladimir J. van der Laan
f4e777819c
Merge #8461: document return value of networkhashps for getmininginfo RPC endpoint
65f4532 document return value of networkhashps for getmininginfo RPC endpoint (Jameson Lopp)
2016-08-19 12:18:42 +02:00
Jonas Schnelli
914154f0cc
[Qt] add HD enabled/disabled icon to the status bar 2016-08-19 09:21:04 +02:00
Wladimir J. van der Laan
b4a9aa511c qt: Fix random segfault when closing "Choose data directory" dialog
The `pickDataDirectory()` function was calling `exit(0)` to quit
the application when the user closes the dialog without choosing
a data directory.

This is a bad idea because a background thread is created (to
check free space on the drive of the currently selected datadir).
The thread is not stopped and unwound properly, resulting in a potential
race condition somewhere deep in Qt.

So replace the `exit()` by a boolean return value, and let the
stack unwind normally.
2016-08-18 16:58:25 +02:00
crowning-
fab2e26d20 CDB: fix debug output
It doesn't really help to clear a variable before printing it to the debug log.
2016-08-18 16:52:38 +02:00
Pieter Wuille
8250de1358
Merge #8453: Bring secp256k1 subtree up to date with master
b213535 Squashed 'src/secp256k1/' changes from 6c527ec..7a49cac (Wladimir J. van der Laan)
2016-08-18 13:53:41 +02:00
Patrick Strateman
e86eb71604 Move CWallet::setKeyPool to private section of CWallet 2016-08-17 15:24:57 -07:00
Wladimir J. van der Laan
e753eaeb34
Merge #8505: Trivial: Fix typos in various files
1aacfc2 various typos (leijurv)
2016-08-17 12:51:16 +02:00
Wladimir J. van der Laan
65e6444181
Merge #8513: Fix a type error that would not compile on OSX.
8194a6e Fix a type error that would not compile on Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) (Jeremy Rubin)
2016-08-17 12:32:58 +02:00
Wladimir J. van der Laan
29496fc9e0
Merge #8512: Trivial: Corrected JSON typo on setban of net.cpp
6ffd996 Corrected JSON typo on setban of net.cpp (Sev)
2016-08-17 12:01:46 +02:00
Nicolas DORIER
ab48c5e721 Unit test for sighash caching 2016-08-16 15:37:56 +02:00
Pieter Wuille
d2c5d044d0 Precompute sighashes
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
2016-08-16 15:35:45 +02:00
Wladimir J. van der Laan
0237096df5 Merge commit 'b2135359b3ad37cf2ac09b008079ddb237eff2c9' 2016-08-16 11:34:43 +02:00
Wladimir J. van der Laan
b2135359b3 Squashed 'src/secp256k1/' changes from 6c527ec..7a49cac
7a49cac Merge #410: Add string.h include to ecmult_impl
0bbd5d4 Add string.h include to ecmult_impl
c5b32e1 Merge #405: Make secp256k1_fe_sqrt constant time
926836a Make secp256k1_fe_sqrt constant time
e2a8e92 Merge #404: Replace 3M + 4S doubling formula with 2M + 5S one
8ec49d8 Add note about 2M + 5S doubling formula
5a91bd7 Merge #400: A couple minor cleanups
ac01378 build: add -DSECP256K1_BUILD to benchmark_internal build flags
a6c6f99 Remove a bunch of unused stdlib #includes
65285a6 Merge #403: configure: add flag to disable OpenSSL tests
a9b2a5d configure: add flag to disable OpenSSL tests
b340123 Merge #402: Add support for testing quadratic residues
e6e9805 Add function for testing quadratic residue field/group elements.
efd953a Add Jacobi symbol test via GMP
fa36a0d Merge #401: ecmult_const: unify endomorphism and non-endomorphism skew cases
c6191fd ecmult_const: unify endomorphism and non-endomorphism skew cases
0b3e618 Merge #378: .gitignore build-aux cleanup
6042217 Merge #384: JNI: align shared files copyright/comments to bitcoinj's
24ad20f Merge #399: build: verify that the native compiler works for static precomp
b3be852 Merge #398: Test whether ECDH and Schnorr are enabled for JNI
aa0b1fd build: verify that the native compiler works for static precomp
eee808d Test whether ECDH and Schnorr are enabled for JNI
7b0fb18 Merge #366: ARM assembly implementation of field_10x26 inner (rebase of #173)
001f176 ARM assembly implementation of field_10x26 inner
0172be9 Merge #397: Small fixes for sha256
3f8b78e Fix undefs in hash_impl.h
2ab4695 Fix state size in sha256 struct
6875b01 Merge #386: Add some missing `VERIFY_CHECK(ctx != NULL)`
2c52b5d Merge #389: Cast pointers through uintptr_t under JNI
43097a4 Merge #390: Update bitcoin-core GitHub links
31c9c12 Merge #391: JNI: Only call ecdsa_verify if its inputs parsed correctly
1cb2302 Merge #392: Add testcase which hits additional branch in secp256k1_scalar_sqr
d2ee340 Merge #388: bench_ecdh: fix call to secp256k1_context_create
093a497 Add testcase which hits additional branch in secp256k1_scalar_sqr
a40c701 JNI: Only call ecdsa_verify if its inputs parsed correctly
faa2a11 Update bitcoin-core GitHub links
47b9e78 Cast pointers through uintptr_t under JNI
f36f9c6 bench_ecdh: fix call to secp256k1_context_create
bcc4881 Add some missing `VERIFY_CHECK(ctx != NULL)` for functions that use `ARG_CHECK`
6ceea2c align shared files copyright/comments to bitcoinj's
70141a8 Update .gitignore
7b549b1 Merge #373: build: fix x86_64 asm detection for some compilers
bc7c93c Merge #374: Add note about y=0 being possible on one of the sextic twists
e457018 Merge #364: JNI rebased
86e2d07 JNI library: cleanup, removed unimplemented code
3093576a JNI library
bd2895f Merge pull request #371
e72e93a Add note about y=0 being possible on one of the sextic twists
3f8fdfb build: fix x86_64 asm detection for some compilers
e5a9047 [Trivial] Remove double semicolons
c18b869 Merge pull request #360
3026daa Merge pull request #302
03d4611 Add sage verification script for the group laws
a965937 Merge pull request #361
83221ec Add experimental features to configure
5d4c5a3 Prevent damage_array in the signature test from going out of bounds.
419bf7f Merge pull request #356
03d84a4 Benchmark against OpenSSL verification

git-subtree-dir: src/secp256k1
git-subtree-split: 7a49cacd3937311fcb1cb36b6ba3336fca811991
2016-08-16 11:34:11 +02:00
instagibbs
edb6cf1432 remove no-longer-used InitError logic 2016-08-15 10:28:53 -04:00
MarcoFalke
6e5e5abba6
Merge #8270: Tests: Use portable #! in python scripts (/usr/bin/env)
7b01ce2 Favour python over python2 as per PR #7723 (Matthew King)
873e81f Use portable #! in python scripts (/usr/bin/env) (Matthew King)
2016-08-15 15:45:20 +02:00
Jonas Schnelli
c503863150
Merge #8192: [trivial] Remove URLs from About dialog translations
208d37f [trivial] Remove URLs from About dialog translations (fanquake)
2016-08-15 15:36:42 +02:00
Pavel Janík
b7c349d5e7 Do not shadow variables in networking code 2016-08-15 14:10:07 +02:00
Wladimir J. van der Laan
1030fa718c
Merge #8128: Net: Turn net structures into dumb storage classes
9e9d644 net: fixup nits (Cory Fields)
8945384 net: Have LookupNumeric return a CService directly (Cory Fields)
21ba407 net: narrow include scope after moving to netaddress (Cory Fields)
21e5b96 net: move CNetAddr/CService/CSubNet out of netbase (Cory Fields)
1017b8a net: Add direct tests for new CSubNet constructors (Cory Fields)
b6c3ff3 net: Split resolving out of CSubNet (Cory Fields)
f96c7c4 net: Split resolving out of CService (Cory Fields)
31d6b1d net: Split resolving out of CNetAddr (Cory Fields)
2016-08-15 13:35:27 +02:00
Pieter Wuille
d727f77e39
Merge #7946: Reduce cs_main locks during ConnectTip/SyncWithWallets
b3b3c2a Reduce cs_main locks during ConnectTip/SyncWithWallets (Jonas Schnelli)
2016-08-15 11:56:37 +02:00
Jeremy Rubin
8194a6e525 Fix a type error that would not compile on Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 2016-08-14 20:45:46 -04:00
leijurv
1aacfc2da5
various typos 2016-08-14 07:57:11 -06:00
Sev
6ffd996b8e Corrected JSON typo on setban of net.cpp 2016-08-14 15:36:22 +03:00
Wladimir J. van der Laan
3859072963
Merge #8353: Trivial: tiny c++11 refactors
c784086 use std::map::emplace() instead of std::map::insert() (whythat)
5e187e7 use c++11 std::unique_ptr instead of boost::shared_ptr (whythat)
947913f use std::map::erase(const_iterator, const_iterator) to get non-constant iterator (whythat)
2016-08-13 15:55:09 +02:00
Cory Fields
9e9d644f51 net: fixup nits 2016-08-12 14:22:49 -04:00
Jonas Schnelli
b3b3c2a562
Reduce cs_main locks during ConnectTip/SyncWithWallets 2016-08-12 14:53:10 +02:00
Wladimir J. van der Laan
0d0abcac1e
Merge #8481: Qt: Fix minimize and close bugs
05242e9 Fix minimize and close bugs (adlawren)
2016-08-11 15:23:05 +02:00
Andrew Chow
15df3c196b Persist the datadir after option reset
After a reset is performed, the datadir setting is saved and readded to the settings so that it is persisted across option resets.
2016-08-10 15:09:19 -04:00
Wladimir J. van der Laan
edebf425a2
Merge #8489: Bugfix: Use pre-BIP141 sigops until segwit activates (GBT)
239cbd2 qa/rpc-tests/segwit: Test GBT sigops before and after activation (Luke Dashjr)
160f895 Bugfix: Use pre-BIP141 sigops until segwit activates (Luke Dashjr)
2016-08-10 09:21:34 +02:00
MarcoFalke
fa5d276c90 [init] ParameterInteraction() iff wallet enabled 2016-08-10 08:40:57 +02:00
whythat
c784086075 use std::map::emplace() instead of std::map::insert() 2016-08-09 03:11:45 +03:00
whythat
5e187e7001 use c++11 std::unique_ptr instead of boost::shared_ptr 2016-08-09 03:11:45 +03:00
whythat
947913fc54 use std::map::erase(const_iterator, const_iterator) to get non-constant iterator 2016-08-09 03:11:28 +03:00
Luke Dashjr
160f895a80 Bugfix: Use pre-BIP141 sigops until segwit activates 2016-08-08 21:56:32 +00:00
Patrick Strateman
9578333ec4 Remove rpc_wallet_tests.cpp 2016-08-07 19:30:20 -07:00
adlawren
05242e937d Fix minimize and close bugs
refs #8225

To ensure the GUI closes when the "Minimize on close" window option is disabled, and the "Minimize to the tray instead of the taskbar" window option is enbaled, remove a check made against the "Minimize to the tray instead of the taskbar" value, made during GUI closure.

To ensure the GUI minimizes to the taskbar when the "Minimize on close" window option is enabled, and the "Minimize to the tray instead of the taskbar" window option is disabled, minimize the GUI and ignore the closure event.
2016-08-06 23:58:30 -07:00
Pavel Janík
33d15a3a76 Do not shadow LOCK's criticalblock variable for LOCK inside LOCK 2016-08-06 10:54:29 +02:00
Pavel Janík
4a35e0f34c Do not shadow members in dbwrapper 2016-08-05 21:17:50 +02:00
Pavel Janík
a159f25e19 Remove redundand (and shadowing) declaration 2016-08-05 20:03:01 +02:00
Michael Rotarius
f13c1bae52 Move AdvertiseLocal debug output to net category 2016-08-05 18:34:32 +02:00
Jameson Lopp
65f4532f13 document return value of networkhashps for getmininginfo RPC endpoint 2016-08-05 04:04:07 -04:00
Cory Fields
8945384bca net: Have LookupNumeric return a CService directly
Also fix up a few small issues:
- Lookup with "badip:port" now sets the port to 0
- Don't allow assert to have side-effects
2016-08-04 16:41:39 -04:00
Wladimir J. van der Laan
f97d335942
Merge #8392: Fix several node initialization issues
9d4eb9a Do diskspace check before import thread is started (Pieter Wuille)
aa59f2e Add extra message to avoid a long 'Loading banlist' (Pieter Wuille)
0fd2a33 Use a signal to continue init after genesis activation (Pieter Wuille)
2016-08-04 12:33:21 +02:00
Wladimir J. van der Laan
37d83bb0a9
Merge #8391: Consensus: Remove ISM
122786d Consensus: Remove ISM (NicolasDorier)
2016-08-04 12:20:35 +02:00
Pavel Janík
cce3024c23 Do not shadow local variable, cleanup 2016-08-03 20:35:29 +02:00
Wladimir J. van der Laan
194110fb91
Merge #8189: rename mapAddrCount to mapNetGroupNodes
657fc19 rename mapAddrCount to mapNetGroupNodes (instagibbs)
2016-08-03 11:50:45 +02:00
Wladimir J. van der Laan
ced2d5ef7c
Merge #8446: [Trivial] BIP9 parameters on regtest cleanup
0fc00be Do not shadow previous local variable (Pavel Janík)
115265b Trivial: bip -> BIP in help text and comment (Pavel Janík)
2016-08-03 11:05:29 +02:00
Wladimir J. van der Laan
fc93486d2a
Merge #8428: Update README.md inside of src/test/
b8db185 Update README.md (Chris Stewart)
2016-08-03 11:00:30 +02:00
Pavel Janík
0fc00bea5d Do not shadow previous local variable 2016-08-02 10:26:54 +02:00
Pavel Janík
115265bb10 Trivial: bip -> BIP in help text and comment 2016-08-02 10:26:05 +02:00
Wladimir J. van der Laan
63c03dd41c
Merge #8418: Add tests for compact blocks
45c7ddd Add p2p test for BIP 152 (compact blocks) (Suhas Daftuar)
9a22a6c Add support for compactblocks to mininode (Suhas Daftuar)
a8689fd Tests: refactor compact size serialization in mininode (Suhas Daftuar)
9c8593d Implement SipHash in Python (Pieter Wuille)
56c87e9 Allow changing BIP9 parameters on regtest (Suhas Daftuar)
2016-08-02 08:26:57 +02:00
Wladimir J. van der Laan
ea268747b6
Merge #8419: Enable size accounting in mining unit tests
8bfd708 Enable size accounting in mining unit tests (Suhas Daftuar)
2016-08-01 10:42:31 +02:00
Pieter Wuille
c7e05b35ab
Merge #8432: Make CWallet::fFileBacked private.
29c2d99 Make CWallet::fFileBacked private. (Patrick Strateman)
2016-08-01 02:12:47 +02:00
Pieter Wuille
b9c1cd8184
Merge #8152: [Wallet] Remove CWalletDB* parameter from CWallet::AddToWallet
5723bb4 Remove unused pwalletdb from CWallet::AddToWallet (Patrick Strateman)
867f842 Remove CWalletDB* parameter from CWallet::AddToWallet (Patrick Strateman)
00f09c9 Split CWallet::AddToWallet into AddToWallet and LoadToWallet. (Patrick Strateman)
2016-08-01 02:06:42 +02:00
Pieter Wuille
8ea7d31e38
Merge #8413: Trivial: pass Consensus::Params& instead of CChainParams& in ContextualCheckBlock
c8664ee Trivial: pass Consensus::Params& instead of CChainParams& in ContextualCheckBlock (Jorge Timón)
2016-08-01 01:53:29 +02:00
Pieter Wuille
f798b891bc
Merge #8346: Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs
a6cc299 Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs (Jorge Timón)
2016-08-01 00:09:14 +02:00
Pavel Janík
ff8d279a78 Do not shadow member variables 2016-07-31 20:55:09 +02:00
Cory Fields
21ba407a73 net: narrow include scope after moving to netaddress
Net functionality is no longer needed for CAddress/CAddrman/etc. now that
CNetAddr/CService/CSubNet are dumb storage classes.
2016-07-31 14:01:44 -04:00
Cory Fields
21e5b96ff4 net: move CNetAddr/CService/CSubNet out of netbase 2016-07-31 14:01:44 -04:00
Cory Fields
1017b8a960 net: Add direct tests for new CSubNet constructors 2016-07-31 14:01:43 -04:00
Cory Fields
b6c3ff3dae net: Split resolving out of CSubNet 2016-07-31 14:01:43 -04:00
Chris Stewart
b8db185952 Update README.md
Updating documentation for adding new unit test files

Removing unneeded sentence from README

Removing uint160_tests.cpp as it DNE

Formatting command line instructions to use ``

fixing 80 char formatting issue in README

fixing more nits
2016-07-31 12:43:45 -05:00
Cory Fields
f96c7c4d91 net: Split resolving out of CService 2016-07-31 13:24:07 -04:00
Cory Fields
31d6b1d5f0 net: Split resolving out of CNetAddr 2016-07-31 13:24:07 -04:00
Patrick Strateman
29c2d99bc9 Make CWallet::fFileBacked private. 2016-07-30 11:27:48 -07:00
Pieter Wuille
9d4eb9ad99 Do diskspace check before import thread is started 2016-07-30 02:17:51 +02:00
Pieter Wuille
aa59f2ed3f Add extra message to avoid a long 'Loading banlist' 2016-07-30 02:17:51 +02:00
Pieter Wuille
0fd2a33648 Use a signal to continue init after genesis activation 2016-07-30 02:17:47 +02:00
Patrick Strateman
5723bb44ce Remove unused pwalletdb from CWallet::AddToWallet 2016-07-29 17:04:14 -07:00
Patrick Strateman
867f842f1e Remove CWalletDB* parameter from CWallet::AddToWallet 2016-07-29 17:04:14 -07:00
Patrick Strateman
00f09c920c Split CWallet::AddToWallet into AddToWallet and LoadToWallet.
This removes the fFromLoadWallet flag in AddToWallet.  These were already
effectively two methods.
2016-07-29 17:04:14 -07:00
Wladimir J. van der Laan
5c9e49d12c net: Ignore notfound P2P messages 2016-07-29 17:44:01 +02:00
Pieter Wuille
9c8593d2b4 Implement SipHash in Python 2016-07-29 09:41:58 -04:00
Suhas Daftuar
56c87e9211 Allow changing BIP9 parameters on regtest 2016-07-29 09:41:58 -04:00
Wladimir J. van der Laan
7a2d402727
Merge #8274: util: Update tinyformat
a5072a7 util: Remove zero-argument versions of LogPrint and error (Wladimir J. van der Laan)
695041e util: Update tinyformat (Wladimir J. van der Laan)
2016-07-29 12:32:47 +02:00
Wladimir J. van der Laan
b77bb95b3c
Merge #8421: httpserver: drop boost (#8023 dependency)
7e87033 httpserver: replace boost threads with std (Cory Fields)
d3773ca httpserver: explicitly detach worker threads (Cory Fields)
755aa05 httpserver: use a future rather than relying on boost's try_join_for (Cory Fields)
2016-07-29 11:29:00 +02:00
Wladimir J. van der Laan
842bf8d2c5
Merge #8408: Prevent fingerprinting, disk-DoS with compact blocks
1d06e49 Ignore CMPCTBLOCK messages for pruned blocks (Suhas Daftuar)
1de2a46 Ignore GETBLOCKTXN requests for unknown blocks (Suhas Daftuar)
2016-07-29 08:21:03 +02:00
Cory Fields
7e87033447 httpserver: replace boost threads with std
along with mutex/condvar/bind/etc.

httpserver handles its own interruption, so there's no reason not to use std
threading.

While we're at it, may as well kill the BOOST_FOREACH's as well.
2016-07-28 19:08:04 -04:00
Cory Fields
d3773ca9ae httpserver: explicitly detach worker threads
When using std::thread in place of boost::thread, letting the threads destruct
results in a std::terminate. According to the docs, the same thing should be
be happening in later boost versions:
http://www.boost.org/doc/libs/1_55_0/doc/html/thread/thread_management.html#thread.thread_management.thread.destructor

I'm unsure why this hasn't blown up already, but explicitly detaching can't
hurt.
2016-07-28 19:07:23 -04:00
Cory Fields
755aa05174 httpserver: use a future rather than relying on boost's try_join_for 2016-07-28 19:07:15 -04:00
Pieter Wuille
ad087638ee
Merge #8412: libconsensus: Expose a flag for BIP112
d12b732 libconsensus: Expose a flag for BIP112 (Jorge Timón)
2016-07-29 00:59:02 +02:00
Jorge Timón
a6cc299541 Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs 2016-07-29 00:48:20 +02:00
Suhas Daftuar
8bfd70817b Enable size accounting in mining unit tests 2016-07-28 14:27:19 -04:00
Wladimir J. van der Laan
133c727cc4
Merge #8321: [trivial] Switched constants to sizeof()
fbc6070 [trivial] Switched constants to sizeof() (Thomas Snider)
2016-07-28 13:54:08 +02:00
Jonas Schnelli
2266b43e33
Port from 0.13: Create a new HD seed after encrypting the wallet
Forward-ports two commits from 0.13:
- [0.13] Create a new HD seed after encrypting the wallet
- [Wallet] Add CKeyMetadata record for HDMasterKey(s), factor out HD key generation

Github-Pull: #8389
Rebased-From: f142c11ac634df487cc4bc65a5f1c9a3e3563dd9 de45c065f0648c4c41b57cb492420ceeed29dd11
2016-07-28 13:22:33 +02:00
Wladimir J. van der Laan
806b9e7570
Merge #8332: semi trivial: clarify witness branches in transaction.h serialization
e37b16a transaction: clarify witness branches (Daniel Cousens)
2016-07-28 13:00:02 +02:00
Wladimir J. van der Laan
30a87c0747
Merge #8407: [Qt] Add dbcache migration path
893f379 [Qt] Add dbcache migration path (Jonas Schnelli)
2016-07-28 11:28:42 +02:00
Jonas Schnelli
893f379ba0
[Qt] Add dbcache migration path 2016-07-28 10:57:24 +02:00
Wladimir J. van der Laan
64d660a43f
Merge #8348: Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock
38c4c8b Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock (Jorge Timón)
2016-07-28 09:51:04 +02:00
Kaz Wesley
d3af342276 prepend license statement to indirectmap
Add statement about MIT licensing to indirectmap.h. I forgot the license
preamble when I originally wrote the file.
2016-07-27 16:27:07 -07:00
Jorge Timón
d12b732ac2 libconsensus: Expose a flag for BIP112
We added the segwit one, but we forgot CHECKSEQUENCEVERIFY
2016-07-28 00:23:03 +02:00
Jorge Timón
c8664eeac7 Trivial: pass Consensus::Params& instead of CChainParams& in ContextualCheckBlock 2016-07-27 23:58:04 +02:00
Wladimir J. van der Laan
4d4970fe53
Merge #8206: [Wallet] Add HD xpriv to dumpwallet
77c912d [Wallet] add HD xpriv to dumpwallet (Jonas Schnelli)
2016-07-27 15:25:34 +02:00
Jonas Schnelli
77c912d21c
[Wallet] add HD xpriv to dumpwallet 2016-07-27 15:19:23 +02:00
Suhas Daftuar
1d06e49834 Ignore CMPCTBLOCK messages for pruned blocks
Also ignores CMPCTBLOCK announcements that have too little work.  This is to
prevent disk-exhaustion DoS.
2016-07-26 16:52:35 -04:00
Suhas Daftuar
1de2a46632 Ignore GETBLOCKTXN requests for unknown blocks
Don't disconnect peers, or else we leak information that could be
used for fingerprinting.
2016-07-26 16:50:48 -04:00
Wladimir J. van der Laan
4b1a4d8810
Merge #8381: Make witness v0 outputs non-standard
c59c434 qa: Add test for standardness of segwit v0 outputs (Suhas Daftuar)
1ffaff2 Make witness v0 outputs non-standard before segwit activation (Johnson Lau)
2016-07-26 14:24:11 +02:00
Wladimir J. van der Laan
618c9dd8c6
Merge #8365: Treat high-sigop transactions as larger rather than rejecting them
ab942c1 Treat high-sigop transactions as larger rather than rejecting them (Pieter Wuille)
2016-07-26 11:27:30 +02:00
Wladimir J. van der Laan
517eee3e8f
Merge #8362: Scale legacy sigop count in CreateNewBlock
682aa0f Scale legacy sigop count in CreateNewBlock (Suhas Daftuar)
2016-07-25 18:08:09 +02:00
lizhi
cc021ef486 remove outdated legacy code
CheckSignatureElement is not used,it be replaced by eccrypto::CheckSignatureElement.
2016-07-24 10:49:07 +08:00
NicolasDorier
122786d0e0 Consensus: Remove ISM 2016-07-23 01:02:53 +09:00
Suhas Daftuar
c59c434b7d qa: Add test for standardness of segwit v0 outputs 2016-07-23 00:01:02 +08:00
Johnson Lau
1ffaff2f74 Make witness v0 outputs non-standard before segwit activation 2016-07-22 06:35:07 +00:00
Jonas Schnelli
b50e1ac298
[Wallet] Correct hdmasterkeyid/masterkeyid name confusion 2016-07-21 21:58:12 +02:00
Wladimir J. van der Laan
381917f610
Merge #8347: Trivial: Make CBlockIndex param const in ContextualCheckBlockHeader and ContextualCheckBlock
6f3d616 Trivial: Make CBlockIndex param const in ContextualCheckBlockHeader and ContextualCheckBlock (Jorge Timón)
2016-07-21 14:31:40 +02:00
NicolasDorier
7821889bce Consensus: Remove calls to error() from ContextualCheckBlock 2016-07-21 20:57:08 +09:00
Wladimir J. van der Laan
6f4092da80
Merge #8342: Consensus: Trivial transform BOOST_FOREACH into for loop
a3e1984 Consensus: Trivial transform BOOST_FOREACH into for loop (NicolasDorier)
2016-07-21 11:56:33 +02:00
fanquake
208d37f116
[trivial] Remove URLs from About dialog translations 2016-07-21 16:21:08 +08:00
Jonas Schnelli
2f32c82b3d
[Qt] show network/chain errors in the GUI 2016-07-20 14:42:19 +02:00
Patrick Strateman
6523fcaab2 Move SetMinVersion for FEATURE_HD to SetHDMasterKey 2016-07-19 22:30:17 -07:00
Pieter Wuille
ab942c15bd Treat high-sigop transactions as larger rather than rejecting them 2016-07-19 12:31:49 +02:00
Wladimir J. van der Laan
045106b4f1
Merge #8367: [Wallet] Ensure <0.13 clients can't open HD wallets
a4f137f [Wallet] Ensure <0.13 clients can't open HD wallets (Jonas Schnelli)
2016-07-19 12:13:12 +02:00
Thomas Snider
fbc60703a5 [trivial] Switched constants to sizeof() 2016-07-18 19:42:09 -07:00
Jonas Schnelli
a4f137f367
[Wallet] Ensure <0.13 clients can't open HD wallets 2016-07-18 22:56:45 +02:00
Suhas Daftuar
2c06bae39e Rename "block cost" to "block weight" 2016-07-18 13:28:26 -04:00
Suhas Daftuar
682aa0f289 Scale legacy sigop count in CreateNewBlock 2016-07-18 12:42:41 -04:00
Wladimir J. van der Laan
6c0336c772
build: bump version to 0.13.99
Now that 0.13 branch has been split off, master is 0.13.99 (pre-0.14).
2016-07-18 12:22:18 +02:00
Wladimir J. van der Laan
e4382fbef5
qt: periodic translations update 2016-07-18 12:13:08 +02:00
Wladimir J. van der Laan
8cef5bd58a mining: Improve -blockmaxcost help message
One-word replacement to #8354.
2016-07-18 10:56:25 +02:00
Wladimir J. van der Laan
f5660d381a
Merge #8295: Mining-related fixups for 0.13.0
c1d61fb Add warning if -blockminsize is used. (Suhas Daftuar)
27362dd Remove -blockminsize option (Suhas Daftuar)
d2e46e1 Remove addScoreTxs() (Suhas Daftuar)
6dd4bc2 Exclude witness transactions in addPackageTxs() pre-segwit activation (Suhas Daftuar)
f15c2cd CreateNewBlock: add support for size-accounting to addPackageTxs (Suhas Daftuar)
2016-07-18 08:23:45 +02:00
Wladimir J. van der Laan
238300b398
Merge #8323: Add HD keypath to CKeyMetadata, report metadata in validateaddress
7945088 [Wallet] comsetic non-code changes for the HD feature (Jonas Schnelli)
68d7682 [Wallet] ensure CKeyMetadata.hdMasterKeyID will be cleared during SetNull() (Jonas Schnelli)
f708085 [QA] extend wallet-hd test to cover HD metadata (Jonas Schnelli)
986c223 [Wallet] print hd masterkeyid in getwalletinfo (Jonas Schnelli)
b1c7b24 [Wallet] report optional HDKeypath/HDMasterKeyId in validateaddress (Jonas Schnelli)
5b95dd2 [Wallet] extend CKeyMetadata with HD keypath (Jonas Schnelli)
2016-07-18 07:58:33 +02:00
Wladimir J. van der Laan
37303934fe
Merge #8305: Improve handling of unconnecting headers
e91cf4b Add test for handling of unconnecting headers (Suhas Daftuar)
96fa953 Improve handling of unconnecting headers (Suhas Daftuar)
2016-07-18 07:46:12 +02:00
Jorge Timón
38c4c8b701 Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock 2016-07-17 02:41:58 +02:00
Jorge Timón
6f3d616dc8 Trivial: Make CBlockIndex param const in ContextualCheckBlockHeader and ContextualCheckBlock 2016-07-17 01:43:15 +02:00
NicolasDorier
a3e1984651 Consensus: Trivial transform BOOST_FOREACH into for loop 2016-07-16 11:08:52 +09:00
Jonas Schnelli
7945088d41
[Wallet] comsetic non-code changes for the HD feature 2016-07-15 10:34:08 +02:00
Jonas Schnelli
68d7682b9f
[Wallet] ensure CKeyMetadata.hdMasterKeyID will be cleared during SetNull() 2016-07-15 10:33:25 +02:00
Wladimir J. van der Laan
bc94b87487
Merge #8324: [Wallet] keep HD seed during salvagewallet
b993671 [Wallet] keep HD seed during salvagewallet (Jonas Schnelli)
2016-07-14 11:37:48 +02:00
Wladimir J. van der Laan
ca40ef6029
Merge #8312: Fix mempool DoS vulnerability from malleated transactions
46c9620 Test that unnecessary witnesses can't be used for mempool DoS (Suhas Daftuar)
bb66a11 Fix DoS vulnerability in mempool acceptance (Suhas Daftuar)
2016-07-14 08:21:13 +02:00
Wladimir J. van der Laan
4324bd237c
Merge #8311: Rename CTxinWitness -> CTxInWitness
36ae37a Rename CTxinWitness -> CTxInWitness (Bob McElrath)
2016-07-14 08:18:38 +02:00
Wladimir J. van der Laan
1bc9c8085f
Merge #8271: [bugfix] Do not send witnesses in cmpctblock
252675e Do not send witnesses in cmpctblock (Pieter Wuille)
2016-07-14 08:17:22 +02:00
Daniel Cousens
e37b16a75c transaction: clarify witness branches 2016-07-14 13:40:50 +10:00
Suhas Daftuar
96fa95361f Improve handling of unconnecting headers
When processing a headers message that looks like a block announcement,
send peer a getheaders if the headers message won't connect.

Apply DoS points after too many consecutive unconnecting headers messages.
2016-07-12 13:12:40 -04:00
Wladimir J. van der Laan
4831a16223
qt: periodic translation update
Added languages:
- `bg_BG`: Bulgarian (Bulgaria)
2016-07-12 11:40:33 +02:00
Jonas Schnelli
b993671921
[Wallet] keep HD seed during salvagewallet 2016-07-09 12:58:03 +02:00
Jonas Schnelli
986c223214
[Wallet] print hd masterkeyid in getwalletinfo 2016-07-09 12:12:36 +02:00
Jonas Schnelli
b1c7b244e2
[Wallet] report optional HDKeypath/HDMasterKeyId in validateaddress 2016-07-09 12:12:32 +02:00
Jonas Schnelli
5b95dd2c25
[Wallet] extend CKeyMetadata with HD keypath 2016-07-09 11:52:17 +02:00
MarcoFalke
477777f250 [rpcwallet] Don't use floating point 2016-07-08 12:01:25 +02:00
Wladimir J. van der Laan
ff46dd4a34
Merge #7540: Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY
18c975c Rename NOP3 to CHECSEQUENCEVERIFY in rpc tests (BtcDrak)
14d0130 Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY (BtcDrak)
2016-07-08 11:39:10 +02:00
Suhas Daftuar
bb66a11396 Fix DoS vulnerability in mempool acceptance
Moves the IsStandard check to happen after the premature-witness check,
so that adding a witness to a transaction can't prevent mempool acceptance.

Note that this doesn't address the broader category of potential mempool DoS
issues that affect transactions after segwit activation.
2016-07-07 15:49:26 -04:00
Bob McElrath
36ae37a9f9 Rename CTxinWitness -> CTxInWitness 2016-07-06 19:46:46 -04:00
Jonas Schnelli
91abb77970
Merge #8288: qt: Network-specific example address
4f44cb6 qt: Network-specific example address (Wladimir J. van der Laan)
2016-07-06 15:45:17 +02:00
Wladimir J. van der Laan
b978701ba1
qt: periodic translations update 2016-07-06 07:59:07 +02:00
Wladimir J. van der Laan
396f9d6296
Merge #8273: Bump -dbcache default to 300MiB
efd1d83 doc: Mention dbcache increase in release notes (Wladimir J. van der Laan)
32cab91 Bump `-dbcache` default to 300MiB (Wladimir J. van der Laan)
2016-07-06 07:46:47 +02:00
Wladimir J. van der Laan
32cab91278 Bump -dbcache default to 300MiB
Also cap the allocation for the leveldb-specific cache for the UTXO set
to 8MiB.
This avoids that the extra cache memory goes to the much less effective
leveldb cache instead of our application-level cache.
2016-07-06 07:44:51 +02:00
Wladimir J. van der Laan
042c323922
Merge #8275: Remove bad chain alert partition check
ab8be98 Remove bad chain alert partition check (BtcDrak)
2016-07-06 07:35:54 +02:00
Wladimir J. van der Laan
aef381161f
Merge #8298: wallet: Revert input selection post-pruning
20f3cd7 wallet: Revert input selection post-pruning (Wladimir J. van der Laan)
2016-07-06 07:21:40 +02:00
Suhas Daftuar
c1d61fbd08 Add warning if -blockminsize is used. 2016-07-05 19:57:45 -04:00
Gregory Maxwell
4fbdc4365b Revert "net: Avoid duplicate getheaders requests." PR #8054
This reverts commit f93c2a1b7e.

This can cause synchronization to get stuck.
2016-07-05 20:45:14 +00:00
MarcoFalke
33336e1aac [util] CopyrightHolders: Check for untranslated substitution
Also, remove check which is always true
2016-07-02 10:46:26 +02:00
Wladimir J. van der Laan
20f3cd75f6 wallet: Revert input selection post-pruning
This reverts PR #4906, "Coinselection prunes extraneous inputs from
ApproximateBestSubset".

Apparently the previous behavior of slightly over-estimating the set of
inputs was useful in cleaning up UTXOs.

See also #7664, #7657, as well as 2016-07-01 discussion on #bitcoin-core-dev IRC.
2016-07-01 13:26:01 +02:00
Suhas Daftuar
27362dda4d Remove -blockminsize option 2016-06-30 11:41:13 -04:00
Suhas Daftuar
d2e46e1b5c Remove addScoreTxs() 2016-06-30 11:37:38 -04:00
Suhas Daftuar
6dd4bc289c Exclude witness transactions in addPackageTxs() pre-segwit activation 2016-06-30 11:24:32 -04:00
Wladimir J. van der Laan
975a41dcc2 windows: Add testnet icon for testnet link
Overhauled testnet icon by Jonas Schnelli
2016-06-30 17:17:58 +02:00
Wladimir J. van der Laan
4f44cb616d qt: Network-specific example address
Generate an (invalid) example address for in the bitcoin address
widgets, based on the network prefix, instead of hardcoding a mainnet
address.

- `1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L` for mainnet (same as now)
- `n2wxQmfexkjwEPgdD6iJA7T7RtzkmHxhFc` for testnet
2016-06-29 17:35:54 +02:00
Wladimir J. van der Laan
a7897c02f7 qt: Remove client name from debug window
Remove the client name from the debug window in the GUI. It is already
part of the user agent, so adding it separately doesn't add anything.
2016-06-28 18:27:49 +02:00
BtcDrak
14d01309be Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY 2016-06-28 17:17:36 +01:00
Wladimir J. van der Laan
3685e0c1da
Merge #8261: The bit field is shown only when status is "started"
2129fce The bit field is shown only when status is "started" (Pavel Janík)
2016-06-28 16:06:40 +02:00
Wladimir J. van der Laan
3b2dadc8d5
qt: Periodic translations update 2016-06-28 11:49:38 +02:00
Pavel Janík
2129fcea69 The bit field is shown only when status is "started" 2016-06-28 10:25:27 +02:00
Wladimir J. van der Laan
ff03c50c00
Merge #8257: Do not ask a UI question from bitcoind
1acf1db Do not ask a UI question from bitcoind (Pieter Wuille)
2016-06-28 10:12:01 +02:00
Wladimir J. van der Laan
a5072a7730 util: Remove zero-argument versions of LogPrint and error
Changes in tinyformat, recently imported from upstream have made the
zero-argument versions of formatting functions unnecessary. Remove them.

This is a slight semantic change: `%` characters in the zero-argument
call are now regarded and need to be escaped. As for as I know, the only
use of this is in `main.cpp`.
2016-06-27 18:39:25 +02:00
Wladimir J. van der Laan
695041e495 util: Update tinyformat
Updates `tinyformat.h` to commit
3a33bbf654 upstream.

Makes sure that our local changes are kept:

- #3767 1b8fd35aad Make tinyformat errors raise an exception instead of assert()ing
- #4735 9b6d4c5cdc Move strprintf define to tinyformat.h
- #4748 6e5fd003e0 include stdexcept (for std::exception)
- #8000 9eaa0afa6e force USE_VARIADIC_TEMPLATES
- Add `std::string format(const std::string &fmt...` added this
  at the time, as we want to be able to do `strprintf(_(...), ...)`

Inspired by #8264.
2016-06-27 18:17:27 +02:00
Suhas Daftuar
f15c2cde45 CreateNewBlock: add support for size-accounting to addPackageTxs
Includes a change to not continue to use size-accounting in addScoreTxs
or addPackageTxs just because addPriorityTxs() is used.
2016-06-27 10:58:58 -04:00
Wladimir J. van der Laan
5a06ebbf2d
Merge #8258: RPC: Hide softfork if timeout is 0
409f833 RPC: Hide softfork if timeout is 0 (jl2012)
2016-06-27 16:07:50 +02:00
Pieter Wuille
252675efc6 Do not send witnesses in cmpctblock 2016-06-26 20:19:00 +02:00
Matthew King
873e81f89b Use portable #! in python scripts (/usr/bin/env) 2016-06-26 16:47:03 +03:00
Wladimir J. van der Laan
1922e5a654
Merge #8244: remove unnecessary LOCK(cs_main) in getrawpmempool
27f8126 remove unnecessary LOCK(cs_main) (Daniel Cousens)
2016-06-25 16:10:10 +02:00
jl2012
409f83322e RPC: Hide softfork if timeout is 0 2016-06-25 00:55:07 +08:00
Wladimir J. van der Laan
d612837814
Merge #8149: Segregated witness rebased
f852813 BIP9 parameters for testnet (Johnson Lau)
070dbc4 --- [SEGWIT] begin: deployment --- (Pieter Wuille)
fdb43df [qa] Add GetTransactionSigOpCost unit tests (Jonas Nick)
d846e02 [qa] script_tests: witness tests can specify tx amount (Suhas Daftuar)
330b0f3 [qa] p2p segwit tests (Suhas Daftuar)
4f7ff00 [qa] Add rpc test for segwit (Alex Morcos)
66cca79 [qa] Autogeneration support for witness in script_tests (Pieter Wuille)
06d3805 [qa] Add segwit support to script_tests (Pieter Wuille)
00f46cb [qa] Add transaction tests for segwit (NicolasDorier)
0aa9207 [qa] Witness version 0 signing unit tests (Pieter Wuille)
978e200 --- [SEGWIT] begin: tests --- (Pieter Wuille)
745eb67 [RPC] signrawtransaction can sign P2WSH (NicolasDorier)
f4691ab [RPC] Add wallet support for witness transactions (using P2SH) (Pieter Wuille)
605e847 BIP143: Signing logic (Pieter Wuille)
9757b57 --- [SEGWIT] begin: wallet --- (Pieter Wuille)
af87a67 Do not use compact blocks when segwit is enabled (Pieter Wuille)
6032f69 Add rewind logic to deal with post-fork software updates (Pieter Wuille)
b7dbeb2 [libconsensus] Script verification API with amounts (Thomas Kerin)
2b1f6f9 BIP141: Other consensus critical limits, and BIP145 (Pieter Wuille)
7c4bf77 [RPC] Return witness data in blockchain RPCs (Johnson Lau)
3dd4102 BIP143: Verification logic (Pieter Wuille)
0ef1dd3 Refactor script validation to observe amounts (Pieter Wuille)
b8a9749 BIP144: Handshake and relay (receiver side) (Pieter Wuille)
8b49040 BIP141: Commitment structure and deployment (Pieter Wuille)
449f9b8 BIP141: Witness program (Pieter Wuille)
7030d9e BIP144: Serialization, hashes, relay (sender side) (Pieter Wuille)
ecacfd9 --- [SEGWIT] begin: P2P/node/consensus --- (Pieter Wuille)
2016-06-24 18:07:44 +02:00
Pieter Wuille
1acf1db76f Do not ask a UI question from bitcoind 2016-06-24 16:45:12 +02:00
Wladimir J. van der Laan
af2421c291
Merge #8256: BUG: bitcoin-qt crash
d7828ab check that transactionView->selectionModel()->selectedRows(0) exists (fsb4000)
2016-06-24 13:48:16 +02:00
fsb4000
d7828abd5b check that transactionView->selectionModel()->selectedRows(0) exists 2016-06-24 18:08:32 +07:00
Pieter Wuille
133deb83df Mark my dnsseed as supporting filtering 2016-06-23 15:44:35 +02:00
Wladimir J. van der Laan
08338942b5
Merge #8204: Update petertodd's testnet seed
d80efec Update petertodd's testnet seed (Peter Todd)
2016-06-23 13:04:42 +02:00
Wladimir J. van der Laan
a1c92c29fd trivial: capitalize BIP32 in option help
For consistency, BIP32 should be in uppercase in translation message.

Reported by @pryds on Transifex.
2016-06-23 10:44:36 +00:00
Daniel Cousens
27f8126ff3 remove unnecessary LOCK(cs_main) 2016-06-23 12:44:53 +10:00
Johnson Lau
f8528134fc BIP9 parameters for testnet 2016-06-22 15:43:02 +02:00
Jonas Nick
fdb43df23e [qa] Add GetTransactionSigOpCost unit tests 2016-06-22 15:43:02 +02:00
Suhas Daftuar
d846e02372 [qa] script_tests: witness tests can specify tx amount
Add tests that witness signatures cover value
2016-06-22 15:43:02 +02:00
Suhas Daftuar
330b0f31ee [qa] p2p segwit tests
mininode now supports witness transactions/blocks, blocktools
has a helper for adding witness commitments to blocks, and script
has a function to calculate hashes for signature under sigversion
1, used by segwit.

Py3 conversion by Marco Falke

Test to make sure upgraded nodes don't ask for non-wit blocks by
Gregory Sanders.
2016-06-22 15:43:02 +02:00
Alex Morcos
4f7ff00497 [qa] Add rpc test for segwit
Amended by Pieter Wuille to use multisig 1-of-1 for P2WSH tests, and BIP9
based switchover logic.

Fixes and py3 conversion by Marco Falke.
2016-06-22 15:43:01 +02:00
Pieter Wuille
66cca79130 [qa] Autogeneration support for witness in script_tests 2016-06-22 15:43:01 +02:00
Pieter Wuille
06d3805c1a [qa] Add segwit support to script_tests
Contains fix by Johnson Lau.
2016-06-22 15:43:01 +02:00
NicolasDorier
00f46cbcd9 [qa] Add transaction tests for segwit
Including BIP143 P2WSH examples by jl2012.
2016-06-22 15:43:01 +02:00
Pieter Wuille
0aa9207451 [qa] Witness version 0 signing unit tests 2016-06-22 15:43:01 +02:00
NicolasDorier
745eb678ef [RPC] signrawtransaction can sign P2WSH 2016-06-22 15:43:01 +02:00
Pieter Wuille
f4691ab3a9 [RPC] Add wallet support for witness transactions (using P2SH)
Includes support for pushkeyhash wit v0 by Alex Morcos.
2016-06-22 15:43:01 +02:00
Pieter Wuille
605e8473a7 BIP143: Signing logic 2016-06-22 15:43:01 +02:00
Pieter Wuille
af87a67eff Do not use compact blocks when segwit is enabled 2016-06-22 15:43:00 +02:00
Pieter Wuille
6032f6930a Add rewind logic to deal with post-fork software updates
Includes logic for dealing with pruning by Suhas Daftuar.
2016-06-22 15:43:00 +02:00
Thomas Kerin
b7dbeb24eb [libconsensus] Script verification API with amounts
script_tests: always test bitcoinconsensus_verify_script_with_amount if VERIFY_WITNESS isn't set

Rename internal method + make it static

trim bitcoinconsensus_ prefix

Add SERIALIZE_TRANSACTION_WITNESS flag
2016-06-22 15:43:00 +02:00
Pieter Wuille
2b1f6f9ccf BIP141: Other consensus critical limits, and BIP145
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22 15:43:00 +02:00
Johnson Lau
7c4bf779e8 [RPC] Return witness data in blockchain RPCs
Includes RPC field name changes by Luke-jr.
2016-06-22 15:43:00 +02:00
Pieter Wuille
3dd410294d BIP143: Verification logic
Includes simplifications by Eric Lombrozo.
2016-06-22 15:43:00 +02:00
Pieter Wuille
0ef1dd3e11 Refactor script validation to observe amounts
This is a preparation for BIP143 support.
2016-06-22 15:43:00 +02:00
Pieter Wuille
b8a97498df BIP144: Handshake and relay (receiver side)
Service bit logic by Nicolas Dorier.

Only download blocks from witness peers after fork.
2016-06-22 15:42:59 +02:00
Pieter Wuille
8b49040854 BIP141: Commitment structure and deployment
Includes a fix by Suhas Daftuar and LongShao007
2016-06-22 15:42:59 +02:00
Pieter Wuille
449f9b8deb BIP141: Witness program 2016-06-22 15:42:59 +02:00
Pieter Wuille
7030d9eb47 BIP144: Serialization, hashes, relay (sender side)
Contains refactorings by Eric Lombrozo.
Contains fixup by Nicolas Dorier.
Contains cleanup of CInv::GetCommand by Alex Morcos
2016-06-22 15:42:59 +02:00
Wladimir J. van der Laan
e9d76a161d
Merge #8068: Compact Blocks
48efec8 Fix some minor compact block issues that came up in review (Matt Corallo)
ccd06b9 Elaborate bucket size math (Pieter Wuille)
0d4cb48 Use vTxHashes to optimize InitData significantly (Matt Corallo)
8119026 Provide a flat list of txid/terators to txn in CTxMemPool (Matt Corallo)
678ee97 Add BIP 152 to implemented BIPs list (Matt Corallo)
56ba516 Add reconstruction debug logging (Matt Corallo)
2f34a2e Get our "best three" peers to announce blocks using cmpctblocks (Matt Corallo)
927f8ee Add ability to fetch CNode by NodeId (Matt Corallo)
d25cd3e Add receiver-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo)
9c837d5 Add sender-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo)
00c4078 Add protocol messages for short-ids blocks (Matt Corallo)
e3b2222 Add some blockencodings tests (Matt Corallo)
f4f8f14 Add TestMemPoolEntryHelper::FromTx version for CTransaction (Matt Corallo)
85ad31e Add partial-block block encodings API (Matt Corallo)
5249dac Add COMPACTSIZE wrapper similar to VARINT for serialization (Matt Corallo)
cbda71c Move context-required checks from CheckBlockHeader to Contextual... (Matt Corallo)
7c29ec9 If AcceptBlockHeader returns true, pindex will be set. (Matt Corallo)
96806c3 Stop trimming when mapTx is empty (Pieter Wuille)
2016-06-22 14:30:38 +02:00
Wladimir J. van der Laan
9e45ef1ef0
Merge #8234: qt: Periodic transifex update
4cbe05b qt: Periodic transifex update (Wladimir J. van der Laan)
2016-06-22 08:52:06 +02:00
Wladimir J. van der Laan
760a6c7cb2
Merge #8231: [Qt] fix a bug where the SplashScreen will not be hidden during startup
b3e1348 [Qt] fix a bug where the SplashScreen will not be hidden during startup (Jonas Schnelli)
2016-06-22 08:50:14 +02:00
Wladimir J. van der Laan
961893f26e
Merge #8222: Enable mempool consistency checks in unit tests
3775ff9 Enable mempool consistency checks in unit tests (Pieter Wuille)
2016-06-22 08:48:37 +02:00
Matt Corallo
48efec82f3 Fix some minor compact block issues that came up in review 2016-06-21 16:09:46 -07:00
Wladimir J. van der Laan
4cbe05bf20 qt: Periodic transifex update
Pulls in the following new languages:

- `af` Afrikaans
- `es_419` Spanish (Latin America)
- `es_AR` Spanish (Argentina)
- `es_CO` Spanish (Colombia)
- `fil` Filipino
- `it_IT` Italian (Italy)
- `ro` Romanian
- `sr@latin` Serbian (Latin)
- `ta` Tamil
- `uz@Latn` Uzbek (Latin)
- `zh_HK` Chinese (Hong Kong)
2016-06-21 15:32:07 +02:00
Jonas Schnelli
b3e1348c46
[Qt] fix a bug where the SplashScreen will not be hidden during startup 2016-06-21 11:35:29 +02:00
TheLazieR Yip
bf9c70b100
Fix LogPrint to LogPrintf
Printing Log without category defined should use LogPrintf

Github-Pull: #8230
Meta: PR should have been based on master in the first place
2016-06-21 10:21:42 +02:00
Wladimir J. van der Laan
1f86d64f6d
Merge #8220: Stop trimming when mapTx is empty
ad0752e Stop trimming when mapTx is empty (Pieter Wuille)
2016-06-20 15:21:27 +02:00
Wladimir J. van der Laan
94ab58b5cc
Merge #8179: Evict orphans which are included or precluded by accepted blocks.
54326a6 Increase maximum orphan size to 100,000 bytes. (Gregory Maxwell)
8c99d1b Treat orphans as implicit inv for parents, discard when parents rejected. (Gregory Maxwell)
11cc143 Adds an expiration time for orphan tx. (Gregory Maxwell)
db0ffe8 This eliminates the primary leak that causes the orphan map to  always grow to its maximum size. (Gregory Maxwell)
1b0bcc5 Track orphan by prev COutPoint rather than prev hash (Pieter Wuille)
2016-06-20 14:53:33 +02:00
Wladimir J. van der Laan
a6ddb19bd9
Merge #7687: Stop treating importaddress'ed scripts as change
595b22e Stop treating importaddress'ed scripts as change (Pieter Wuille)
2016-06-20 14:09:49 +02:00
Wladimir J. van der Laan
12a541e8da
Merge #8210: [Qt] Bump to Qt5.6.1
2759597 Only pass -lQt5PlatformSupport if >=Qt5.6 (Jonas Schnelli)
59d063d Use runtime linking of QT libdbus, use custom/temp. SDK URL (Jonas Schnelli)
6194d9a Fix bitcoin_qt.m4 and fix-xcb-include-order.patch (Jonas Schnelli)
f6eb4e2 [depends] OpenSSL 1.0.1k - update config_opts (fanquake)
f25209a depends: bump OSX toolchain (Cory Fields)
2016-06-20 13:33:41 +02:00
Jonas Schnelli
2759597bc8
Only pass -lQt5PlatformSupport if >=Qt5.6 2016-06-20 10:17:01 +02:00
Pieter Wuille
ccd06b94f6 Elaborate bucket size math 2016-06-19 23:06:55 -07:00
Matt Corallo
0d4cb48ef1 Use vTxHashes to optimize InitData significantly 2016-06-19 23:06:55 -07:00
Matt Corallo
811902649d Provide a flat list of txid/terators to txn in CTxMemPool 2016-06-19 23:06:55 -07:00
Matt Corallo
56ba516727 Add reconstruction debug logging 2016-06-19 23:06:55 -07:00
Matt Corallo
2f34a2e476 Get our "best three" peers to announce blocks using cmpctblocks 2016-06-19 23:06:55 -07:00
Matt Corallo
927f8eede0 Add ability to fetch CNode by NodeId 2016-06-19 23:06:55 -07:00
Matt Corallo
d25cd3ec4e Add receiver-side protocol implementation for CMPCTBLOCK stuff 2016-06-19 23:06:55 -07:00
Matt Corallo
9c837d5468 Add sender-side protocol implementation for CMPCTBLOCK stuff 2016-06-19 01:34:58 -07:00
Matt Corallo
00c40784fe Add protocol messages for short-ids blocks 2016-06-19 01:34:57 -07:00
Matt Corallo
e3b2222144 Add some blockencodings tests 2016-06-19 01:34:57 -07:00
Matt Corallo
f4f8f14adc Add TestMemPoolEntryHelper::FromTx version for CTransaction 2016-06-19 01:34:57 -07:00
Matt Corallo
85ad31ede7 Add partial-block block encodings API 2016-06-19 01:34:57 -07:00
Matt Corallo
5249daca5a Add COMPACTSIZE wrapper similar to VARINT for serialization 2016-06-19 01:34:57 -07:00
Matt Corallo
cbda71cf04 Move context-required checks from CheckBlockHeader to Contextual... 2016-06-19 01:34:57 -07:00
Matt Corallo
7c29ec9449 If AcceptBlockHeader returns true, pindex will be set.
Assert this instead of checking (and then dref'ing later anyway)
to make sure no one thinks they can change that postcondition of
AcceptBlockHeader..
2016-06-19 01:34:57 -07:00
Pieter Wuille
96806c39f4 Stop trimming when mapTx is empty 2016-06-19 01:34:57 -07:00
Daniel Kraft
9fce0629b4 [c++11] Use std::unique_ptr for block creation.
CreateNewBlock returns a pointer for which the caller takes ownership.
Use std::unique_ptr to make this explicit and simplify handling of these
objects in getblocktemplate.
2016-06-18 19:38:28 +02:00
Pieter Wuille
3775ff9ea7 Enable mempool consistency checks in unit tests 2016-06-18 19:15:03 +02:00
Pieter Wuille
ad0752e41f Stop trimming when mapTx is empty 2016-06-18 18:50:40 +02:00
MarcoFalke
faa91b12f7 [wallet] tests: Don't use floating point 2016-06-17 13:07:38 +02:00
Pieter Wuille
66db2d62d5
Merge #7600: Mining: Select transactions using feerate-with-ancestors
29fac19 Add unit tests for ancestor feerate mining (Suhas Daftuar)
c82a4e9 Use ancestor-feerate based transaction selection for mining (Suhas Daftuar)
2016-06-16 19:20:13 +02:00
Suhas Daftuar
29fac19c93 Add unit tests for ancestor feerate mining 2016-06-16 12:35:37 -04:00
Suhas Daftuar
c82a4e9a63 Use ancestor-feerate based transaction selection for mining
Includes changes by Pieter Wuille
2016-06-16 12:35:37 -04:00
Wladimir J. van der Laan
9c3d0fab36
Merge #7892: Add full UTF-8 support to RPC
7982fce doc: Mention full UTF-8 support in release notes (Wladimir J. van der Laan)
6bbb4ef test: test utf-8 for labels in wallet (Wladimir J. van der Laan)
a406fcb test: add ensure_ascii setting to AuthServiceProxy (Wladimir J. van der Laan)
60ab9b2 Squashed 'src/univalue/' changes from 2740c4f..f32df99 (Wladimir J. van der Laan)
2016-06-16 12:08:35 +02:00
Wladimir J. van der Laan
3f89a534ac
Merge #8113: Rework addnode behaviour
1a5a4e6 Randomize name lookup result in ConnectSocketByName (Pieter Wuille)
f9f5cfc Prevent duplicate connections where one is by name and another by ip (Pieter Wuille)
1111b80 Rework addnode behaviour (Pieter Wuille)
2016-06-16 12:06:51 +02:00
Wladimir J. van der Laan
62fcf27bd8
Merge #8171: [RPC] Fix createrawtx sequence number unsigned int parsing
6fa950a [RPC] Fix createrawtx sequence number unsigned int parsing (Jonas Schnelli)
2016-06-16 11:06:51 +02:00
Wladimir J. van der Laan
e4bb4a85a5
Merge #8084: Add recently accepted blocks and txn to AttemptToEvictConnection.
6ee7f05 Allow disconnecting a netgroup with only one member in eviction. (Gregory Maxwell)
5d0ca81 Add recently accepted blocks and txn to AttemptToEvictConnection. (Gregory Maxwell)
2016-06-16 11:03:52 +02:00
Wladimir J. van der Laan
0a64777b90
Merge #8208: Do not set extra flags for unfiltered DNS seed results
bc0a895 Do not set extra flags for unfiltered DNS seed results (Pieter Wuille)
2016-06-16 10:57:59 +02:00
Wladimir J. van der Laan
f7a403b4cf
Merge #8207: [trivial] Add a link to the Bitcoin-Core repository and website to the About Dialog
fa58e5e [doc] Add website links to about dialog (MarcoFalke)
2016-06-16 10:56:20 +02:00
MarcoFalke
fa58e5ee93 [doc] Add website links to about dialog 2016-06-16 10:07:36 +02:00
Gregory Maxwell
6ee7f05622 Allow disconnecting a netgroup with only one member in eviction.
With the latest additions there are enough protective measures that
 we can take the training wheels off.
2016-06-15 20:19:13 +00:00
Gregory Maxwell
5d0ca81f74 Add recently accepted blocks and txn to AttemptToEvictConnection.
This protects any not-already-protected peers who were the most
 recent four to relay transactions and most recent four to send
 blocks to us.
2016-06-15 20:19:07 +00:00
Pieter Wuille
bc0a895d81 Do not set extra flags for unfiltered DNS seed results 2016-06-15 19:31:58 +02:00
Gregory Maxwell
54326a6808 Increase maximum orphan size to 100,000 bytes.
Although this increases node memory usage in the worst case by perhaps
 30MB, the current behavior causes severe issues with dependent tx relay.
2016-06-15 09:56:42 +00:00
Gregory Maxwell
8c99d1b525 Treat orphans as implicit inv for parents, discard when parents rejected.
An orphan whos parents were rejected is never going to connect, so there
 is little utility in keeping it.

Orphans also helpfully tell us what we're missing, so go ahead and treat
 it as INVed.
2016-06-15 09:56:37 +00:00
Gregory Maxwell
11cc143895 Adds an expiration time for orphan tx.
This prevents higher order orphans and other junk from
 holding positions in the orphan map.  Parents delayed
 twenty minutes are more are unlikely to ever arrive.

The freed space will improve the orphan matching success rate for
 other transactions.
2016-06-15 09:56:28 +00:00
Peter Todd
d80efec327
Update petertodd's testnet seed
New seed with servicebit filtering support.
2016-06-15 00:11:39 -04:00
BtcDrak
ab8be98fdb Remove bad chain alert partition check
As per meeting 2016-03-31
https://bitcoincore.org/en/meetings/2016/03/31/#bad-chain-alerts

The partition checker was producing huge number of false-positives
and was disabled in 0.12.1 on the understanding it would either be
fixed in 0.13 or removed entirely from master if not.
2016-06-14 12:26:59 +01:00
Jonas Schnelli
fb0ac482ee
Merge #7636: Add bitcoin address label to request payment QR code
1c2a1ba Add address label to request payment QR Code (QT) (Francesco 'makevoid' Canessa)
2016-06-14 13:17:44 +02:00
Wladimir J. van der Laan
b67a4726df
Merge #8035: [Wallet] Add simplest BIP32/deterministic key generation implementation
afcd77e Detect -usehd mismatches when wallet.dat already exists (Jonas Schnelli)
17c0131 [Docs] Add release notes and bip update for Bip32/HD wallets (Jonas Schnelli)
c022e5b [Wallet] use constant for bip32 hardened key limit (Jonas Schnelli)
f190251 [Wallet] Add simplest BIP32/deterministic key generation implementation (Jonas Schnelli)
2016-06-14 11:44:22 +02:00
Jonas Schnelli
afcd77e179
Detect -usehd mismatches when wallet.dat already exists 2016-06-14 08:56:01 +02:00
Pieter Wuille
1a5a4e6488 Randomize name lookup result in ConnectSocketByName 2016-06-13 23:53:08 +02:00
Pieter Wuille
f9f5cfc506 Prevent duplicate connections where one is by name and another by ip 2016-06-13 23:53:08 +02:00
Pieter Wuille
1111b80df8 Rework addnode behaviour
* Use CNode::addeName to track whether a connection to a name is already open
  * A new connection to a previously-connected by-name addednode is only opened when
    the previous one closes (even if the name starts resolving to something else)
  * At most one connection is opened per addednode (even if the name resolves to multiple)
* Unify the code between ThreadOpenAddedNodeConnections and getaddednodeinfo
  * Information about open connections is always returned, and the dns argument becomes a dummy
  * An IP address and inbound/outbound is only reported for the (at most 1) open connection
2016-06-13 23:53:06 +02:00
Pieter Wuille
ecd7fd37c8 Introduce REQUIRED_SERVICES constant 2016-06-13 17:40:16 +02:00
Pieter Wuille
ee06e04369 Introduce enum ServiceFlags for service flags 2016-06-13 17:40:16 +02:00
Pieter Wuille
15bf863219 Don't require services in -addnode 2016-06-13 17:40:16 +02:00
Pieter Wuille
5e7ab16d29 Only store and connect to NODE_NETWORK nodes 2016-06-13 17:40:16 +02:00
Pieter Wuille
fc83f18153 Verify that outbound connections have expected services 2016-06-13 17:40:16 +02:00
Pieter Wuille
3764dec36c Keep addrman's nService bits consistent with outbound observations 2016-06-13 17:40:16 +02:00
Francesco 'makevoid' Canessa
1c2a1bac0a Add address label to request payment QR Code (QT)
In the Receive 'Tab' of the QT wallet, when 'Show'ing a previously requested payment, add a label underneath the QR Code showing the bitcoin address where the funds will go to.

This way the user can be sure that the QR code scanner app the user using is reading the correct bitcoin address, preventing funds to be stolen.

Includes fix for HiDPI screens by @jonasschnelli.
2016-06-13 16:09:14 +01:00
Wladimir J. van der Laan
44c1b1c9bb
Merge #8141: Continuing port of java comparison tool
ff2dcf2 Tests: Edit bloated varint test and add option for 'barely expensive' tests (mrbandrews)
12c5a16 Catch exceptions from non-canonical encoding and print only to log (mrbandrews)
291f8aa Continuing port of java comptool (mrbandrews)
8c9e681 Tests: Rework blockstore to avoid re-serialization. (mrbandrews)
2016-06-13 11:37:37 +02:00
Wladimir J. van der Laan
e1486eb95c
Merge #7598: Refactor CreateNewBlock to be a method of the BlockAssembler class
c2dd5a3 FIX: correctly measure size of priority block (Alex Morcos)
a278764 FIX: Account for txs already added to block in addPriorityTxs (Alex Morcos)
4dc94d1 Refactor CreateNewBlock to be a method of the BlockAssembler class (Alex Morcos)
2016-06-13 11:35:55 +02:00
Gregory Maxwell
db0ffe80a0 This eliminates the primary leak that causes the orphan map to
always grow to its maximum size.

This does not go so far as to attempt to connect orphans made
 connectable by a new block.

Keeping the orphan map less full helps improve the reliability
 of relaying chains of transactions.
2016-06-10 20:42:03 +00:00
Pieter Wuille
1b0bcc5f95 Track orphan by prev COutPoint rather than prev hash 2016-06-10 19:51:20 +00:00
instagibbs
657fc19d65 rename mapAddrCount to mapNetGroupNodes 2016-06-10 10:09:06 -04:00
Wladimir J. van der Laan
63151521fd Merge commit '60ab9b200654ef0914459711cf2b22be16be3dc2' 2016-06-10 15:19:51 +02:00
Wladimir J. van der Laan
ac8d0418ed
qt: translations update 2016-06-10 10:12:00 +02:00
Wladimir J. van der Laan
fde0ac403c
Merge #8133: build: Finish up out-of-tree changes
d1a3d57 bulid: fix "make translate" when out-of-tree (Cory Fields)
340012d build: add temporary fix for "bad magic number" error in out-of-tree builds (Cory Fields)
142ffc7 travis: use out-of-tree build (Cory Fields)
92e37a3 build: fix out-of-tree 'make deploy' for osx (Cory Fields)
ab95d5d build: a few ugly hacks to get the rpc tests working out-of-tree (Cory Fields)
fc4ad0c build: more out-of-tree fixups (Cory Fields)
0cb0f26 build: out-of-tree fixups (Cory Fields)
2016-06-10 10:05:57 +02:00
Wladimir J. van der Laan
9201ce8f2f
Merge #8181: build: Get rid of CLIENT_DATE
d096d22 build: Get rid of `CLIENT_DATE` (Wladimir J. van der Laan)
2016-06-10 09:51:34 +02:00
Cory Fields
d1a3d570e5 bulid: fix "make translate" when out-of-tree 2016-06-09 17:49:16 -04:00
Pieter Wuille
7ce9ac5c83
Merge #7292: [RPC] Expose ancestor/descendant information over RPC
176e19b Mention new RPC's in release notes (Suhas Daftuar)
7f6eda8 Add ancestor statistics to mempool entry RPC output (Suhas Daftuar)
a9b8390 Add test coverage for new RPC calls (Suhas Daftuar)
b09b813 Add getmempoolentry RPC call (Suhas Daftuar)
0dfd869 Add getmempooldescendants RPC call (Suhas Daftuar)
8f7b5dc Add getmempoolancestors RPC call (Suhas Daftuar)
5ec0cde Refactor logic for converting mempool entries to JSON (Suhas Daftuar)
2016-06-09 16:32:37 +02:00
Suhas Daftuar
7f6eda8043 Add ancestor statistics to mempool entry RPC output 2016-06-09 09:56:27 -04:00
Suhas Daftuar
b09b8135ae Add getmempoolentry RPC call 2016-06-09 09:56:27 -04:00
Suhas Daftuar
0dfd86956d Add getmempooldescendants RPC call 2016-06-09 09:56:27 -04:00
Wladimir J. van der Laan
d096d22446 build: Get rid of CLIENT_DATE
Putting the build date in the executable is a practice that has no place
in these days, now that deterministic building is increasingly common.

Continues #7732 which did this for the GUI.
2016-06-09 13:34:09 +02:00
Wladimir J. van der Laan
0b5279f89c
Merge #8166: src/test: Do not shadow local variables
c2715d3 Do not shadow local variables (Pavel Janík)
2016-06-09 08:25:25 +02:00
Wladimir J. van der Laan
1445835bd3
Merge #8154: drop vAddrToSend after sending big addr message
d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
2016-06-09 08:13:14 +02:00
Wladimir J. van der Laan
d36618585d
Merge #8168: util: Add ParseUInt32 and ParseUInt64
e012f3c util: Add ParseUInt32 and ParseUInt64 (Wladimir J. van der Laan)
2016-06-09 07:37:07 +02:00
Wladimir J. van der Laan
7e6dd7bee4
Merge #8172: Fix two warnings for comparison between signed and unsigned
77f63a4 Fix two warnings for comparison between signed and unsigned (Pieter Wuille)
2016-06-09 07:29:09 +02:00
Pieter Wuille
4286f43025
Merge #8173: Use SipHash for node eviction (cont'd)
eebc232 test: Add more test vectors for siphash (Wladimir J. van der Laan)
8884830 Use C++11 thread-safe static initializers (Pieter Wuille)
c31b24f Use 64-bit SipHash of netgroups in eviction (Pieter Wuille)
9bf156b Support SipHash with arbitrary byte writes (Pieter Wuille)
053930f Avoid recalculating vchKeyedNetGroup in eviction logic. (Patrick Strateman)
2016-06-08 18:32:34 +02:00
Pieter Wuille
cd0c5135ab
Merge #8083: Add support for dnsseeds with option to filter by servicebits
2d83013d Add support for dnsseeds with option to filter by servicebits (Jonas Schnelli)
2016-06-08 17:42:14 +02:00
Wladimir J. van der Laan
eebc232187 test: Add more test vectors for siphash
Add full test vectors from spec, test per byte and per 8 bytes.

Builds on #8086.
2016-06-08 15:50:55 +02:00
Pieter Wuille
66ed450d77
Merge #7935: Versionbits: GBT support
12c708a getblocktemplate: Use version/force mutation to support pre-BIP9 clients (Luke Dashjr)
9879060 getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not (Luke Dashjr)
72cd6b2 qa/rpc-tests: bip9-softforks: Add tests for getblocktemplate versionbits updates (Luke Dashjr)
d3df40e Implement BIP 9 GBT changes (Luke Dashjr)
2016-06-08 15:44:07 +02:00
Jonas Schnelli
6fa950a573
[RPC] Fix createrawtx sequence number unsigned int parsing 2016-06-08 15:43:28 +02:00
Pieter Wuille
77f63a4fcd Fix two warnings for comparison between signed and unsigned 2016-06-08 15:34:18 +02:00
Wladimir J. van der Laan
75ec320a0d
Merge #8153: [rpc] fundrawtransaction feeRate: Use BTC/kB
fa7f4f5 [rpc] fundrawtransaction feeRate: Use BTC/kB (MarcoFalke)
faf82e8 [rpc] fundrawtransaction: Fix help text and interface (MarcoFalke)
2016-06-08 14:14:54 +02:00
Wladimir J. van der Laan
a7c41f2de0
Merge #8126: std::shared_ptr based CTransaction storage in mempool
288d85d Get rid of CTxMempool::lookup() entirely (Pieter Wuille)
c2a4724 Optimization: use usec in expiration and reuse nNow (Pieter Wuille)
e9b4780 Optimization: don't check the mempool at all if no mempool req ever (Pieter Wuille)
dbfb426 Optimize the relay map to use shared_ptr's (Pieter Wuille)
8d39d7a Switch CTransaction storage in mempool to std::shared_ptr (Pieter Wuille)
1b9e6d3 Add support for unique_ptr and shared_ptr to memusage (Pieter Wuille)
2016-06-08 14:01:18 +02:00
Wladimir J. van der Laan
761cddb690
Merge #7703: tor: Change auth order to only use password auth if -torpassword
2e49448 tor: Change auth order to only use HASHEDPASSWORD if -torpassword (Wladimir J. van der Laan)
2016-06-08 13:09:41 +02:00
Wladimir J. van der Laan
67c91f8c4c
Merge #8065: Addrman offline attempts
6182d10 Do not increment nAttempts by more than one for every Good connection. (Gregory Maxwell)
c769c4a Avoid counting failed connect attempts when probably offline. (Gregory Maxwell)
2016-06-08 13:01:53 +02:00
Wladimir J. van der Laan
2156fa23b8
Merge #8078: Disable the mempool P2P command when bloom filters disabled
3d3602f Add RPC test for the p2p mempool command in conjunction with disabled bloomfilters (Jonas Schnelli)
beceac9 Disable the mempool P2P command when bloom filters disabled (Peter Todd)
2016-06-08 12:56:48 +02:00
Wladimir J. van der Laan
e012f3cea0 util: Add ParseUInt32 and ParseUInt64
Add error and range-checking parsers for unsigned 32 and 64 bit numbers.
The 32-bit variant is required for parsing sequence numbers from the
command line in `bitcoin-tx` (see #8164 for discussion). I've thrown in
the 64-bit variant as a bonus, as I'm sure it will be needed at some
point.

Also adds tests, and updates `developer-notes.md`.
2016-06-08 10:28:51 +02:00
Pavel Janík
c2715d3ab8 Do not shadow local variables 2016-06-07 21:22:48 +02:00
Jonas Schnelli
86efa30ae3
[Bitcoin-Tx] fix missing test fixtures, fix 32bit atoi issue 2016-06-07 21:07:47 +02:00
Wladimir J. van der Laan
79004d4ae6
Merge #7957: [RPC][Bitcoin-TX] Add support for sequence number
ae357d5 [Bitcoin-Tx] Add tests for sequence number support (Jonas Schnelli)
e59336f [bitcoin-tx] allow to set nSequence number over the in= command (Jonas Schnelli)
a946bb6 [RPC] createrawtransaction: add option to set the sequence number per input (Jonas Schnelli)
2016-06-07 18:25:13 +02:00
Jonas Schnelli
ae357d5ab9
[Bitcoin-Tx] Add tests for sequence number support 2016-06-07 17:37:35 +02:00
Pieter Wuille
888483098e Use C++11 thread-safe static initializers 2016-06-07 16:29:03 +02:00
Pieter Wuille
c31b24f745 Use 64-bit SipHash of netgroups in eviction 2016-06-07 16:20:40 +02:00
Pieter Wuille
9bf156bb9e Support SipHash with arbitrary byte writes 2016-06-07 16:20:40 +02:00
Patrick Strateman
053930ffc4 Avoid recalculating vchKeyedNetGroup in eviction logic.
Lazy calculate vchKeyedNetGroup in CNode::GetKeyedNetGroup.
2016-06-07 16:20:40 +02:00
Wladimir J. van der Laan
22e0b35676
Merge #8136: Log/report in 10% steps during VerifyDB
8b78486 Log/report in 10% steps during VerifyDB (Jonas Schnelli)
2016-06-07 15:25:41 +02:00
Wladimir J. van der Laan
9b6a48c2e9
Merge #8118: Reduce unnecessary hashing in signrawtransaction
bd0f413 Reduce unnecessary hashing in signrawtransaction (Jonas Nick)
2016-06-07 14:34:31 +02:00
Pieter Wuille
288d85ddf2 Get rid of CTxMempool::lookup() entirely 2016-06-07 13:44:56 +02:00
MarcoFalke
fa7f4f577c [rpc] fundrawtransaction feeRate: Use BTC/kB
Also introduce UniValueType

UniValueType is a wrapper for UniValue::VType which allows setting
a typeAny flag. This flag indicates the type does not matter.

(Used by RPCTypeCheckObj)
2016-06-07 13:12:57 +02:00
Jonas Schnelli
8b78486d02
Log/report in 10% steps during VerifyDB 2016-06-07 11:04:01 +02:00
MarcoFalke
fa51a1d2b7 [init] Make feefilter option debug option 2016-06-07 08:47:43 +02:00
Kaz Wesley
d3d02d5145 drop vAddrToSend after sending big addr message
We send a newly-accepted peer a 1000-entry addr message, and then only use
vAddrToSend for small messages. Deallocate vAddrToSend after it's been used for
the big message to save about 40 kB per connected inbound peer.
2016-06-06 15:57:40 -07:00
MarcoFalke
faf82e8fc8 [rpc] fundrawtransaction: Fix help text and interface 2016-06-06 19:40:35 +02:00
Luke Dashjr
12c708a4b3 getblocktemplate: Use version/force mutation to support pre-BIP9 clients 2016-06-06 17:10:23 +00:00
Luke Dashjr
98790608a4 getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not 2016-06-06 17:10:23 +00:00
Luke Dashjr
d3df40e51a Implement BIP 9 GBT changes
- BIP9DeploymentInfo struct for static deployment info
- VersionBitsDeploymentInfo: Avoid C++11ism by commenting parameter names
- getblocktemplate: Make sure to set deployments in the version if it is LOCKED_IN
- In this commit, all rules are considered required for clients to support
2016-06-06 17:10:22 +00:00
Wladimir J. van der Laan
52c3f348be
Merge #8142: Improve CWallet API with new GetAccountPubkey function.
152ab23 Improve CWallet API  with new GetAccountPubkey function. (Patrick Strateman)
2016-06-06 16:28:41 +02:00
Patrick Strateman
152ab236ea Improve CWallet API with new GetAccountPubkey function.
Remove one more caller that is passing CWalletDB.
2016-06-06 07:02:05 -07:00
Wladimir J. van der Laan
6b781df74f
Merge #8007: Minor locking improvements
f0fdda0 IsInitialBlockDownload: usually avoid locking (Kaz Wesley)
2016-06-06 15:45:40 +02:00
Wladimir J. van der Laan
243ac0c75b
Merge #8137: Improve CWallet API with new AccountMove function.
9dfaa1c Improve CWallet API with new AccountMove function. (Patrick Strateman)
2016-06-06 14:59:10 +02:00
Wladimir J. van der Laan
2e494489c3 tor: Change auth order to only use HASHEDPASSWORD if -torpassword
Change authentication order to make it more clear (see #7700).

- If the `-torpassword` option is provided, force use of
  `HASHEDPASSWORD` auth.

- Give error message if `-torpassword` provided, but
  `HASHEDPASSWORD` auth is not available.

- Give error message if only `HASHEDPASSWORD` available, but
  `-torpassword` not given.
2016-06-06 10:38:54 +02:00
Wladimir J. van der Laan
e6b141acf9
qt: translation strings update 2016-06-06 10:34:15 +02:00
Pieter Wuille
c2a4724642 Optimization: use usec in expiration and reuse nNow 2016-06-06 02:02:24 +02:00
Pieter Wuille
e9b4780b29 Optimization: don't check the mempool at all if no mempool req ever 2016-06-06 02:02:23 +02:00
Pieter Wuille
dbfb426b96 Optimize the relay map to use shared_ptr's
* Switch mapRelay to use shared_ptr<CTransaction>
* Switch the relay code to copy mempool shared_ptr's, rather than copying
  the transaction itself.
* Change vRelayExpiration to store mapRelay iterators rather than hashes
  (smaller and faster).
2016-06-06 02:00:23 +02:00
Kaz Wesley
f0fdda0181 IsInitialBlockDownload: usually avoid locking
Optimistically test the latch bool before taking the lock.
For all IsInitialBlockDownload calls after the first to return false,
this avoids the need to lock cs_main.
2016-06-04 22:18:59 -07:00
Pieter Wuille
8d39d7a2cf Switch CTransaction storage in mempool to std::shared_ptr 2016-06-05 00:31:43 +02:00
Pieter Wuille
1b9e6d3c1a Add support for unique_ptr and shared_ptr to memusage 2016-06-05 00:31:35 +02:00
Cory Fields
340012d9c9 build: add temporary fix for "bad magic number" error in out-of-tree builds
This was caused by an pyc files hanging around from previous
python2 invocations, when the matching .py missing from that path.

This should not be a problem with python3's tagged caches.
2016-06-03 14:48:21 -04:00
instagibbs
e39dc698ad comment nit: miners don't vote 2016-06-03 10:07:14 -04:00
Wladimir J. van der Laan
8c1e49ba13
Merge #7967: [RPC] add feerate option to fundrawtransaction
04eaa90 Add more clear interface for CoinControl.h regarding individual feerate (Jonas Schnelli)
3b35e48 [RPC] add feerate option to fundrawtransaction (Jonas Schnelli)
2016-06-03 15:47:48 +02:00
Wladimir J. van der Laan
c141c14c9f
Merge #7942: locking for Misbehave() and other cs_main locking fixes
719de56 lock cs_main for chainActive (Kaz Wesley)
efb54ba lock cs_main for State/Misbehaving (Kaz Wesley)
2016-06-03 15:29:28 +02:00
Pieter Wuille
a82f03393a
Merge #7997: replace mapNextTx with slimmer setSpends
9805f4a mapNextTx: use pointer as key, simplify value (Kaz Wesley)
2016-06-03 01:26:50 +02:00
Pieter Wuille
f972b04d63
Merge #7825: Prevent multiple calls to ExtractDestination
0bf6f30 Prevent multiple calls to ExtractDestination (Pedro Branco)
2016-06-03 00:45:22 +02:00
Kaz Wesley
9805f4af7e mapNextTx: use pointer as key, simplify value
Saves about 10% of application memory usage once the mempool warms up. Since the
mempool is DynamicUsage-regulated, this will translate to a larger mempool in
the same amount of space.

Map value type: eliminate the vin index; no users of the map need to know which
input of the transaction is spending the prevout.

Map key type: replace the COutPoint with a pointer to a COutPoint. A COutPoint
is 36 bytes, but each COutPoint is accessible from the same map entry's value.
A trivial DereferencingComparator functor allows indirect map keys, but the
resulting syntax is misleading: `map.find(&outpoint)`. Implement an indirectmap
that acts as a wrapper to a map that uses a DereferencingComparator, supporting
a syntax that accurately reflect the container's semantics: inserts and
iterators use pointers since they store pointers and need them to remain
constant and dereferenceable, but lookup functions take const references.
2016-06-02 12:31:51 -07:00
mrbandrews
12c5a16c4e Catch exceptions from non-canonical encoding and print only to log 2016-06-02 14:43:18 -04:00