Commit Graph

10445 Commits

Author SHA1 Message Date
Wladimir J. van der Laan e6a4d48a9b
Merge #7874: Improve AlreadyHave
c6cb6f7 Avoid unnecessary database access for unknown transactions (Alex Morcos)
2016-04-14 17:54:42 +02:00
Wladimir J. van der Laan 6ef5e000a2
Merge #7853: [qa] py2: Unfiddle strings into bytes explicitly
faa41ee [qa] py2: Unfiddle strings into bytes explicitly (MarcoFalke)
2016-04-14 17:40:31 +02:00
Wladimir J. van der Laan 430fffefaa
Merge #7812: Tiny refactor of `IsRBFOptIn`, avoid exception
4f7c959 Refactor IsRBFOptIn, avoid exception (Jonas Schnelli)
2016-04-14 16:35:02 +02:00
Wladimir J. van der Laan d97101e5a8
Merge #7842: RPC: do not print minping time in getpeerinfo when no ping received yet
62a6486 RPC: do not print ping info in getpeerinfo when no ping received yet, fix help (Pavel Janík)
2016-04-14 16:09:53 +02:00
Wladimir J. van der Laan 491171f929
Merge #7846: Clean up lockorder data of destroyed mutexes
5eeb913 Clean up lockorder data of destroyed mutexes (Pieter Wuille)
2016-04-14 15:47:08 +02:00
Wladimir J. van der Laan 97d0b9889f
Merge #7862: Use txid as key in mapAlreadyAskedFor
7e91f63 Use txid as key in mapAlreadyAskedFor (Suhas Daftuar)
2016-04-14 14:55:01 +02:00
Wladimir J. van der Laan ab8586e667
Merge #7849: tests: add varints_bitpatterns test
4521f00 tests: add varints_bitpatterns test (Wladimir J. van der Laan)
2016-04-14 14:46:13 +02:00
Wladimir J. van der Laan 229a17ca91
Merge #7850: Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp`.
41dbc48 Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp`. (Alexander Regueiro)
2016-04-14 13:38:49 +02:00
Wladimir J. van der Laan 3911a0a1b7
Merge #7818: Refactor script tests
dde46d3 Merge script_valid and script_invalid tests (Pieter Wuille)
009b503 Get rid of expect in script_tests as it's implied by scripterror (Pieter Wuille)
76da761 Make script_error a mandatory 4th field for script_tests (Pieter Wuille)
269281b Fix some misconstructed tests (Pieter Wuille)
d03e466 Fix formatting of NOPs for generated script tests (Pieter Wuille)
c7c6641 Fix JSON pretty printing in script_tests (Pieter Wuille)
2016-04-14 13:27:41 +02:00
Wladimir J. van der Laan 3eae681493
Merge #7847: doc: add arch linux build example
fe53a2a doc: add arch linux setup and build example [skip ci] (mruddy)
2016-04-14 12:16:00 +02:00
Wladimir J. van der Laan 72c54e3883
Merge #7863: getblockchaininfo: make bip9_softforks an object, not an array.
d12760b rpc-tests: handle KeyError nicely in test_framework.py (Rusty Russell)
85c807c getblockchaininfo: make bip9_softforks an object, not an array. (Rusty Russell)
2016-04-14 12:14:42 +02:00
Wladimir J. van der Laan b778e5993a
Merge #7855: [doc] gitian: Replace precise with trusty
fa6399d [doc] gitian: Replace precise with trusty (MarcoFalke)
2016-04-14 12:09:58 +02:00
Wladimir J. van der Laan 536b75e946
Merge #7796: [amount] Add support for negative fee rates
facf5a4 [amount] tests: Fix off-by-one mistake (MarcoFalke)
fa2da2c [amount] Add support for negative fee rates (MarcoFalke)
11114a6 [amount] test negative fee rates and full constructor (MarcoFalke)
2016-04-14 12:07:52 +02:00
Wladimir J. van der Laan 8bb5d3dff4
Merge #7838: [Doc] Update gitian build guide to debian 8.4.0
4a1d5c1 [Doc] Update gitian build guide to debian 8.4.0 (fanquake)
2016-04-14 09:26:21 +02:00
Alex Morcos c6cb6f7d4c Avoid unnecessary database access for unknown transactions 2016-04-13 16:02:46 -04:00
Rusty Russell d12760b16a rpc-tests: handle KeyError nicely in test_framework.py
btcdrak wrote this for me.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-13 16:54:07 +09:30
Rusty Russell 85c807c9ea getblockchaininfo: make bip9_softforks an object, not an array.
We can't change "softforks", but it seems far more logical to use tags
in an object rather than using an "id" field in an array.

For example, to get the csv status before, you need to iterate the
array to find the entry with 'id' field equal to "csv":

   jq '.bip9_softforks | map(select(.id == "csv"))[] | .status'

Now:
   jq '.bip9_softforks.csv.status'

There is no issue with fork names being incompatible with JSON tags,
since we're selecting them ourselves.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-13 16:53:52 +09:30
Alexander Regueiro 41dbc4849e Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp`.
See https://github.com/bitcoin/bitcoin/issues/7845#issuecomment-207684728.
Also refactored `GetDefaultDataDir` function to return path for Mac in one expression.
2016-04-13 00:11:47 +01:00
Pieter Wuille 514993554c
Merge #7828: Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage()
bf477bc Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage() (Jorge Timón)
2016-04-12 15:51:16 +02:00
Suhas Daftuar 7e91f632c7 Use txid as key in mapAlreadyAskedFor
Previously we used the CInv that would be sent to the peer announcing the
transaction as the key, but using the txid instead allows us to decouple the
p2p layer from the application logic (which relies on this map to avoid
duplicate tx requests).
2016-04-11 15:58:01 -04:00
Wladimir J. van der Laan 934f2b5e76
Merge #7858: Add jl2012 public key for gitian build
64c22be Add jl2012 public key for gitian build (Johnson Lau)
2016-04-11 12:57:31 +02:00
Johnson Lau 64c22be7a9 Add jl2012 public key for gitian build 2016-04-11 17:31:25 +08:00
fanquake 4a1d5c19ee [Doc] Update gitian build guide to debian 8.4.0 2016-04-11 17:19:01 +08:00
MarcoFalke fa6399d918 [doc] gitian: Replace precise with trusty 2016-04-10 20:46:33 +02:00
MarcoFalke faa41ee204 [qa] py2: Unfiddle strings into bytes explicitly 2016-04-10 20:35:57 +02:00
Pieter Wuille 5eeb913d6c Clean up lockorder data of destroyed mutexes
The lockorder potential deadlock detection works by remembering for each
lock A that is acquired while holding another B the pair (A,B), and
triggering a warning when (B,A) already exists in the table.

