aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-16Merge #10735: Avoid static analyzer warnings regarding uninitialized argumentsPieter Wuille
6835cb0ab Avoid static analyzer warnings regarding uninitialized arguments (practicalswift) Pull request description: Avoid static analyzer warnings regarding _"Function call argument is a pointer to uninitialized value"_ in cases where we are intentionally using such arguments. This is achieved by using `f(b.begin(), b.end())` (`std::array<char, N>`) instead of `f(b, b + N)` (`char b[N]`). Rationale: * Reduce false positives by guiding static analyzers regarding our intentions. Before this commit: ```shell $ clang-tidy-3.5 -checks=* src/bench/base58.cpp bench/base58.cpp:23:9: warning: Function call argument is a pointer to uninitialized value [clang-analyzer-core.CallAndMessage] EncodeBase58(b, b + 32); ^ $ clang-tidy-3.5 -checks=* src/bench/verify_script.cpp bench/verify_script.cpp:59:5: warning: Function call argument is a pointer to uninitialized value [clang-analyzer-core.CallAndMessage] key.Set(vchKey, vchKey + 32, false); ^ $ ``` After this commit: ```shell $ clang-tidy-3.5 -checks=* src/bench/base58.cpp $ clang-tidy-3.5 -checks=* src/bench/verify_script.cpp $ ``` Tree-SHA512: 5814a320ca8b959d0954bb64393424bcad73f942d2e988de1cd6788f39153b93900325532f2e340de02d740a3953385d212ae08e7ec72bb4c394a40475f251df
2017-07-16Merge #10844: Use range based for loopPieter Wuille
d0413c670 Use range based for loop (René Nyffenegger) Pull request description: Instead of iterating over 0 .. 1 and then deciding on an actual desired value, use a range based for loop for the desired value. Tree-SHA512: 0a7a4a80516c9f16cf97fa7d257088b8386360e19b93c4deac3d745b6270ea452c513821686d7d14a159a235763e034f9b14eef222ca15f7eb71c37bd1c2c380
2017-07-16Merge #10840: Remove duplicate includePieter Wuille
c53369cc2 Remove duplicate include (practicalswift) Pull request description: Remove duplicate include. Introduced in 5c643241e5d98992c0d5487b65e9c7b6d8005d1a. Tree-SHA512: c273cb60824b3a2b2bdebdc4fc84b309d66042d616ccfc9a7b1ee55380af0ab7d1ae059391b3b46063847087a1985e2491d4ce203a31a2b1c586e8fd531d9336
2017-07-16Merge #10766: Building Environment: Set ARFLAGS to crPieter Wuille
912da1dcc Use AC_ARG_VAR to set ARFLAGS. (René Nyffenegger) Pull request description: Override the default of ARFLAGS of `cru` to `cr`. When building, ar produces a warning for each archive, for example ``` AR libbitcoin_server.a /usr/bin/ar: `u' modifier ignored since `D' is the default (see `U') ``` Since `u` is the default anyway, it cannot hurt to remove it. Tree-SHA512: 7466764f847b70f0f67db25dac87a7794477abf1997cb946682f394fe80ae86ac3ed52cbadb35f0c18a87467755bde5a5158430444cd26fb60fa363cc7bd486d
2017-07-16Merge #10820: Use cpuid intrinsics instead of asm codePieter Wuille
674848fe1 Clarify entropy source (Pieter Wuille) a9e82f651 Use cpuid intrinsics instead of asm code (Pieter Wuille) Pull request description: Less platform-specific code is better. Tree-SHA512: 14f1b9accd9882859acdf516d2ada7ccb0ad92a3b3edf95b9cb8a8e514d4b1748d4555bcfb560779792c4f664f920d681ae42e9cebd0e6410f13f94c3a8729a0
2017-07-16Use range based for loopRené Nyffenegger
Instead of iterating over 0 .. 1 and then deciding on an actual desired value, use a range based for loop for the desired value.
2017-07-16Remove duplicate includepracticalswift
2017-07-15Merge #10235: Track keypool entries as internal vs external in memoryPieter Wuille
d40a72ccb Clarify *(--.end()) iterator semantics in CWallet::TopUpKeyPool (Matt Corallo) 28301b978 Meet code style on lines changed in the previous commit (Matt Corallo) 4a3fc3562 Track keypool entries as internal vs external in memory (Matt Corallo) Pull request description: This is an alternative version of #10184. As @jonasschnelli points out there, the performance regressions are pretty minimal, but given that this is a pretty simple, mechanical change, its probably worth doing. Tree-SHA512: e83f9ebf2998f8164d1b2eebe5e6dcdeadea8c30b7612861f830758c08bf4093cd6a67b3bcfa9cfcb139e5e0b106fc8898a975fc69f334981aefc756568ab613
2017-07-15Use AC_ARG_VAR to set ARFLAGS.René Nyffenegger
The user can set ARFLAGS in the ./configure step with ./configure ARFLAGS=... If he chooses not to do so, ARFLAGS will be set to cr.
2017-07-15Merge #10812: [utils] Allow bitcoin-cli's -rpcconnect option to be used with ↵Pieter Wuille
square brackets 5c643241e [utils] allow square brackets for ipv6 addresses in bitcoin-cli (John Newbery) fe4fabaf1 [refactor] move SplitHostPort() into utilstrencodings (John Newbery) Pull request description: bitcoin-cli's `-rpcconnect` can accept ipv6 addresses (as long as the libevent version is new enough), but fails to parse ipv6 with square brackets. This PR makes `bitcoin-cli` parse ipv6 in square brackets correctly. `bitcoin-cli -rpcconnect=[::1] <command>` should now be equivalent to `bitcoin-cli -rpcconnect=::1 <command>` This is useful so the `bitcoin-cli` option can now be in the same format as the `bitcoind` option. Doesn't include tests. I have a branch that fully tests `bitcoin-cli`, but that's queued behind several intermediate PRs. - first commit moves `SplitHostPort()` from libbitcoin_common into libbitcoin_util - second commit adds proper ipv6 parsing to bitcoin-cli Tree-SHA512: 249d409f10360c989474283341f458cc97364a56a7d004ae6d5f13d8bffe3a51b5dc2484d42218848e2d42cd9c0b13a1b92e94ea19b209f7e91c875c208d8409
2017-07-15Merge #10760: Avoid dereference-of-casted-pointerPieter Wuille
0aadc11fd Avoid dereference-of-casted-pointer (Pieter Wuille) Pull request description: And prefer a static_cast to the intended reference type. Tree-SHA512: e83b20023a4dca6029b46f7040a8a6fd54e1b42112ec0c87c3c3b567ed641de97a9e2335b57a2efb075491f641e5b977bc226a474276bea0c3c3c71d8d6ac54d
2017-07-15Merge #10807: getbalance example covers at least 6 confirmsPieter Wuille
228987d84 getbalance example covers at least 6 confirms (Gregory Sanders) Tree-SHA512: 328d60b007ee75d809f4d28a7d9e5537d3c1446bd30c4c2ae57c690b8e83f6287cbcd3d8c955e8ba07ab62e27f9d27497c55219ff14fd5af7759dec465673fa2
2017-07-15Merge #10833: Fix typosPieter Wuille
0189d8ed1 Fix typos (practicalswift) Tree-SHA512: bac96ab13964e7579c93d63fc7550eb091c316767cc33f2a52c18cd786537650668799603414d418680a5e04516abf1e304b10d5f4ad48a5dcba24b3f09a0387
2017-07-15Fix typospracticalswift
2017-07-15Avoid static analyzer warnings regarding uninitialized argumentspracticalswift
Avoid static analyzer warnings regarding "Function call argument is a pointer to uninitialized value" in cases where we are intentionally using such arguments. This is achieved by using ... `f(b.begin(), b.end())` (`std::array<char, N>`) ... instead of ... `f(b, b + N)` (`char b[N]`) Rationale: * Reduce false positives by guiding static analyzers regarding our intentions. Before this commit: ``` $ clang-tidy-3.5 -checks=* src/bench/base58.cpp bench/base58.cpp:23:9: warning: Function call argument is a pointer to uninitialized value [clang-analyzer-core.CallAndMessage] EncodeBase58(b, b + 32); ^ $ clang-tidy-3.5 -checks=* src/bench/verify_script.cpp bench/verify_script.cpp:59:5: warning: Function call argument is a pointer to uninitialized value [clang-analyzer-core.CallAndMessage] key.Set(vchKey, vchKey + 32, false); ^ $ ``` After this commit: ``` $ clang-tidy-3.5 -checks=* src/bench/base58.cpp $ clang-tidy-3.5 -checks=* src/bench/verify_script.cpp $ ```
2017-07-14Merge #10769: [Qt] replace fee slider with a Dropdown, extend conf. targetsPieter Wuille
2aef1f182 [Qt] migrate old fee slider value to new dropbown Always round up (conservative) (Jonas Schnelli) bc1be90e3 [Qt] replace fee slider with a Dropdown, extend conf. targets (Jonas Schnelli) Tree-SHA512: 53796cf0b434dd3db5d4680dbeb6231a7df8f15d88187178fd4db8917cd7fc60091ce2c1589fd93668fc94bb13f989aba5b7ef3792fa95ee1f9f21a15709e2d3
2017-07-14Merge #10816: Properly forbid -salvagewallet and -zapwallettxes for multi ↵Pieter Wuille
wallet. dd97a529a Properly forbid -salvagewallet and -zapwallettxes for multi wallet. (Alex Morcos) Tree-SHA512: dcde8f854ae957b4d3af4bcf1b811e0b6e9b93602764f86499e46a28d304cd4ee93ba058c03f6ca74ccb60e1310c83e53b698c64d93e5503115377655b80d44d
2017-07-14Clarify *(--.end()) iterator semantics in CWallet::TopUpKeyPoolMatt Corallo
2017-07-14Meet code style on lines changed in the previous commitMatt Corallo
2017-07-14Track keypool entries as internal vs external in memoryMatt Corallo
This resolves a super minor performance regressions in several keypool-handling functions
2017-07-14Merge #10808: Avoid some new gcc warnings in 15Pieter Wuille
c73b8be24 Explicitly initialize prevector::_union to avoid new warning (Matt Corallo) 1016dacfa Fix signed/unsigned comparison warning introduced in c8e29d7ff0. (Matt Corallo) Tree-SHA512: d1574b0fdc9bfddc3517c382d34418b1d8ed80c81d2f6fd19378c064af8d7704fb84ef8b740ff97f7ec7609bd6de76348921fcc227e1ce97127947a0d22c7887
2017-07-14Explicitly initialize prevector::_union to avoid new warningMatt Corallo
Warning from gcc 7.1 is ./prevector.h:450:25: warning: '*((void*)(&<anonymous>)+8).prevector<28, unsigned char>::_union.prevector<28, unsigned char>::direct_or_indirect::<anonymous>.prevector<28, unsigned char>::direct_or_indirect::<unnamed struct>::indirect' may be used uninitialized in this function [-Wmaybe-uninitialized]
2017-07-14Merge #10618: Remove confusing MAX_BLOCK_BASE_SIZE.Pieter Wuille
3babbcb48 Remove confusing MAX_BLOCK_BASE_SIZE. (Gregory Maxwell) Tree-SHA512: 361293fc4e1e379cd5a0908ed0866a00e1c7a771bdf02fded158fca21b492a29c7a67fea0d13dc40b2a04204c89823bf1836fe5b63a17c9747751b9c845a3527
2017-07-14Merge #10819: Fix uninitialized atomic variablesPieter Wuille
465279114 Fix uninitialized atomic variables (João Barbosa) Tree-SHA512: 5dd8924bc8743a094abdbc2464b835a0e7fd4948c102ea7c2251c6330bea5615c4459ba322a656fd6ac5f8d695b69d3709d225ddccef226cf8afc7de5e3d3019
2017-07-14Remove confusing MAX_BLOCK_BASE_SIZE.Gregory Maxwell
Some people keep thinking that MAX_BLOCK_BASE_SIZE is a separate size limit from the weight limit when it fact it is superfluous, and used in early tests before the witness data has been validated or just to compute worst case sizes. The size checks that use it would not behave any differently consensus wise if they were eliminated completely. Its correct value is not independently settable but is a function of the weight limit and weight formula. This patch just eliminates it and uses the scale factor as required to compute the worse case constants. It also moves the weight factor out of primitives into consensus, which is a more logical place for it.
2017-07-14Clarify entropy sourcePieter Wuille
2017-07-14Merge #10557: Make check to distinguish between orphan txs and old txs more ↵Pieter Wuille
efficient. 18bacec6c Make check to distinguish between orphan txs and old txs more efficient. (Alex Morcos) Tree-SHA512: b6b4bad89aa561975dce7b68b2fdad5623af5ebcb9c38fd6a72b5f6d0544ed441df4865591ac018f7ae0df9b5c60820cb4d9e55664f5667c9268458df70fd554
2017-07-14Merge #10806: build: verify that the assembler can handle crc32 functionsWladimir J. van der Laan
d34d77a build: verify that the assembler can handle crc32 functions (Cory Fields) Pull request description: Also, enable crc32 even if -msse4.2 wasn't added by us, as long as it works. This allows custom flags (such as -march=native) to work as expected. Addresses #10670. Tree-SHA512: e1a41a87b078d270bc645814315b229ad9c16556a4d14fb66b27a65b28d0caf9bf324f8c1e221854992aa17f53466eece06faebbf74d59b3d4ff2e6db6c614a4
2017-07-13Use cpuid intrinsics instead of asm codePieter Wuille
2017-07-13Fix uninitialized atomic variablesJoão Barbosa
2017-07-13[utils] allow square brackets for ipv6 addresses in bitcoin-cliJohn Newbery
-rpcconnect can now accept ipv6 addresses with and without square brackets.
2017-07-13Properly forbid -salvagewallet and -zapwallettxes for multi wallet.Alex Morcos
2017-07-13build: verify that the assembler can handle crc32 functionsCory Fields
Also, enable crc32 even if -msse4.2 wasn't added by us, as long as it works. This allows custom flags (such as -march=native) to work as expected.
2017-07-13[Qt] migrate old fee slider value to new dropbownJonas Schnelli
Always round up (conservative)
2017-07-13[Qt] replace fee slider with a Dropdown, extend conf. targetsJonas Schnelli
2017-07-13Merge #10810: missing white space in function argJonas Schnelli
69a4339ef missing white space in function arg (Lawrence Nahum) Pull request description: Tree-SHA512: 94d832eca0b5429cf48c7c1d4489942b53182c5b7ad9f24264867e7631301173c23a48f7b2e8fd22ff1b3137bafacb3f9d4320f4df235668c9096aaefff7afe8
2017-07-12Merge #10780: Simplify "!foo || (foo && bar)" as "!foo || bar"Pieter Wuille
1e3a3200a Simplify "!foo || (foo && bar)" as "!foo || bar" (practicalswift) Tree-SHA512: d5ce6d7a9f3741e7abe8542b840268aa683e276aac7587041d32385a4c1273e20c236bec7590e27540dde72defb3f879d4695822bb7bfdb092cc20d9aefa64c1
2017-07-13missing white space in function argLawrence Nahum
2017-07-12Merge #9804: Fixes subscript 0 (&var[0]) where should use (var.data()) instead.Pieter Wuille
30ac7688e Fix subscript[0] potential bugs in key.cpp (Jeremy Rubin) 4b1c0f2e2 Remove unnecessary branches in utilstrencodings string constructors. (Jeremy Rubin) e19db7b5a Fix subscript[0] in utilstrencodings.cpp (Jeremy Rubin) bc2e7fd98 Fix subscript[0] in streams.h (Jeremy Rubin) 4cac0d1e0 Fix subscript[0] in validation.cpp (Jeremy Rubin) ac658e55f Fix subscript[0] in torcontrol (Jeremy Rubin) b6856ebed Fix subscript[0] in netaddress.cpp (Jeremy Rubin) 361d95265 Fix subscript[0] in base58.cpp (Jeremy Rubin) 6896dbf16 Cleanup (safe, it was checked) subscript[0] in MurmurHash3 (and cleanup MurmurHash3 to be more clear). (Jeremy Rubin) 96f2119e6 Fix subscript[0] in compressor.cpp (Jeremy Rubin) 500710bd2 Fix 2 subscript[0] bugs in pubkey.cpp, and eliminate one extra size check (Jeremy Rubin) e0451e3e2 Fix subscript[0] bug in net.cpp if GetGroup returns a 0-sized vector (Jeremy Rubin) Tree-SHA512: 5b9103652cf8c615bd8f4f32b3573d291d6b67c39e0308ce00100bc6625f346e8e016b4c999f4f34f5c37ae059490a83c3b513deb21f838af785227d06e02362
2017-07-12Merge #10714: Avoid printing incorrect block indexing time due to ↵Pieter Wuille
uninitialized variable 959dd8781 Avoid printing incorrect block indexing time due to uninitialized variable (practicalswift) Tree-SHA512: a76e43c3ffa734ed5c7eadf363f345f268aa0e6ce775aba8f856fe3bbc82f240dc7c734c5ca3ac500a12eb41fae00623413e79f484d5acf809b6e400851d771d
2017-07-12[refactor] move SplitHostPort() into utilstrencodingsJohn Newbery
This moves SplitHostPort from libbitcoin_common to libbitcoin_util so it is available to bitcoin-cli.
2017-07-12getbalance example covers at least 6 confirmsGregory Sanders
2017-07-12Fix signed/unsigned comparison warning introduced in c8e29d7ff0.Matt Corallo
2017-07-11Merge #10712: Add change output if necessary to reduce excess feeWladimir J. van der Laan
0f402b9 Fix rare edge case of paying too many fees when transaction has no change. (Alex Morcos) 253cd7e Only reserve key for scriptChange once in CreateTransaction (Alex Morcos) Pull request description: This is an alternative to #10333 See commit messages. The first commit is mostly code move, it just moves the change creation code out of the loop. @instagibbs Tree-SHA512: f16287ae0f0c6f09cf8b1f0db5880bb567ffa74a50898e3d1ef549ba592c6309ae1a9b251739f63a8bb622d48f03ce2dff9e7a57a6bac4afb4b95b0a86613ea8
2017-07-11Fix rare edge case of paying too many fees when transaction has no change.Alex Morcos
Due to the iterative process of selecting new coins in each loop a new fee is calculated that needs to be met each time. In the typical case if the most recent iteration of the loop produced a much smaller transaction and we have now gathered inputs with too many fees, we can just reduce the change. However in the case where there is no change output, it is possible to end up with a transaction which drastically overpays fees. This commit addresses that case, by creating a change output if the overpayment is large enough to support it, this is accomplished by rerunning the transaction creation loop without selecting new coins. Thanks to instagibbs for working on this as well
2017-07-11Only reserve key for scriptChange once in CreateTransactionAlex Morcos
This does not affect behavior but allows us to have access to an output to scriptChange even if we currently do not have change in the transaction.
2017-07-11Merge #10786: Add PR description to merge commit in github-merge.pyWladimir J. van der Laan
475c08c Add PR description to merge commit in github-merge.py (Pieter Wuille) Pull request description: There is often some context given in PR descriptions that is missing from commits, and it may be worthwhile to retain that information in our history in git. This PR adds that information to the merge commit when created through `github-merge.py`. We should also encourage people to provide as much information as possible in the PR commits themselves, but I believe that is an orthogonal issue. Individual commits don't need to have a description of the overall goal of a PR. Tree-SHA512: cbae46ec24ce911744e11a07e5d51895d3acc79659db306d8124304ef8e422bba99001ee2a741b08c92a5eb39d9c3f6b723622b20d6553ca5cfa0a8de866194c
2017-07-11Merge #10543: Change API to estimaterawfeeWladimir J. van der Laan
5e3b7b5 Improve error reporting for estimaterawfee (Alex Morcos) 1fafd70 Add function to report highest estimate target tracked per horizon (Alex Morcos) 9c85b91 Change API to estimaterawfee (Alex Morcos) Tree-SHA512: e624c6e7967e9e48abe49f5818bd674e5710e571cc093029d2f90d39fdfba3c1f30e83bf89f6dce97052b59a7d9636a64642ccfb26effd149c417d0afbed0c0b
2017-07-11Merge #10651: Verify binaries from bitcoincore.org and bitcoin.orgWladimir J. van der Laan
6270d62 Verify binaries from bitcoincore.org and bitcoin.org (Matt Corallo) Tree-SHA512: 39e99ce9be3e7c99d17b296749c0af53c867039bc95fd5b03572593c812817decea75e7296bb66e89ba460518210d84114b7bdc22465df621340319b47bd4303
2017-07-11Merge #10792: Replace MAX_OPCODE for OP_NOP10.Wladimir J. van der Laan
c8e29d7 Replace MAX_OPCODE for OP_NOP10. (Mark Friedenbach) Tree-SHA512: f6a4129db24fe3feb044acaec3b94194cc4fa909de3d0a45a664b32f886a7d8ab997c9cb6ff0870c4aee66d8e038cf0453dbbb518316829d15e84da9882f3e69