Commit graph

5929 commits

Author SHA1 Message Date
Jonas Schnelli
51c7c7029e [QT] remove frame to avoid double-frame situation in sendcoinsentry.ui 2015-05-12 20:46:10 +02:00
Alex Morcos
14d4eef799 Fix removing of orphan transactions
We don't want to erase orphans that still have missing inputs, they should still be tracked as orphans.  Also, the transaction thats being accepted can't be an orphan otherwise it would have previously been accepted, so doesn't need to be added to the erase queue.
2015-05-12 12:02:38 -04:00
Wladimir J. van der Laan
484821870b
Merge pull request #6123
bba7c24 Avoid crash on start in TestBlockValidity with gen=1. (Gregory Maxwell)
2015-05-12 16:37:19 +02:00
Wladimir J. van der Laan
40de49c358
Merge pull request #5932
107d35b [Qt] add defaultConfirmTarget constant to sendcoinsdialog (Philip Kaufmann)
2015-05-12 14:38:00 +02:00
Gregory Maxwell
bba7c24929 Avoid crash on start in TestBlockValidity with gen=1.
When the internal miner is enabled at the start of a new node, there
 is an near instant assert in TestBlockValidity because its attempting
 to mine a block before the top checkpoint.

Also avoids a data race around vNodes.
2015-05-12 14:07:43 +02:00
Pieter Wuille
67708acff9 Write block index more frequently than cache flushes 2015-05-11 17:58:14 -07:00
Pieter Wuille
b3ed4236be Cache tweak and logging improvements 2015-05-11 17:58:14 -07:00
Pieter Wuille
fc684ad8af Use accurate memory for flushing decisions 2015-05-11 17:57:27 -07:00
Pieter Wuille
046392dc1d Keep track of memory usage in CCoinsViewCache 2015-05-11 17:56:48 -07:00
Pieter Wuille
540629c6fb Add memusage.h 2015-05-11 17:56:48 -07:00
Wladimir J. van der Laan
7e0e7f823f
Merge pull request #6058
03c5687 appropriate response when trying to get a block in pruned mode (Jonas Schnelli)
1b2e555 add autoprune information to RPC "getblockchaininfo" (Jonas Schnelli)
2015-05-11 16:40:58 +02:00
Jonas Schnelli
03c56872b5 appropriate response when trying to get a block in pruned mode 2015-05-11 16:10:08 +02:00
Wladimir J. van der Laan
23254131a3
Merge pull request #6093
3da7849 [squashme] simplify SetupEnvironment() (by dexX7) (Jonas Schnelli)
b3ffcdf don't imbue boost::filesystem::path with locale "C" on windows (Jonas Schnelli)
2015-05-10 14:22:53 +02:00
Jonas Schnelli
3da7849007 [squashme] simplify SetupEnvironment() (by dexX7) 2015-05-10 10:06:41 +02:00
Peter Todd
48e9c57cf0 Move LOCKTIME_THRESHOLD to src/script/script.h
Will now be needed by CHECKLOCKTIMEVERIFY code.
2015-05-09 04:33:49 -04:00
Peter Todd
99088d60d8 Make CScriptNum() take nMaxNumSize as an argument
While the existing numeric opcodes are all limited to 4-byte bignum
arguments, new opcodes will need different limits.
2015-05-09 04:29:47 -04:00
Jonas Schnelli
a1d0ec44d7 re-add -reindex help message
was suddenly removed with fc44231cb7 (probably not by purpose)
2015-05-08 19:59:01 +02:00
Wladimir J. van der Laan
fec5c0ea05
Merge pull request #6112
1c54757 Add more script edge condition tests. (Dave Collins)
2015-05-07 18:07:50 +02:00
Wladimir J. van der Laan
6a877e870e
Merge pull request #6034
a574899 chaincodes: abstract away more chaincode behavior [squashme] replace struct CCainCode with a typedef uint256 ChainCode (Cory Fields)
8cf1485 Abstract chaincodes into CChainCode (Pieter Wuille)
2015-05-06 18:37:49 +02:00
Cory Fields
a574899671 chaincodes: abstract away more chaincode behavior
[squashme] replace struct CCainCode with a typedef uint256 ChainCode
2015-05-06 17:22:46 +02:00
Dave Collins
1c54757f86 Add more script edge condition tests.
This commit adds some tests to the script_valid.json and tx_invalid.json
data which exercise more edge conditions that are not currently being
tested.
2015-05-06 10:20:18 -05:00
Wladimir J. van der Laan
1fd2d39529
Merge pull request #5420
6b4feb8 [QA] rest.py RPC test: change setgenerate() to generate() (Jonas Schnelli)
97ee866 [REST] getutxos REST command (based on Bip64) (Jonas Schnelli)
2015-05-06 16:50:05 +02:00
Jonas Schnelli
2a6b844427 [QT] change transaction amount and height in overview page 2015-05-06 16:47:29 +02:00
Jorge Timón
51aa24927e Chainparams: Refactor: Decouple IsSuperMajority from Params() 2015-05-06 16:39:15 +02:00
Wladimir J. van der Laan
12f3488253
Merge pull request #6047
a56054b Update key.cpp to use new libsecp256k1 (Pieter Wuille)
a591d98 Squashed 'src/secp256k1/' changes from 1897b8e..22f60a6 (Pieter Wuille)
2015-05-06 12:29:07 +02:00
Wladimir J. van der Laan
00820f921d
Merge pull request #6055
a8cdaf5 checkpoints: move the checkpoints enable boolean into main (Cory Fields)
11982d3 checkpoints: Decouple checkpoints from Params (Cory Fields)
6996823 checkpoints: make checkpoints a member of CChainParams (Cory Fields)
9f13a10 checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer (Cory Fields)
2015-05-06 11:38:39 +02:00
Wladimir J. van der Laan
40f5e8dc2a
Merge pull request #5937
a71ab10 QA: add RPC tests for error reporting of "signrawtransaction" (dexX7)
8ac2a4e RPC: show script verification errors in "signrawtransaction" result (dexX7)
2015-05-05 19:04:53 +02:00
Wladimir J. van der Laan
31c0bf1c46
Merge pull request #6080
1a0259f add jonasschnellis dns seeder (Jonas Schnelli)
2015-05-05 18:56:48 +02:00
dexX7
8ac2a4e178
RPC: show script verification errors in "signrawtransaction" result
If there are any script verification errors, when using "signrawtransaction", they are shown in the RPC result:

```
// ...

Result:
{
  "hex" : "value",           (string) The hex-encoded raw transaction with signature(s)
  "complete" : true|false,   (boolean) If the transaction has a complete set of signatures
  "errors" : [                 (json array of objects) Script verification errors (if there are any)
    {
      "txid" : "hash",           (string) The hash of the referenced, previous transaction
      "vout" : n,                (numeric) The index of the output to spent and used as input
      "scriptSig" : "hex",       (string) The hex-encoded signature script
      "sequence" : n,            (numeric) Script sequence number
      "error" : "text"           (string) Verification or signing error related to the input
    }
    ,...
  ]
}
```
2015-05-05 09:40:55 +02:00
Wladimir J. van der Laan
12f78ed4f9
qt: update translations from Transifex - first run for 0.11 2015-05-05 08:48:54 +02:00
Wladimir J. van der Laan
fc44231cb7
trivial: Merge pruning help message after Transifex comment
The prune help message was broken in nonsensical parts. Merge it into
one, this is easier for translators.

Reported by yahoe.001 on transifex.
2015-05-04 18:48:38 +02:00
Wladimir J. van der Laan
04140457f4 Show an init message while activating best chain
Connecting the chain can take quite a while.
All the while it is still showing `Loading wallet...`.
Add an init message to inform the user what is happening.
2015-05-04 17:39:19 +02:00
Pieter Wuille
a56054be65 Update key.cpp to use new libsecp256k1
libsecp256k1's API changed, so update key.cpp to use it.