A and B in the above text are represented by pointers to the CCriticalSection
object that is acquired. This does mean however that we need to clean up the
table entries that refer to any critical section which is destroyed, as it
memory address can potentially be used for another unrelated lock in the future.

Implement this clean up by remembering not only the pairs in forward direction,
but also backward direction. This allows for fast iteration over all pairs that
use a deleted CCriticalSection in either the first or the second position.
2016-04-10 14:27:10 +02:00
MarcoFalke facf5a4947 [amount] tests: Fix off-by-one mistake 2016-04-09 15:28:22 +02:00
mruddy fe53a2af6f doc: add arch linux setup and build example
[skip ci]
2016-04-09 08:59:46 -04:00
Wladimir J. van der Laan 065c6b443f
Merge #7786: Doc: Update isStandardTx comment
03c77fd Doc: Update isStandardTx comment (Matthew English)
2016-04-09 12:13:21 +02:00
Pavel Janík 62a6486058 RPC: do not print ping info in getpeerinfo when no ping received yet, fix help 2016-04-09 09:51:57 +02:00
Wladimir J. van der Laan 4521f005a1 tests: add varints_bitpatterns test
The current tests for varint only check that
serialization-deserialization is a roundtrip. That is a useful test, but
it is also good to check for some exact bit patterns, to prevent a code
change that changes the serialization format from going undetected.