Libsecp256k1 now has explicit context objects, which makes it completely thread-safe.
In turn, keep an explicit context object in key.cpp, which is explicitly initialized
destroyed. This is not really pretty now, but it's more efficient than the static
initialized object in key.cpp (which made for example bitcoin-tx slow, as for most of
its calls, libsecp256k1 wasn't actually needed).

This also brings in the new blinding support in libsecp256k1. By passing in a random
seed, temporary variables during the elliptic curve computations are altered, in such
a way that if an attacker does not know the blind, observing the internal operations
leaks less information about the keys used. This was implemented by Greg Maxwell.
2015-05-04 14:45:34 +02:00
Wladimir J. van der Laan
16341cc15c
Merge pull request #5418
bba2216 RPC test for "#5418 Report missing inputs in sendrawtransaction" (Jonas Schnelli)
de8e801 Report missing inputs in sendrawtransaction (Pieter Wuille)
2015-05-04 12:42:26 +02:00
Wladimir J. van der Laan
59305cebee
qt: fix numerusform in English translation
Ref: transifex issue https://www.transifex.com/projects/p/bitcoin/translate/#da/qt-translation-011x/c/47723791
2015-05-04 12:25:22 +02:00
Wladimir J. van der Laan
7f5d7e9d6d
Merge pull request #6086
d3c09ba Trivial: useless cast (ptime)(I'm ptime) (svost)
2015-05-04 09:30:04 +02:00
Wladimir J. van der Laan
20b3dc85ed
qt: English translation update before enabling translation for 0.11 2015-05-04 08:09:37 +02:00
Wladimir J. van der Laan
00e76db8c2
Merge pull request #6085
b05a89b Non-grammatical language improvements (Luke Dashjr)
7e6d23b Bugfix: Grammar fixes (Corinne Dashjr)
2015-05-04 08:01:58 +02:00
Luke Dashjr
b05a89b2de Non-grammatical language improvements 2015-05-02 15:23:59 +00:00
Pieter Wuille
8cf1485f3b Abstract chaincodes into CChainCode
# Conflicts:
#	src/key.cpp
#	src/key.h
2015-05-02 11:17:16 +02:00
Jonas Schnelli
b3ffcdf916 don't imbue boost::filesystem::path with locale "C" on windows
fixes https://github.com/bitcoin/bitcoin/issues/6078
2015-05-01 13:32:25 +02:00
Corinne Dashjr
7e6d23b171 Bugfix: Grammar fixes 2015-05-01 11:21:27 +00:00
Cory Fields
a8cdaf5c96 checkpoints: move the checkpoints enable boolean into main
This pertains to app-state, so it doesn't make sense to handle inside the
checkpoint functions.
2015-04-30 23:14:48 -04:00
Cory Fields
11982d366d checkpoints: Decouple checkpoints from Params
Pass checkpoint data in as necessary
2015-04-30 23:14:48 -04:00
Cory Fields
699682304f checkpoints: make checkpoints a member of CChainParams
This drops the virtual call and simplifies the logic
2015-04-30 23:14:48 -04:00
Cory Fields
9f13a10548 checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer 2015-04-30 23:14:08 -04:00
svost
d3c09ba67e Trivial: useless cast (ptime)(I'm ptime) 2015-04-30 23:11:52 +03:00
Pieter Wuille
f46a680f42 Better mruset unit test 2015-04-30 08:16:30 -07:00
Pieter Wuille
d4d5022cfc Use ring buffer of set iterators instead of deque of copies in mruset 2015-04-30 08:16:30 -07:00
Gavin Andresen
d81cff32e5 Replace mruset setAddrKnown with CRollingBloomFilter addrKnown
Use a probabilistic bloom filter to keep track of which addresses
we think we have given our peers, instead of a list.

This uses much less memory, at the cost of sometimes failing to
relay an address to a peer-- worst case if the bloom filter happens
to be as full as it gets, 1-in-1,000.

Measured memory usage of a full mruset setAddrKnown: 650Kbytes
Constant memory usage of CRollingBloomFilter addrKnown: 37Kbytes.

This will also help heap fragmentation, because the 37K of storage
is allocated when a CNode is created (when a connection to a peer
is established) and then there is no per-item-remembered memory
allocation.

I plan on testing by restarting a full node with an empty peers.dat,
running a while with -debug=addrman and -debug=net, and making sure
that the 'addr' message traffic out is reasonable.
(suggestions for better tests welcome)
2015-04-30 08:16:20 -07:00
Gavin Andresen
69a5f8be0a Rolling bloom filter class
For when you need to keep track of the last N items
you've seen, and can tolerate some false-positives.

Rebased-by: Pieter Wuille <pieter.wuille@gmail.com>
2015-04-30 07:58:29 -07:00
Wladimir J. van der Laan
8a10000222
Merge pull request #6022
b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
2015-04-30 16:37:18 +02:00
Wladimir J. van der Laan
f026ab606d
Merge pull request #6059
739d615 chainparams: use SeedSpec6's rather than CAddress's for fixed seeds (Cory Fields)
2015-04-30 14:57:04 +02:00
Wladimir J. van der Laan
9c25397619
Merge pull request #6081
7f386d2 DragonFlyBSD thread renaming. (sinetek)
2015-04-29 19:08:33 +02:00
Jonas Schnelli
1a0259f7f0 add jonasschnellis dns seeder 2015-04-29 16:42:41 +02:00
Wladimir J. van der Laan
df1609f314
Merge pull request #6075
9fadf1c Add additional script edge condition tests. (Dave Collins)
2015-04-29 15:56:30 +02:00
sinetek
7f386d2ff2 DragonFlyBSD thread renaming. 2015-04-29 20:04:34 +07:00
Wladimir J. van der Laan
23c998d811
Merge pull request #5511
e9c3215 [Wallet] sort pending wallet transactions before reaccepting (dexX7)
2015-04-29 09:52:39 +02:00
Wladimir J. van der Laan
948beaf190
Merge pull request #6074
d8f4cc3 Correct the PUSHDATA4 minimal encoding test. (Dave Collins)
2015-04-29 09:04:29 +02:00
Cory Fields
8b08d9530b wallet: fix boost::get usage with boost 1.58 2015-04-28 11:45:10 -04:00
Pieter Wuille
7bf5d5efa6
Merge pull request #5918
f7303f9 Use equivalent PoW for non-main-chain requests (Pieter Wuille)
2015-04-28 07:46:27 -07:00
Pieter Wuille
de8e801d3f Report missing inputs in sendrawtransaction 2015-04-28 07:16:39 -07:00
Philip Kaufmann
107d35b700 [Qt] add defaultConfirmTarget constant to sendcoinsdialog
- replaces some hard-coded values for the default confirmation target
- also simplify code that is using the new constant
2015-04-28 14:49:46 +02:00
Philip Kaufmann
d1af89e655 use const reference as param in ConnectThroughProxy/Socks5
- also ensure code style conformance by replacing bool static with static bool
2015-04-28 14:44:56 +02:00
Wladimir J. van der Laan
18d2832678
Merge pull request #5971
351593b replace absolute sleep with conditional wait (pstratem)
2015-04-28 10:41:46 +02:00
Wladimir J. van der Laan
5048465fc5
Merge pull request #5662
00dcaf4 Change download logic to allow calling getheaders/getdata on inbound peers (Suhas Daftuar)
2015-04-28 10:17:04 +02:00
Wladimir J. van der Laan
6364408122
Merge pull request #5199
1ec900a Remove broken+useless lock/unlock log prints (Matt Corallo)
352ed22 Add merkle blocks test (Matt Corallo)
59ed61b Add RPC call to generate and verify merkle blocks (Matt Corallo)
30da90d Add CMerkleBlock constructor for tx set + block and an empty one (Matt Corallo)
2015-04-28 10:07:25 +02:00
Wladimir J. van der Laan
f9645ba80a
qt: translation update 2015-04-28 09:47:26 +02:00
Dave Collins
9fadf1c874 Add additional script edge condition tests.
This commit adds several tests to the script_invalid.json data which
exercise some edge conditions that are not currently being tested.

These are mainly being added to cover several cases a branch coverage
analysis of btcd showed are not already being covered, but given more
tests of edge conditions are always a good thing, I'm contributing
them upstream.
2015-04-28 02:35:43 -05:00
Dave Collins
d8f4cc328e Correct the PUSHDATA4 minimal encoding test.
The test which is intended to prove that the script engine is properly
rejecting non-minimally encoded PUSHDATA4 data is using the wrong
opcode and value.  The test is using 0x4f, which is OP_1NEGATE instead
of the desired 0x4e, which is OP_PUSHDATA4.  Further, the push of data
is intended to be 256 bytes, but the value the test is using is
0x00100000 (4096), instead of the desired 0x00010000 (256).

This commit fixes both issues.

This was found while examining the branch coverage in btcd against only
these tests to help find missing branch coverage.
2015-04-27 21:47:55 -05:00
pstratem
351593b9c8 replace absolute sleep with conditional wait 2015-04-27 11:48:31 -07:00
Jonas Schnelli
1b2e555593 add autoprune information to RPC "getblockchaininfo" 2015-04-26 23:23:09 +02:00
Wladimir J. van der Laan
1d9d314573
Merge pull request #5696
691161d Consensus: Create consensus/consensus.h with some constants (jtimon)
2015-04-26 14:42:09 +02:00
sinetek
ff7fe8b19e Fix for correctly including climits on certain platforms {DragonFlyBSD}. 2015-04-25 22:07:32 +07:00
Cory Fields
739d6155d3 chainparams: use SeedSpec6's rather than CAddress's for fixed seeds
This negates the need for CAddress here at all
2015-04-24 14:32:39 -04:00
Wladimir J. van der Laan
1623f6e337
Merge pull request #6033
cd558b4 FreeBSD, OpenBSD thread renaming. (sinetek)
2015-04-24 16:36:00 +02:00
Wladimir J. van der Laan
b9311fb631
Merge pull request #6028
1d5b47a nLastTry is only used for addrman entries (Pieter Wuille)
2015-04-24 16:11:23 +02:00
Wladimir J. van der Laan
585b5dba74
Merge pull request #6036
f89b092 add rpc test for listunspents support for zero value txouts (Jonas Schnelli)
219953c Show zero value txouts in listunspent. (Gregory Maxwell)
2015-04-24 14:57:43 +02:00
Matt Corallo
1ec900a29e Remove broken+useless lock/unlock log prints 2015-04-24 02:28:47 -07:00
Wladimir J. van der Laan
c2713042a3
Merge pull request #5863
f9ec3f0 Add block pruning functionality (mrbandrews)
2015-04-24 10:36:48 +02:00
Matt Corallo
59ed61b389 Add RPC call to generate and verify merkle blocks 2015-04-23 17:50:39 -07:00
Matt Corallo
30da90de8d Add CMerkleBlock constructor for tx set + block and an empty one 2015-04-23 17:50:39 -07:00
Wladimir J. van der Laan
734f80a5d1
Merge pull request #6039
27ce808 tests: Error when setgenerate is used on regtest (Wladimir J. van der Laan)
2015-04-23 18:03:51 +02:00
Jonas Schnelli
26414ca4fc fix and enable bip32 unit test
the bip32 unit test was not included in the make process
2015-04-23 13:21:05 +02:00
Pieter Wuille
4dda253190 Update libsecp256k1 2015-04-22 14:03:10 -07:00
Pieter Wuille
a591d98c32 Squashed 'src/secp256k1/' changes from 1897b8e..22f60a6
22f60a6 Merge pull request #245
61c1b1e Merge pull request #190
d227579 Add scalar blinding and a secp256k1_context_randomize() call.
c146b4a Add bench_internal to gitignore.
9c4fb23 Add a secp256k1_fe_cmov unit test.
426fa52 Merge pull request #243
d505a89 Merge pull request #244
2d2707a travis: test i686 builds with gmp
cf7f702 travis: update to new build infrastructure
bb0ea50 Replace set/add with cmov in secp256k1_gej_add_ge.
f3d3519 Merge pull request #241
5c2a4fa Fix memory leak in context unit test
14aacdc Merge pull request #239
93226a5 secp256k1.c: Add missing DEBUG_CHECKs for sufficiently capable contexts
6099220 Merge pull request #237
6066bb6 Fix typo: avg -> max
9688030 Merge pull request #236
d899b5b Expose ability to deep-copy a context
3608c7f Merge pull request #208
a9b6595 [API BREAK] Introduce explicit contexts
a0d3b89 Merge pull request #233
9e8d89b Merge pull request #234
65e70e7 Merge pull request #235
5098f62 Improve documentation formatting consistency
4450e24 Add a comment about the avoidance of secret data in array indexes.
6534ee1 initialize variable
d5b53aa Merge pull request #232
c01df1a Avoid some implicit type conversions to make C++ compilers happy.
bfe96ba Merge pull request #231
33270bf Add a couple comments pointing to particular sections of RFC6979.
41603aa Merge pull request #230
2632019 Brace all the if/for/while.

git-subtree-dir: src/secp256k1
git-subtree-split: 22f60a62801a8a49ecd049e7a563f69a41affd8d
2015-04-22 14:03:10 -07:00
mrbandrews
f9ec3f0fad Add block pruning functionality
This adds a -prune=N option to bitcoind, which if set to N>0 will enable block
file pruning. When pruning is enabled, block and undo files will be deleted to
try to keep total space used by those files to below the prune target (N, in
MB) specified by the user, subject to some constraints:

- The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
- N must be at least 550MB (chosen as a value for the target that could
  reasonably be met, with some assumptions about block sizes, orphan rates,
  etc; see comment in main.h),
- No blocks are pruned until chainActive is at least 100,000 blocks long (on
  mainnet; defined separately for mainnet, testnet, and regtest in chainparams
  as nPruneAfterHeight).

This unsets NODE_NETWORK if pruning is enabled.

Also included is an RPC test for pruning (pruning.py).

Thanks to @rdponticelli for earlier work on this feature; this is based in
part off that work.
2015-04-22 15:53:48 -04:00
Pieter Wuille
f7303f9793 Use equivalent PoW for non-main-chain requests 2015-04-22 03:53:25 -07:00
Jonas Schnelli
97ee866549 [REST] getutxos REST command (based on Bip64)
has parts of @mhearn #4351
* allows querying the utxos over REST
* same binary input and outputs as mentioned in Bip64
* input format = output format
* various rpc/rest regtests
2015-04-21 20:26:49 +02:00
Wladimir J. van der Laan
27ce808fb5 tests: Error when setgenerate is used on regtest
Ever since #5957 there has been the problem that older RPC test cases
(as can be found plenty in open pulls) use setgenerate() on regtest,
assuming a different interpretation of the arguments. Directly
generating a number of blocks has been split off into a new method
`generate` - however using `setgenerate` with the previous arguments will
result in spawning an unreasonable number of threads, and well, simply
not work as expected without clear indication of the error.

Add an error to point the user at the right method.
2015-04-21 10:14:06 +02:00
sinetek
cd558b421c FreeBSD, OpenBSD thread renaming. 2015-04-21 03:13:07 +07:00
jtimon
691161d419 Consensus: Create consensus/consensus.h with some constants 2015-04-20 21:27:51 +02:00
Gregory Maxwell
219953ce50 Show zero value txouts in listunspent.
It's reasonable that automatic coin selection will not pick a zero
 value txout, but they're actually  spendable; and you should know
 if you have them. Listing also makes them available to tools like
 dust-b-gone.
2015-04-20 10:13:18 -07:00
Wladimir J. van der Laan
b6ea3bcede
Merge pull request #5911
6be3562 rpc-tests: Add proxy test (Wladimir J. van der Laan)
67a7949 privacy: Stream isolation for Tor (Wladimir J. van der Laan)
2015-04-20 16:37:38 +02:00
Wladimir J. van der Laan
71900b4426
Merge pull request #6029
a784f90 Cap nAttempts penalty at 8 and switch to pow instead of a division loop. (Gregory Maxwell)
2015-04-20 13:59:50 +02:00
Wladimir J. van der Laan
2bc6332df8
Merge pull request #6010
c1ecee8 Set nSequenceId when a block is fully linked (Suhas Daftuar)
2015-04-20 13:47:14 +02:00
Philip Kaufmann
c6de7c35bc trivial string change in wallet.cpp (the -> that) 2015-04-20 13:29:23 +02:00
Michael Ford
1e3473d384 Add operator names to DNS Seed list 2015-04-20 13:29:23 +02:00
Philip Kaufmann
a21df62069 ensure consistent header comment naming conventions
- BITCOIN_FOLDER_SUBFOLDER_FILENAME_H
2015-04-20 13:29:22 +02:00
Wladimir J. van der Laan
9e16cb108e Make 'Default: %u' spacing consistent in help message
Comment by pryds on Transifex.
2015-04-20 13:29:22 +02:00
Philip Kaufmann
6cb37a3ba0 [Qt, Trivial] remove two unneeded includes of wallet/db.h 2015-04-20 13:29:22 +02:00
Philip Kaufmann
68f795e8b2 [Qt, Trivial] fix header groupings + space, intdentation fixes 2015-04-20 13:29:22 +02:00
Philip Kaufmann
985ec17eee [Qt, Trivial] misc minor string changes
- write "Bitcoins" uppercase
- replace secure/insecure for payment requests with
  authenticated/unauthenticated
- change a translatable string for payment request expiry to match another
  existing string to only get ONE resulting string to translate
2015-04-20 13:29:22 +02:00
Philip Kaufmann
71ad6bd38b [Trivial] format sync.h 2015-04-20 13:29:21 +02:00
Michael Ford
447d37e7d3 Use https link to bitcoin.org in Doxygen intro 2015-04-20 13:29:21 +02:00
Michael Ford
c069234665 Fix typo in init.cpp interpration/interpretation 2015-04-20 13:29:21 +02:00
Nicolas Benoit
52070c87fd Removed '()' where used without contents inside
This additional patch removes '()' from current function name in LogPrintf output.
2015-04-20 13:29:21 +02:00
Nicolas Benoit
30c1db1c61 Replaced current function names with __func__ in LogPrintf() calls. 2015-04-20 13:29:21 +02:00
charlescharles
0b2f93091f Fix docs for 'complete' field in 'signrawtransaction' response 2015-04-20 13:29:20 +02:00
Philip Kaufmann
60c146938e [Qt] header group cleanup
- seperate core from GUI headers where this was missing
- remove an unneeded new-line
2015-04-20 13:29:20 +02:00
Wladimir J. van der Laan
4a884aedcd
Merge pull request #6020
30c43d9 miner.h: fix clang warning because of class/struct mix (Jonas Schnelli)
2015-04-20 12:32:13 +02:00
Gregory Maxwell
a784f90c98 Cap nAttempts penalty at 8 and switch to pow instead of a division loop.
On hosts that had spent some time with a failed internet connection their
 nAttempts penalty was going through the roof (e.g. thousands for all peers)
 and as a result the connect search was pegging the CPU and failing to get
 more than a 4 connections after days of running (because it was taking so
 long per try).
2015-04-19 11:47:56 -07:00
Pieter Wuille
1d5b47a903 nLastTry is only used for addrman entries
No need to define it for every CAddress, as it's memory only anyway.
2015-04-19 11:10:23 -07:00
Wladimir J. van der Laan
67a7949397 privacy: Stream isolation for Tor
According to Tor's extensions to the SOCKS protocol
(https://gitweb.torproject.org/torspec.git/tree/socks-extensions.txt)
it is possible to perform stream isolation by providing authentication
to the proxy. Each set of credentials will create a new circuit,
which makes it harder to correlate connections.

This patch adds an option, `-proxyrandomize` (on by default) that randomizes
credentials for every outgoing connection, thus creating a new circuit.

    2015-03-16 15:29:59 SOCKS5 Sending proxy authentication 3842137544:3256031132
2015-04-17 13:26:47 +02:00
Jorge Timón
b74dcb3b4a Separate CTranslationInterface from CClientUIInterface 2015-04-16 19:58:48 +02:00
Wladimir J. van der Laan
8f955b9661
Merge pull request #6012
0421c18 Fix CheckBlockIndex for reindex. (mrbandrews)
2015-04-16 10:33:29 +02:00
Jonas Schnelli
30c43d9821 miner.h: fix clang warning because of class/struct mix
- class 'Params' was previously declared as a struct
2015-04-16 10:32:47 +02:00
Wladimir J. van der Laan
bc8535b717
Merge pull request #5467
6171e49 [Qt] Use identical strings for expired payment request message (Philip Kaufmann)
06087bd [Qt] minor comment updates in PaymentServer (Philip Kaufmann)
35d1595 [Qt] constify first parameter of processPaymentRequest() (Philip Kaufmann)
9b14aef [Qt] take care of a missing typecast in PaymentRequestPlus::getMerchant() (Philip Kaufmann)
d19ae3c [Qt] remove unused PaymentRequestPlus::getPKIType function (Philip Kaufmann)
6e17a74 [Qt] paymentserver: better logging of invalid certs (Philip Kaufmann)
5a53d7c [Qt] paymentserver: do not log NULL certificates (Philip Kaufmann)
2015-04-15 16:14:20 +02:00
Suhas Daftuar
8ba7f842e5 Reduce download timeouts as blocks arrive
Compare the block download timeout to what the timeout would be if calculated
based on current time and current value of nQueuedValidatedHeaders, but
ignoring other in-flight blocks from the same peer. If the calculation based on
present conditions is shorter, then set that to be the time after which we
disconnect the peer for not delivering this block.
2015-04-15 09:28:00 -04:00
Philip Kaufmann
6171e494fc [Qt] Use identical strings for expired payment request message
- used in sendcoinsdialog.cpp and paymentserver.cpp
- removes an unneded translation string
2015-04-15 14:31:52 +02:00
Philip Kaufmann
06087bda87 [Qt] minor comment updates in PaymentServer 2015-04-15 14:31:51 +02:00
Philip Kaufmann
35d15959b0 [Qt] constify first parameter of processPaymentRequest() 2015-04-15 14:31:50 +02:00
Philip Kaufmann
9b14aefee3 [Qt] take care of a missing typecast in PaymentRequestPlus::getMerchant() 2015-04-15 14:31:50 +02:00
Philip Kaufmann
d19ae3cf66 [Qt] remove unused PaymentRequestPlus::getPKIType function 2015-04-15 14:31:49 +02:00
Philip Kaufmann
6e17a74766 [Qt] paymentserver: better logging of invalid certs
Before and after was tested in Windows:

before:
GUI: ReportInvalidCertificate : Payment server found
an invalid certificate:  ("Microsoft Authenticode(tm) Root Authority")
GUI: ReportInvalidCertificate : Payment server found
an invalid certificate:  ()
GUI: ReportInvalidCertificate : Payment server found
an invalid certificate:  ()
GUI: ReportInvalidCertificate : Payment server found
an invalid certificate:  ()

after:
GUI: ReportInvalidCertificate: Payment server found an
invalid certificate:  "01" ("Microsoft Authenticode(tm) Root Authority")
() ()
GUI: ReportInvalidCertificate: Payment server found an
invalid certificate:  "01" () () ("Copyright (c) 1997 Microsoft Corp.",
"Microsoft Time Stamping Service Root", "Microsoft Corporation")
GUI: ReportInvalidCertificate: Payment server found an
invalid certificate:  "4a:19:d2:38:8c:82:59:1c:a5:5d:73:5f:15:5d:dc:a3" ()
() ("NO LIABILITY ACCEPTED, (c)97 VeriSign, Inc.", "VeriSign Time Stamping
Service Root", "VeriSign, Inc.")
GUI: ReportInvalidCertificate: Payment server found an
invalid certificate:  "e4:9e:fd:f3:3a:e8:0e:cf:a5:11:3e:19:a4:24:02:32" ()
() ("Class 3 Public Primary Certification Authority")
2015-04-15 14:31:48 +02:00
Philip Kaufmann
5a53d7cda3 [Qt] paymentserver: do not log NULL certificates
- also add a few more comments in PaymentServer::LoadRootCAs
2015-04-15 14:31:48 +02:00
Jorge Timón
bebe7282ff Chainparams: Refactor: Remove redundant AllowMinDifficultyBlocks() getter 2015-04-15 14:31:44 +02:00
Wladimir J. van der Laan
ea2b425b00
Merge pull request #5997
4e38217 Chainparams: Refactor: Remove redundant HashGenesisBlock() getter (Jorge Timón)
2015-04-15 12:06:55 +02:00
Wladimir J. van der Laan
622e3c9c39
Merge pull request #5999
e8e8904 Chainparams: Cleanup: Delete CChainParams getters to attributes from Consensus::Params (Jorge Timón)
2015-04-15 12:00:09 +02:00
Wladimir J. van der Laan
4c4f1b4721
Merge pull request #5992
ea9e82d [squashme] fix listunspent code indentation (Jonas Schnelli)
b9fb692 Push down RPC reqWallet flag (Jonas Schnelli)
0b9dc9c [move] move listunspent to wallet/rpcwallet.cpp (Jonas Schnelli)
2015-04-15 11:10:23 +02:00
mrbandrews
0421c18f3a Fix CheckBlockIndex for reindex.
Some tests in CheckBlockIndex require chainActive.Tip(), but when reindexing, chainActive has not been set on the first call to CheckBlockIndex.

reindex.py starts a node, mines 3 blocks, stops, and reindexes with CheckBlockIndex enabled.
2015-04-14 14:10:19 -04:00
Suhas Daftuar
c1ecee8f72 Set nSequenceId when a block is fully linked
Also adds a test to CheckBlockIndex
2015-04-14 12:51:20 -04:00
Matt Corallo
eb63bf86cf Fix missing lock in submitblock 2015-04-13 11:29:44 -07:00
Jorge Timón
e8e8904dda Chainparams: Cleanup: Delete CChainParams getters to attributes from Consensus::Params 2015-04-13 18:39:53 +02:00
Jonas Schnelli
ea9e82df73 [squashme] fix listunspent code indentation 2015-04-13 15:04:08 +02:00
Wladimir J. van der Laan
9125c08f34
Merge pull request #6000
fd31199 consensus: don't use arith_uint256 in consensus.h (Cory Fields)
2015-04-13 11:25:01 +02:00
Jorge Timón
4e382177ed Chainparams: Refactor: Remove redundant HashGenesisBlock() getter 2015-04-12 23:01:30 +02:00
Jonas Schnelli
b9fb692d04 Push down RPC reqWallet flag 2015-04-12 19:37:29 +02:00
Jonas Schnelli
0b9dc9c8f5 [move] move listunspent to wallet/rpcwallet.cpp 2015-04-12 17:56:32 +02:00
Jeff Garzik
c2fa084611
Merge pull request #5983 2015-04-12 11:48:12 -04:00
Tom Harding
b2b3619262 Implement CTransaction::IsEquivalentTo(...)
Define CTransaction::IsEquivalentTo(const CTransaction& tx)

True if only scriptSigs are different.  In other words, true if
the two transactions are malleability clones.  In other words,
true if the two transactions have the same effect on the
outside universe.

In the wallet, only SyncMetaData for equivalent transactions.
2015-04-11 19:03:58 -07:00
Cory Fields
fd311996e8 consensus: don't use arith_uint256 in consensus.h
Requiring arith_uint256 at such a base level is not good for modularity.
2015-04-10 15:33:37 -04:00
Wladimir J. van der Laan
48265f3cf4 Revert mining changes in #5957
This reverts commit e2edf95cd3 6b04508e37 0df67f1f7a,
except the changes to the RPC tests.

A `generate` RPC call is introduced based on the old code.
2015-04-10 07:51:27 +02:00
Wladimir J. van der Laan
57026a29bc
Merge pull request #5957
e2edf95 Bugfix: make CreateNewBlock return pindexPrev (Pieter Wuille)
6b04508 Introduce separate 'generate' RPC call (Pieter Wuille)
0df67f1 Simplify hash loop code (Pieter Wuille)
2015-04-09 15:23:09 +02:00
Philip Kaufmann
f702d1c66d move ThreadFlushWalletDB declaration to walletdb.h 2015-04-08 14:31:53 +02:00
Wladimir J. van der Laan
7efc9cf672
Merge pull request #5951
77650cc add -walletbroadcast=0 rpc test (Jonas Schnelli)
6f25262 wallet: make it possible to disable transaction broadcast (Wladimir J. van der Laan)
2015-04-08 12:09:21 +02:00
Wladimir J. van der Laan
eb87f84d18
Merge pull request #5952
437ada3 Switch test case signing to RFC6979 extra entropy (Pieter Wuille)
9d09322 Squashed 'src/secp256k1/' changes from 50cc6ab..1897b8e (Pieter Wuille)
2015-04-08 09:56:54 +02:00
Wladimir J. van der Laan
91cba1aaed
Merge pull request #5969
f14e687 Chainparams: Decouple CAlert from CChainParams (Jorge Timón)
2015-04-08 09:41:14 +02:00
Wladimir J. van der Laan
a0bfc69541
Merge pull request #5959
ede379f Add additional block index consistency checks (Suhas Daftuar)
2015-04-08 08:57:25 +02:00
Wladimir J. van der Laan
64b263cc61
Merge pull request #5973
6c35664 [Qt] Clarify: smartfee button name "Minimize" (MarcoFalke)
2015-04-08 08:48:59 +02:00
Pieter Wuille
b36f1ce87e
Merge pull request #5948
1cc0e96 Trivial optimization: use GetAncestor to compute new target (Pieter Wuille)
2015-04-07 15:13:04 -07:00
MarcoFalke
6c3566443f [Qt] Clarify: smartfee button name "Minimize"
Make clear this button hides the options instead of minimizing the transaction fee.
2015-04-07 13:32:09 +02:00
Wladimir J. van der Laan
27e8d224e9
Merge pull request #5945
ad9e86d Keep mempool consistent during block-reorgs (Gavin Andresen)
2015-04-06 09:48:17 +02:00
Jorge Timón
f14e687feb Chainparams: Decouple CAlert from CChainParams 2015-04-04 12:58:14 +02:00
Suhas Daftuar
00dcaf4beb Change download logic to allow calling getheaders/getdata on inbound peers
SendMessages will now call getheaders on both inbound and outbound peers,
once the headers chain is close to synced.  It will also try downloading
blocks from inbound peers once we're out of initial block download (so
inbound peers will participate in parallel block fetching for the last day
or two of blocks being downloaded).
2015-04-02 13:41:01 -04:00
Suhas Daftuar
ede379f780 Add additional block index consistency checks
This adds more tests to CheckBlockIndex:
- HAVE_DATA is true iff nTx > 0
- BLOCK_VALID_TRANSACTIONS is true iff nTx > 0
- BLOCK_VALID_TRANSACTIONS is true for a block and all parents iff
  nChainTx > 0
2015-04-01 15:11:45 -04:00
Pieter Wuille
e2edf95cd3 Bugfix: make CreateNewBlock return pindexPrev 2015-04-01 11:47:10 -07:00
Pieter Wuille
6b04508e37 Introduce separate 'generate' RPC call 2015-04-01 11:47:10 -07:00
Pieter Wuille
0df67f1f7a Simplify hash loop code 2015-04-01 10:25:51 -07:00
Wladimir J. van der Laan
3e8a1f2725
Merge pull request #5900
3fcfbc8 Add a consistency check for the block chain data structures (Pieter Wuille)
2015-04-01 17:20:38 +02:00
Wladimir J. van der Laan
f7dea1cba7
Merge pull request #5941
1d21ba2 Scale up addrman (Pieter Wuille)
c6a63ce Always use a 50% chance to choose between tried and new entries (Pieter Wuille)
f68ba3f Do not bias outgoing connections towards fresh addresses (Pieter Wuille)
a8ff7c6 Simplify hashing code (Pieter Wuille)
e6b343d Make addrman's bucket placement deterministic. (Pieter Wuille)
b23add5 Switch addrman key from vector to uint256 (Pieter Wuille)
2015-04-01 16:17:13 +02:00
Wladimir J. van der Laan
6f252627b2 wallet: make it possible to disable transaction broadcast
This is an advanced feature which will disable any kind of automatic
transaction broadcasting in the wallet. This gives the user full control
of how the transaction is sent.

For example they can broadcast new transactions through some other
mechanism themselves, after getting the transaction hex through `gettransaction`.

This just adds the option `-walletbroadcast=<0,1>`. Right now these
transactions will get the status

    Status: conflicted, has not been successfully broadcast yet

They shouldn't be shown as conflicted at all (`walletconflicts` is empty). This status
will go away when the transaction is received through the network.
2015-04-01 13:03:39 +02:00
Wladimir J. van der Laan
41113e33ad
Merge pull request #5950
3a3ecc0 Initialization: setup environment before starting QT tests (dexX7)
fc3979a Initialization: setup environment before starting tests (dexX7)
ba0fa0d Initialization: set fallback locale as environment variable (dexX7)
2015-04-01 12:22:29 +02:00
Wladimir J. van der Laan
5ff4065cc6
Merge pull request #5833
721cb55 GUI: Display label rather than address on popups (Luke Dashjr)
e96028c GUI: Clarify terminology; use "Label" heading for labels row, and "Node/Service" rather than [IP] "Address" (Luke Dashjr)
2015-04-01 12:02:01 +02:00
Wladimir J. van der Laan
446bb70fcd
Merge pull request #5940
0f5954c Regression test for ResendWalletTransactions (Gavin Andresen)
2015-03-30 14:28:09 +02:00
Wladimir J. van der Laan
d62fed14ab
Merge pull request #5954
63e4c9c Fix clang compile warnings intriduced in #5681 (Michael Ford)
2015-03-30 13:56:45 +02:00
Wladimir J. van der Laan
bb56781d61
Merge pull request #5898
c816833 [Qt] fix rpc console font size to flexible metrics (Jonas Schnelli)
2015-03-30 10:24:05 +02:00
Michael Ford
63e4c9cd35 Fix clang compile warnings intriduced in #5681 2015-03-29 19:45:05 +08:00
dexX7
3a3ecc02e5
Initialization: setup environment before starting QT tests
The environment is prepared by the main thread to guard against invalid locale settings.
2015-03-29 10:35:35 +02:00
dexX7
fc3979ac69
Initialization: setup environment before starting tests
The environment is prepared by the main thread to guard against invalid locale settings and to prevent deinitialization issues of Boost path, which can result in app crashes.
2015-03-29 10:35:25 +02:00
Pieter Wuille
437ada3e55 Switch test case signing to RFC6979 extra entropy
Instead of manually tweaking the deterministic nonce post-generation,
pass the test case number in as extra entropy to RFC6979.
2015-03-27 15:31:47 -07:00
Pieter Wuille
9d09322b41 Squashed 'src/secp256k1/' changes from 50cc6ab..1897b8e
1897b8e Merge pull request #229
efc571c Add simple testcases for signing with rfc6979 extra entropy.
1573a10 Add ability to pass extra entropy to rfc6979
3087bc4 Merge pull request #228
d9b9f11 Merge pull request #218
0065a8f Eliminate multiple-returns from secp256k1.c.
354ffa3 Make secp256k1_ec_pubkey_create reject oversized secrets.
27bc131 Silence some warnings from pedantic static analysis tools, improve compatibility with C++.
3b7ea63 Merge pull request #221
f789c5b Merge pull request #215
4bc273b Merge pull request #222
137a8ec Merge pull request #216
7c3771d Disable overlength-strings warnings.
8956111 use 128-bit hex seed
02efd06 Use RFC6979 for test PRNGs
ae55e85 Use faster byteswapping and avoid alignment-increasing casts.
443cd4b Get rid of hex format and some binary conversions
0bada0e Merge #214: Improve signing API documentation & specification
8030d7c Improve signing API documentation & specification
7b2fc1c Merge #213: Removed gotos, which are hard to trace and maintain.
11690d3 Removed gotos, which are hard to trace and maintain.
122a1ec Merge pull request #205
035406d Merge pull request #206
2d4cd53 Merge pull request #161
34b898d Additional comments for the testing PRNG and a seeding fix.
6efd6e7 Some comments explaining some of the constants in the code.
ffccfd2 x86_64 assembly optimization for scalar_4x64
67cbdf0 Merge pull request #207
039723d Benchmarks for all internal operations
6cc8425 Include a comment on secp256k1_ecdsa_sign explaining low-s.
f88343f Merge pull request #203
d61e899 Add group operation counts
2473f17 Merge pull request #202
b5bbce6 Some readme updates, e.g. removal of the GMP field.
f0d851e Merge pull request #201
a0ea884 Merge pull request #200
f735446 Convert the rest of the codebase to C89.
bf2e1ac Convert tests to C89. (also fixes a use of bare "inline" in field)
fc8285f Merge pull request #199
fff412e Merge pull request #197
4be8d6f Centralize the definition of uint128_t and use it uniformly.
d9543c9 Switch scalar code to C89.
fcc48c4 Remove the non-storage cmov
55422b6 Switch ecmult_gen to use storage types
41f8455 Use group element storage type in EC multiplications
e68d720 Add group element storage type
ff889f7 Field storage type
7137be8 Merge pull request #196
0768bd5 Get rid of variable-length hex string conversions
e84e761 Merge pull request #195
792bcdb Covert several more files to C89.
45cdf44 Merge pull request #193
17db09e Merge pull request #194
402878a fix ifdef/ifndef
25b35c7 Convert field code to strict C89 (+ long long, +__int128)
3627437 C89 nits and dead code removal.
a9f350d Merge pull request #191
4732d26 Convert the field/group/ecdsa constant initialization to static consts
19f3e76 Remove unused secp256k1_fe_inner_{start, stop} functions
f1ebfe3 Convert the scalar constant initialization to static consts

git-subtree-dir: src/secp256k1
git-subtree-split: 1897b8e90bbbdcd919427c9a8ae35b420e919d8f
2015-03-27 14:03:36 -07:00
Pieter Wuille
223d8630b0 Update libsecp256k1. 2015-03-27 14:03:36 -07:00
Pieter Wuille
3fcfbc8ac5 Add a consistency check for the block chain data structures
This adds a -checkblockindex (defaulting to true for regtest), which occasionally
does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and
mapBlocksUnlinked.
2015-03-27 13:38:48 -07:00
Jonas Schnelli
c8168331a2 [Qt] fix rpc console font size to flexible metrics
should fix #5897
2015-03-27 09:48:26 +01:00
dexX7
ba0fa0d9bc
Initialization: set fallback locale as environment variable
The scope of `std::locale::global` appears to be smaller than `setenv("LC_ALL", ...)` and insufficient to fix messed up locale settings for the whole application.
2015-03-27 01:57:00 +01:00
Pieter Wuille
1cc0e96e9c Trivial optimization: use GetAncestor to compute new target 2015-03-26 11:06:27 -07:00
Gavin Andresen
ad9e86dca1
Keep mempool consistent during block-reorgs
This fixes a subtle bug involving block re-orgs and non-standard transactions.

Start with a block containing a non-standard transaction, and
one or more transactions spending it in the memory pool.

Then re-org away from that block to another chain that does
not contain the non-standard transaction.

Result before this fix: the dependent transactions get stuck
in the mempool without their parent, putting the mempool
in an inconsistent state.

Tested with a new unit test.
2015-03-26 11:58:19 -04:00
Wladimir J. van der Laan
8e4fd0cc31
Merge pull request #5876
5983a4e Add a NODE_GETUTXO service bit and document NODE_NETWORK. Stop translating the NODE_* names as they are technical and cannot be translated. (Mike Hearn)
2015-03-26 09:26:57 +01:00
Wladimir J. van der Laan
6a1fbc4921
Merge pull request #5942
fc72020 don't trickle for whitelisted nodes (Ruben de Vries)
2015-03-26 08:33:00 +01:00
Jorge Timón
d698ef690f Consensus: Refactor: Decouple pow.o from chainparams.o 2015-03-26 00:47:51 +01:00
Jorge Timón
bd006110fb Consensus: Refactor: Introduce Consensus::Params class 2015-03-25 20:39:26 +01:00
Wladimir J. van der Laan
cbb2cf5522
Fix --disable-wallet build after merge of #5681 2015-03-24 22:15:04 +01:00
Gavin Andresen
0f5954c434
Regression test for ResendWalletTransactions
Adds a regression test for the wallet's ResendWalletTransactions function, which uses a new, hidden RPC command "resendwallettransactions."

I refactored main's Broadcast signal so it is passed the best-block time, which let me remove a global variable shared between main.cpp and the wallet (nTimeBestReceived).

I also manually tested the "rebroadcast unconfirmed every half hour or so" functionality by:

1. Running bitcoind -connect=0.0.0.0:8333
2. Creating a couple of send-to-self transactions
3. Connect to a peer using -addnode
4. Waited a while, monitoring debug.log, until I see:
```2015-03-23 18:48:10 ResendWalletTransactions: rebroadcast 2 unconfirmed transactions```

One last change: don't bother putting ResendWalletTransactions messages in debug.log unless unconfirmed transactions were actually rebroadcast.
2015-03-24 15:29:20 -04:00
Jorge Timón
8a893c949b Includes: Do not include main.h from any other header 2015-03-24 17:23:32 +01:00
Jorge Timón
eca0b1ea62 Includes: MOVEONLY: move more method definitions out of wallet.h 2015-03-24 17:21:45 +01:00
Jorge Timón
26c16d9de9 Includes: Refactor: Move CValidationInterface and CMainSignals out of main 2015-03-24 17:21:41 +01:00
Ruben de Vries
fc720207e0 don't trickle for whitelisted nodes 2015-03-24 14:53:16 +01:00
Wladimir J. van der Laan
22cfe23196
Merge pull request #5890
cd3d67c Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates (Alex Morcos)
2015-03-24 14:50:54 +01:00
Pieter Wuille
2afd919f21
Merge pull request #5208
18051c7 Abstract out Ctransaction-specific signing into TransactionSignatureCreator (Pieter Wuille)
2015-03-24 05:55:51 -07:00
Pieter Wuille
45d6d0bce5
Merge pull request #5933
341e238 use constant references for strings in functions in wallet/*.* (Philip Kaufmann)
2015-03-24 05:33:31 -07:00
Wladimir J. van der Laan
46ba7a74a5
Merge pull request #5938
a354a59 wallet: move crypter to wallet (Cory Fields)
2015-03-24 08:50:55 +01:00
Wladimir J. van der Laan
28cc24f961
Merge pull request #5877
317e66c Initialization: set Boost path locale in main thread (dexX7)
2015-03-24 08:33:50 +01:00
Pieter Wuille
1d21ba2f5e Scale up addrman
This change was suggested as Countermeasure 6 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.
2015-03-23 17:24:29 -07:00
Pieter Wuille
c6a63ceeb4 Always use a 50% chance to choose between tried and new entries
This change was suggested as Countermeasure 2 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.
2015-03-23 17:24:18 -07:00
Pieter Wuille
f68ba3f67b Do not bias outgoing connections towards fresh addresses
This change was suggested as Countermeasure 2 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.
2015-03-23 17:23:40 -07:00
Pieter Wuille
a8ff7c62ed Simplify hashing code 2015-03-23 17:23:40 -07:00
Pieter Wuille
e6b343d880 Make addrman's bucket placement deterministic.
Give each address a single fixed location in the new and tried tables,
which become simple fixed-size arrays instead of sets and vectors.

This prevents attackers from having an advantages by inserting an
address multiple times.

This change was suggested as Countermeasure 1 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.

It is also more efficient.
2015-03-23 17:19:13 -07:00
Pieter Wuille
b23add5521 Switch addrman key from vector to uint256 2015-03-23 17:00:32 -07:00
Cory Fields
a354a59f1f wallet: move crypter to wallet 2015-03-22 15:18:55 -04:00
Mike Hearn
5983a4e50f Add a NODE_GETUTXO service bit and document NODE_NETWORK.
Stop translating the NODE_* names as they are technical and cannot be translated.
2015-03-21 19:35:02 +01:00
Philip Kaufmann
341e2385d5 use constant references for strings in functions in wallet/*.* 2015-03-21 18:40:51 +01:00
Pieter Wuille
18051c7fbd Abstract out Ctransaction-specific signing into TransactionSignatureCreator 2015-03-21 07:06:18 -07:00
dexX7
e9c3215b77
[Wallet] sort pending wallet transactions before reaccepting
During startup, when adding pending wallet transactions, which spend outputs of
other pending wallet transactions, back to the memory pool, and when they are
added out of order, it appears as if they are orphans with missing inputs.

Those transactions are then rejected and flagged as "conflicting" (= not in the
memory pool, not in the block chain).

To prevent this, transactions are explicitly sorted.
2015-03-21 13:03:23 +01:00
Jonas Schnelli
2bb1c87700 refactor: move bdb (bitdb) interaction from init.cpp to wallet.cpp
this will remove db.h from init.cpp
2015-03-20 16:23:39 +01:00
Wladimir J. van der Laan
05f17d4eaa
Merge pull request #5745
50c72f2 [Move Only] Move wallet related things to src/wallet/ (Jonas Schnelli)
2015-03-20 16:08:35 +01:00
Cory Fields
d7d187e8a4 allocators: split allocators and pagelocker
Pagelocker is only needed for secure (usually wallet) operations, so don't make
the zero-after-free allocator depend on it.
2015-03-20 12:23:44 +01:00
Wladimir J. van der Laan
93a8c46807
Merge pull request #5860
9c27379 Reduce fingerprinting through timestamps in 'addr' messages. (Pieter Wuille)
2015-03-17 16:38:06 +01:00
Pieter Wuille
9c2737901b Reduce fingerprinting through timestamps in 'addr' messages.
Suggested by Jonas Nick.
2015-03-17 03:08:52 -07:00
Wladimir J. van der Laan
226f880498
Merge pull request #5880
8b60808 [QT] some mac specifiy cleanup (memory handling, unnecessary code) (Jonas Schnelli)
89e70e9 [QT] fix OSX dock icon window reopening (Jonas Schnelli)
2015-03-16 13:55:35 +01:00
Wladimir J. van der Laan
df5c246ba3
Merge pull request #5831
1d9b378 qa/rpc-tests/wallet: Tests for sendmany (Luke Dashjr)
40a7573 rpcwallet/sendmany: Just take an array of addresses to subtract fees from, rather than an Object with all values being identical (Luke Dashjr)
292623a Subtract fee from amount (Cozz Lovan)
90a43c1 [Qt] Code-movement-only: Format confirmation message in sendcoinsdialog (Cozz Lovan)
2015-03-16 12:23:14 +01:00
Alex Morcos
cd3d67cf3b Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates 2015-03-13 13:11:11 -04:00
Jonas Schnelli
8b60808c1e [QT] some mac specifiy cleanup (memory handling, unnecessary code) 2015-03-13 15:40:53 +01:00
Luke Dashjr
40a757331a rpcwallet/sendmany: Just take an array of addresses to subtract fees from, rather than an Object with all values being identical 2015-03-13 11:04:25 +01:00
Cozz Lovan
292623adf5 Subtract fee from amount
Fixes #2724 and #1570.

Adds the
automatically-subtract-the-fee-from-the-amount-and-send-whats-left
feature to the GUI and RPC (sendtoaddress,sendmany).
2015-03-13 11:04:18 +01:00
Wladimir J. van der Laan
7077fe6dd4
Merge pull request #5884
e96c518 BUGFIX: Stack around the variable 'rv' was corrupted (fsb4000)
2015-03-12 18:16:24 +01:00
fsb4000
e96c5184e7 BUGFIX: Stack around the variable 'rv' was corrupted 2015-03-12 22:17:22 +06:00
Alex Morcos
a9af415887 fix InvalidateBlock to repopulate setBlockIndexCandidates 2015-03-12 10:15:33 -04:00
Jonas Schnelli
50c72f23ad [Move Only] Move wallet related things to src/wallet/
could once be renamed from /src/wallet to /src/legacywallet.
2015-03-12 14:13:02 +01:00
Wladimir J. van der Laan
dd4ffcec0e
Merge pull request #5859
9519a9a Add correct bool combiner for net signals (Pieter Wuille)
2015-03-12 11:14:03 +01:00
Wladimir J. van der Laan
92fd887fd4 tests: add a BasicTestingSetup and apply to all tests
Make sure that chainparams and logging is properly initialized. Doing
this for every test may be overkill, but this initialization is so
simple that that does not matter.

This should fix the travis issues.
2015-03-12 09:45:22 +01:00
Jonas Schnelli
89e70e931d [QT] fix OSX dock icon window reopening
fixes #5878
2015-03-12 00:16:23 +01:00
Wladimir J. van der Laan
e564e63ef0
Merge pull request #5871
3aa0130 test: remove fSkipProofOfWork (Wladimir J. van der Laan)
59bd89f test: Remove UNITTEST params (Wladimir J. van der Laan)
2015-03-11 15:13:05 +01:00
dexX7
317e66c741
Initialization: set Boost path locale in main thread
The path locale is lazy initialized and to avoid deinitialization errors
in multithreading environments, it is set explicitly by the main thread.
2015-03-11 14:33:29 +01:00
Wladimir J. van der Laan
d734d87b28
Merge pull request #5749
f754707 Fix - bitcoin-qt usage message (Luca Venturini)
1fdb9fa Help messages correctly formatted (79 chars) (Luca Venturini)
2015-03-11 10:20:59 +01:00
Wladimir J. van der Laan
45b7dc2c25
Merge pull request #5864
bb6acff fix possible block db breakage during re-index (Cory Fields)
2015-03-11 08:33:52 +01:00
Luca Venturini
f75470794b Fix - bitcoin-qt usage message
. Closes the bug from commit e179eb3d9b
("bitcoin-qt -help" did not show any message)
. Move all the options in init.cpp (there were already some
options related to bitcoin-qt)
2015-03-10 22:07:17 -07:00
Luca Venturini
1fdb9fa3f9 Help messages correctly formatted (79 chars)
Help messages are formatted programmatically with FormatParagraph
in order not to break existing strings in Transifex.

The new format works even if the translation of the strings
modifies the lenght of the message.

Sqashed 6 commits in a single one.
Help messages correctly formatted for SVGA text mode (132 chars)

Help messages are formatted programmatically with FormatParagraph
in order not to break existing strings in Transifex.

The new format should work even if the translation of the strings
modifies the lenght of the message.

Fix - syntax error

Correct formatting for 79 chars

Correctly based on C++ functions

Removed spare spaces from option strings

Fix - syntax error
2015-03-10 22:07:17 -07:00
Cory Fields
bb6acff079 fix possible block db breakage during re-index
When re-indexing, there are a few cases where garbage data may be skipped in
the block files. In these cases, the indices are correctly written to the index
db, however the pointer to the next position for writing in the current block
file is calculated by adding the sizes of the valid blocks found.

As a result, when the re-index is finished, the index db is correct for all
existing blocks, but the next block will be written to an incorrect offset,
likely overwriting existing blocks.

Rather than using the sum of all valid blocks to determine the next write
position, use the end of the last block written to the file. Don't assume that
the current block is the last one in the file, since they may be read
out-of-order.
2015-03-10 13:59:46 -04:00
Wladimir J. van der Laan
3aa0130b96 test: remove fSkipProofOfWork
Not used, and REGTEST already allows creating blocks at
the lowerst possible difficulty.
2015-03-09 16:09:54 +01:00
Wladimir J. van der Laan
59bd89f116 test: Remove UNITTEST params
UNITTEST parameter are not used by any current tests, and the model
(modifyable parameters) is inconvenient when unit-testing. As
they are stored in a global structure eevery test
would have to (re)set up its own parameters.

For consistency it is also better to test with MAIN parameters.
2015-03-09 16:06:14 +01:00
Wladimir J. van der Laan
8cbe1f4f58
tests: change main and wallet tests to BOOST_FIXTURE_TEST_SUITE
Avoid this travis error:

    test_bitcoin: chainparams.cpp:330: const CChainParams& Params():
    Assertion `pCurrentParams' failed.
    unknown location(0): fatal error in "subsidy_limit_test": signal:
    SIGABRT (application abort requested)
    test/allocator_tests.cpp(116): last checkpoint
2015-03-09 15:04:59 +01:00
Wladimir J. van der Laan
cdae53e456
Merge pull request #5852
51598b2 Reinitialize state in between individual unit tests. (Pieter Wuille)
2015-03-09 12:51:07 +01:00
Wladimir J. van der Laan
c1b723c30a
Merge pull request #5442
dca799e Ignore getaddr messages on Outbound connections. (Ivan Pustogarov)
2015-03-09 12:24:53 +01:00
Philip Kaufmann
8517e9709e [Qt] rework setNumBlocks to have blockDate as parameter
- reduces some functional overhead and simplifies the code
2015-03-09 10:58:17 +01:00
Wladimir J. van der Laan
513e025239
Merge pull request #5858
9bbb880 [Qt] fix a issue where "command line options"-action overwrite "Preference"-action (on OSX) (Jonas Schnelli)
2015-03-09 10:45:12 +01:00
Wladimir J. van der Laan
d26f0b263c
Merge pull request #5793
6cb4a52 [Qt, Linux] honor current network when creating autostart link (Philip Kaufmann)
9673c35 [Qt, Win] honor current network when creating autostart link (Philip Kaufmann)
2015-03-09 09:55:49 +01:00
Pieter Wuille
2f10aa0fa1
Merge pull request #5151
eec3713 make CMessageHeader a dumb storage class (Cory Fields)
2015-03-07 05:38:34 -08:00
Wladimir J. van der Laan
a0ae79d775 Replace CBlockHeader::GetHash with call to SerializeHash
Removes variability between LE and BE.
As suggested by @sipa.
2015-03-06 17:21:59 +01:00
Wladimir J. van der Laan
62b30f09ac Add serialize float/double tests 2015-03-06 17:21:59 +01:00
Wladimir J. van der Laan
9f4fac98c4 src/txmempool.cpp: make numEntries a uint32_t
Don't ever serialize a size_t or long, their sizes are platform
dependent.
2015-03-06 17:21:59 +01:00
Wladimir J. van der Laan
f4e6487219 src/arith_256.cpp: bigendian compatibility 2015-03-06 17:21:59 +01:00
Wladimir J. van der Laan
aac3205375 src/netbase.h: Fix endian in CNetAddr serialization
We've chosen to htons/ntohs explicitly on reading and writing
(I do not know why). But as READWRITE already does an endian swap
on big endian, this means the port number gets switched around,
which was what we were trying to avoid in the first place. So
to make this compatible, serialize it as FLATDATA.
2015-03-06 17:21:58 +01:00
Wladimir J. van der Laan
01f9c3449a src/serialize.h: base serialization level endianness neutrality
Serialization type-safety and endianness compatibility.
2015-03-06 17:21:58 +01:00
Wladimir J. van der Laan
4e853aa163 src/script/script.h: endian compatibility for PUSHDATA sizes 2015-03-06 17:21:58 +01:00
Wladimir J. van der Laan
4f92773f92 src/primitives/transaction.h: endian compatibility in serialization 2015-03-06 17:21:58 +01:00
Wladimir J. van der Laan
81aeb28436 src/primitives/block.cpp: endian compatibility in GetHash 2015-03-06 17:21:58 +01:00
Wladimir J. van der Laan
dec84cae2a src/net.cpp: endian compatibility in EndMessage 2015-03-06 17:21:58 +01:00
Wladimir J. van der Laan
556814ec4e src/main.cpp: endian compatibility in packet checksum check 2015-03-06 17:21:55 +01:00
Luke Dashjr
721cb557aa GUI: Display label rather than address on popups 2015-03-06 15:07:43 +00:00
Wladimir J. van der Laan
3ca5852dc2 src/hash.cpp: endian compatibility 2015-03-06 15:54:53 +01:00
Wladimir J. van der Laan
4414f5ffe1 build: Endian compatibility
- Detect endian instead of stopping configure on big-endian
- Add `byteswap.h` and `endian.h` header for compatibility with
  Windows and other operating systems that don't come with them
- Update `crypto/common.h` functions to use compat
  endian header
2015-03-06 15:54:53 +01:00
Wladimir J. van der Laan
51377c2dbe
Merge pull request #5843
ba04c4a Limit message sizes before transfer (Pieter Wuille)
2015-03-06 15:31:31 +01:00
Wladimir J. van der Laan
ee9f2bfa7b
Merge pull request #5813
34e5015 Add unit tests for next difficulty calculations (Ross Nicoll)
2015-03-06 15:27:00 +01:00
Pieter Wuille
ba04c4a780 Limit message sizes before transfer
This introduces a fixed limit for the size of p2p messages, and enforces it
before download.
2015-03-06 04:03:17 -08:00
Pieter Wuille
9519a9a420 Add correct bool combiner for net signals 2015-03-06 03:45:26 -08:00
Jonas Schnelli
9bbb880be4 [Qt] fix a issue where "command line options"-action overwrite "Preference"-action (on OSX)
- fixes #5800
2015-03-06 09:33:23 +01:00
Rob Van Mieghem
84a05b843b
QT: remove unused parameter 2015-03-05 12:20:49 -05:00
Wladimir J. van der Laan
215475aa00
Merge pull request #5830
6f1274c qt: Don't save geometry for options and about/help window (Wladimir J. van der Laan)
2015-03-05 14:42:20 +01:00
Cozz Lovan
90a43c1e93 [Qt] Code-movement-only: Format confirmation message in sendcoinsdialog 2015-03-05 13:25:12 +01:00
Pieter Wuille
51598b2631 Reinitialize state in between individual unit tests.
This changes the TestingSetup fixture to be per-unit-test rather than global.
Most tests don't need it, so it's only invoked in a few.
2015-03-03 09:01:46 -08:00
Wladimir J. van der Laan
3dfcdf46c2
Merge pull request #5775
deda3e1 [Qt] remove unused getNumBlocksAtStartup() from ClientModel (Philip Kaufmann)
47ee8cf [Qt] use qint64 in BitcoinGUI::setNumBlocks (Philip Kaufmann)
2015-03-03 16:57:30 +01:00
Wladimir J. van der Laan
f8e68f7bfb
Merge pull request #5819
d23b0a2 depends: always use static qt5 for linux (Cory Fields)
3448b13 build: fix typo in configure help (Cory Fields)
c95ac83 gitian: fix x86_64 build with static libstdc++ (Cory Fields)
0671516 build: change reduce exports/static libstdc++ options for gitian and travis (Cory Fields)
aa36730 build: remove libstdc++ backwards-compat (Cory Fields)
3ee028f build: disable reduced exports by default (Cory Fields)
2015-03-03 16:27:50 +01:00
Pieter Wuille
86eb461c5b
Merge pull request #5839
16a58a8 keys: remove libsecp256k1 verification until it's actually supported (Cory Fields)
2015-03-03 04:08:15 -08:00
Cory Fields
16a58a8644 keys: remove libsecp256k1 verification until it's actually supported
This was added a while ago for testing purposes, but was never intended to be
used. Remove it until upstream libsecp256k1 decides that verification is
stable/ready.
2015-03-02 11:31:43 -05:00
Pieter Wuille
10a3ff07f5
Merge pull request #5832
9abbeea Remove obsolete pubsub method definitions (Pieter Wuille)
2015-03-01 03:13:09 -08:00
Luke Dashjr
e96028c78e GUI: Clarify terminology; use "Label" heading for labels row, and "Node/Service" rather than [IP] "Address" 2015-02-26 20:56:42 +00:00
Wladimir J. van der Laan
db4a1d598c
Merge pull request #5694
25cf6f3 minor rework of SendMoney in rpcwallet (Philip Kaufmann)
2015-02-26 17:20:29 +01:00
Wladimir J. van der Laan
59310f1c02
Merge pull request #5820
85da07a Better fingerprinting protection for non-main-chain getdatas. (Pieter Wuille)
2015-02-26 17:13:13 +01:00
Pieter Wuille
9abbeeabd7 Remove obsolete pubsub method definitions 2015-02-26 05:30:59 -08:00
Wladimir J. van der Laan
482783b341
Merge pull request #5801
de5403f [GUI] Move fee dialog minimise button away from "Transaction Fee" (Michael Ford)
2015-02-26 11:26:32 +01:00
Wladimir J. van der Laan
6f1274c8c9
qt: Don't save geometry for options and about/help window
These dialogs will be something that people occasionally open, not keep
open during their session, so just popping it up in a sensible place
is good enough. Remembering only creates potential issues, like spawning
it outside the current screen area.

On Ubuntu this causes the dialogs to be positioned in the
middle of the main dialog, so I didn't add code for that. YMMV.

Inspired by github pull #5777 by @L-Cranston-Shadow
2015-02-26 10:23:42 +01:00
Cory Fields
eec37136fd make CMessageHeader a dumb storage class
It shouldn't know or care about bitcoind's chain param selection
2015-02-25 18:44:49 -05:00
21E14
32eaf8a3de WIN32 Seed Cleanup: Move nLastPerfmon behind win32 ifdef.
Code to avoid calling Perfmon too often is only needed when perfmon is actually going to get called.
This is not intended to make any functional difference in the addition of entropy to the random pool.
2015-02-25 18:37:06 -05:00
Pieter Wuille
85da07a5a0 Better fingerprinting protection for non-main-chain getdatas.
With headers-first we can compare against the best header timestamp, rather
than using checkpoints which require code updates to maintain.
2015-02-24 04:35:13 -08:00
Cory Fields
aa3673064c build: remove libstdc++ backwards-compat
Backwards-compatibility for libstdc++ is not limited to straightforward abi
changes. Symbol visibility also needs to be taken into consideration, and
that really can't be addressed simply.

Instead, just static-link libstdc++ for backwards-compat.
2015-02-23 17:56:15 -05:00
Ross Nicoll
34e5015cd2
Add unit tests for next difficulty calculations
Split GetNextWorkRequired() into two functions to allow the difficulty calculations to
be tested without requiring a full blockchain.
Add unit tests to cover basic difficulty calculation, plus each of the min/max actual
time, and maximum difficulty target conditions.
2015-02-21 13:14:19 +00:00
Michael Ford
de5403f878 [GUI] Move fee dialog minimise button away from "Transaction Fee"
Its original placement was causing confusion among some users.
2015-02-21 09:11:33 +08:00
Wladimir J. van der Laan
a026a56c4e
Merge #5706: fix crash: RPC \
e5d9d77 fix crash: createmultisig and addmultisigaddress (fsb4000)
2015-02-20 09:51:38 +01:00
Wladimir J. van der Laan
07f4386b38
Merge #5689: openssl: abstract out OPENSSL_cleanse
1630219 openssl: abstract out OPENSSL_cleanse (Cory Fields)
2015-02-19 12:09:26 +01:00
Philip Kaufmann
6cb4a52535 [Qt, Linux] honor current network when creating autostart link 2015-02-19 12:08:47 +01:00
Philip Kaufmann
9673c35daf [Qt, Win] honor current network when creating autostart link
- creates a "Bitcoin (testnet).lnk" when on testnet or a "Bitcoin
  (regtest).lnk, when on regtest
- fixes #5778
2015-02-19 12:06:49 +01:00
Wladimir J. van der Laan
47a79bb880
Merge #5366: No longer check osx compatibility in RenameThread
850c570 No longer check osx compatibility in RenameThread (Michael Ford)
2015-02-18 17:36:39 +01:00
Wladimir J. van der Laan
8d0418720c
Merge #5799: Rename Interval() to DifficultyAdjustmentInterval()
e5ece05 Rename Interval() to DifficultyAdjustmentInterval() (Shaul Kfir)
2015-02-18 17:29:28 +01:00
Wladimir J. van der Laan
e3a3cd7a28
Merge #5784: Fix usage of NegateSignatureS in script_tests
78c6bed Add test for DER-encoding edge case (Suhas Daftuar)
6f50dbd Fix NegateSignatureS to not duplicate last byte of S (Suhas Daftuar)
2015-02-18 09:52:59 +01:00
Shaul Kfir
e5ece053da Rename Interval() to DifficultyAdjustmentInterval() 2015-02-17 08:46:51 -05:00
Pieter Wuille
175d86e633
Merge #5710: Add more information to errors in ReadBlockFromDisk
f5791c6 Add more information to errors in ReadBlockFromDisk (Wladimir J. van der Laan)
2015-02-16 11:58:35 -08:00
Cory Fields
1630219d90 openssl: abstract out OPENSSL_cleanse
This makes it easier for us to replace it if desired, since it's now only in
one spot. Also, it avoids the openssl include from allocators.h, which
essentially forced openssl to be included from every compilation unit.
2015-02-15 11:34:02 -05:00
Suhas Daftuar
78c6bedb9c Add test for DER-encoding edge case
The fix to NegateSignatureS caused a test which had been failing
in IsValidSignatureEncoding to then fail in IsLowDERSignature.
Add new test so the original check remains exercised.
2015-02-10 13:25:41 -05:00
Suhas Daftuar
6f50dbd2fd Fix NegateSignatureS to not duplicate last byte of S
NegateSignatureS is called with a signature without a hashtype, so
do not save the last byte and append it after S negation.

Updates the two tests which were affected by this bug.
2015-02-10 13:23:57 -05:00
Wladimir J. van der Laan
d48ce48093
Merge #5548: [REST] add /rest/chaininfos
2c0f901 [REST] rest/chaininfos add documentation (Jonas Schnelli)
59582c8 [REST] add /rest/chaininfos (Jonas Schnelli)
2015-02-10 12:08:07 +01:00
Wladimir J. van der Laan
a9565863e0
Merge #5629: [Qt] prevent amount overflow problem with payment requests
a651668 [Qt] prevent amount overflow problem with payment requests (Philip Kaufmann)
2015-02-09 13:50:56 +01:00
Wladimir J. van der Laan
183ca292bd
Merge #5699: Split logic to undo txin's off DisconnectBlock.
eb1c2cd Split logic to undo txin's off DisconnectBlock. (Daniel Kraft)
2015-02-09 13:22:35 +01:00
Wladimir J. van der Laan
beff11a3a1
Merge #5679: Get rid of DetectShutdownThread
28ee7e8 Get rid of DetectShutdownThread (Wladimir J. van der Laan)
2015-02-09 12:57:09 +01:00
Wladimir J. van der Laan
7225577f6b
Merge pull request #5739
f4b2078 Replace difficulty readjustment blocks with Interval() (Shaul Kfir)
2015-02-09 12:48:38 +01:00
Wladimir J. van der Laan
0f44672437
Merge pull request #5753
d67a642 [Qt] add bitcoin logo to about screen (Jonas Schnelli)
2015-02-09 11:34:01 +01:00
Philip Kaufmann
deda3e156d [Qt] remove unused getNumBlocksAtStartup() from ClientModel 2015-02-09 11:28:03 +01:00
Philip Kaufmann
47ee8cf091 [Qt] use qint64 in BitcoinGUI::setNumBlocks
- as QDateTime.secsTo() returns a qint64 also store in a qint64 and not in
  an integer
2015-02-09 11:21:26 +01:00
Gregory Maxwell
28d4cff0ed Sanitize command strings before logging them.
Normally bitcoin core does not display any network originated strings without
 sanitizing or hex encoding.  This wasn't done for strcommand in many places.

This could be used to play havoc with a terminal displaying the logs,
 especially with printtoconsole in use.

Thanks to Evil-Knievel for reporting this issue.
2015-02-08 19:58:59 +00:00
Ivan Pustogarov
dca799e1db Ignore getaddr messages on Outbound connections.
The only time when a client sends a "getaddr" message is when he
esatblishes an Outbound connection (see ProcessMessage() in
src/main.cpp).  Another bitcoin client is expected to receive a
"getaddr" message only on Inbound connection. Ignoring "gettaddr"
requests on Outbound connections can resolve potential privacy issues
(and as was said such request normally do not happen anyway).
2015-02-06 22:03:42 +01:00