As the varint functions are templated, also check with different types.
2016-04-09 09:17:51 +02:00
Matthew English 03c77fdc14 Doc: Update isStandardTx comment 2016-04-08 23:22:39 +02:00
MarcoFalke fa2da2cb60 [amount] Add support for negative fee rates
Currently negative fee rates are not supported on archs of 64-bit or
more
2016-04-08 19:59:53 +02:00
MarcoFalke 11114a69c8 [amount] test negative fee rates and full constructor 2016-04-08 19:59:44 +02:00
Wladimir J. van der Laan 0afac87e81
Merge #7835: Version 2 transactions remain non-standard until CSV activates
da5fdbb Test relay of version 2 transactions (Suhas Daftuar)
5cb1d8a Tests: move get_bip9_status to util.py (Suhas Daftuar)
e4ba9f6 Version 2 transactions remain non-standard until CSV activates (Suhas Daftuar)
2016-04-08 14:17:54 +02:00
Wladimir J. van der Laan 232592a71f
Merge #7570: Net: Add IPv6 Link-Local Address Support
eda3d92 Net: Add IPv6 Link-Local Address Support (mruddy)
2016-04-08 14:12:54 +02:00
Suhas Daftuar da5fdbb3a2 Test relay of version 2 transactions 2016-04-07 14:59:50 -04:00
Suhas Daftuar 5cb1d8a207 Tests: move get_bip9_status to util.py 2016-04-07 14:54:50 -04:00
Suhas Daftuar e4ba9f6b04 Version 2 transactions remain non-standard until CSV activates
Before activation, such transactions might not be mined, so don't
allow into the mempool.
2016-04-07 14:33:08 -04:00
Wladimir J. van der Laan 5851915a00
Merge #7832: Reduce block timeout to 10 minutes
62b9a55 Reduce block timeout to 10 minutes (Wladimir J. van der Laan)
2016-04-07 13:52:39 +02:00
Wladimir J. van der Laan 62b9a557fc Reduce block timeout to 10 minutes
Now that #7804 fixed the timeout handling, reduce the block timeout from
20 minutes to 10 minutes. 20 minutes is overkill.
2016-04-07 13:22:27 +02:00
Wladimir J. van der Laan 1ddf0cee67
Merge #7804: Track block download times per individual block
0e24bbf Self check after the last peer is removed (Pieter Wuille)
2d1d658 Track block download times per individual block (Pieter Wuille)
2016-04-07 13:07:11 +02:00
Wladimir J. van der Laan bbaf5976af
Merge #7821: init: allow shutdown during 'Activating best chain...'
07398e8 init: allow shutdown during 'Activating best chain...' (Wladimir J. van der Laan)
2016-04-07 12:59:10 +02:00
Pieter Wuille 0e24bbf679 Self check after the last peer is removed 2016-04-07 12:13:10 +02:00
Pieter Wuille 2d1d6581ec Track block download times per individual block
Currently, we're keeping a timeout for each requested block, starting
from when it is requested, with a correction factor for the number of
blocks in the queue.

That's unnecessarily complicated and inaccurate.

As peers process block requests in order, we can make the timeout for each
block start counting only when all previous ones have been received, and
have a correction based on the number of peers, rather than the total number
of blocks.
2016-04-07 12:13:10 +02:00
Jorge Timón bf477bcc79 Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage() 2016-04-06 16:00:25 +02:00
Wladimir J. van der Laan 3bc71e1572
Merge #7802: [qa] httpbasics: Actually test second connection
fa24456 [qa] httpbasics: Actually test second connection (MarcoFalke)
2016-04-06 14:14:14 +02:00
Wladimir J. van der Laan 401c65c6b3
Merge #7803: [qa] maxblocksinflight: Actually enable test
fac724c [qa] maxblocksinflight: Actually enable test (MarcoFalke)
2016-04-06 14:13:38 +02:00
Wladimir J. van der Laan 70ac71b877
Merge #7801: [qa] Remove misleading "errorString syntax"
ffff866 [qa] Remove misleading "errorString syntax" (MarcoFalke)
2016-04-06 14:12:44 +02:00
Jonas Schnelli 4f7c959af1
Refactor IsRBFOptIn, avoid exception 2016-04-06 10:59:03 +02:00