aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-04Add test for multiwallet batch RPC callsRussell Yanofsky
Tests bug reported in https://github.com/bitcoin/bitcoin/issues/11257
2017-10-04Add missing batch rpc calls to python coverage logsRussell Yanofsky
Without this change, batch RPC calls are not included in coverage logs.
2017-10-04Add missing multiwallet rpc calls to python coverage logsRussell Yanofsky
This fixes a bug in coverage logging that's been around since the logging was introduced.
2017-10-03Merge #11419: Utils: Fix launchctl not being able to stop bitcoindJonas Schnelli
ab5bba778 Fix launchctl not being able to stop bitcoind (Alejandro Avilés) Pull request description: `bitcoind` should not be launched as daemon from the Launch Agent. Otherwise, the process cannot be stopped from `launchctl stop`/`launchctl unload`. To reproduce the issue: ```console $ launchctl load ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist $ pgrep -fla bitcoin 60225 /usr/local/opt/bitcoin/bin/bitcoind $ launchctl unload ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist ``` Wait a few seconds and then run `pgrep` again: ```console $ pgrep -fla bitcoin 60225 /usr/local/opt/bitcoin/bin/bitcoind ``` The node is still running. This happens because Launch Agent is not supposed to run programs as daemons, since the agent makes sure they run in the background. Running them as daemons makes the Launch Agent lose control of the process and, so, it cannot be stopped. Tree-SHA512: 5342e1a858e478a226a1db292f1b8f8666bb252ee951753b131902c325ea3d47592cf245298decb423ac658a3175761b54dc2e7df6feea5343d65ba255613f67
2017-10-04[gui] reset addrProxy/addrSeparateProxyTor if colon char missingCristian Mircea Messel
If addrProxy or addrSeparateProxyTor do not have a colon in the string somewhere in the QSettings storage, then attempting to open the options dialog will cause the entire program to crash.
2017-10-03Make AuthServiceProxy._batch method usableRussell Yanofsky
Split off AuthServiceProxy.get_request method to make it easier to batch RPC requests without duplicating code and remove leading underscore from _batch method. This does not change any existing behavior.
2017-10-03Merge #11433: qa: Restore bitcoin-util-test py2 compatibilityMarcoFalke
fafff1220 qa: Restore bitcoin-util-test py2 compatibility (MarcoFalke) Pull request description: Currently `./configure && make check` will look for python3, then python2. As long as we support python2 (and use it as fallback), `make check` should run fine with both python2 and python3. Fixes #11352 by @Zenitur Tree-SHA512: a335ebdd224328d6f924fe52a9b97de196926476c9ee04ce3280743ea93bcae355eb2d5d4bed4050c01b2e904105595eac7db2eaa9307207581caa0a98ebcc0b
2017-10-03Limit AuthServiceProxyWrapper.__getattr__ wrappingRussell Yanofsky
Change AuthServiceProxyWrapper.__getattr__ to only wrap proxied attributes, not real attributes. This way AuthServiceProxyWrapper can continue logging RPC calls without complicating other object usages, and special case handling for the .url property can be dropped.
2017-10-03Fix uninitialized URI in batch RPC requestsRussell Yanofsky
This fixes "Wallet file not specified" errors when making batch wallet RPC calls with more than one wallet loaded. This issue was reported by NicolasDorier <nicolas.dorier@gmail.com> https://github.com/bitcoin/bitcoin/issues/11257 Request URI is not used for anything except multiwallet request dispatching, so this change has no other effects. Fixes #11257
2017-10-03[test] P2P functional test for certain fingerprinting protectionsJim Posen
2017-10-03[net] Ignore getheaders requests for very old side blocksJim Posen
Sending a getheaders message with an empty locator and a stop hash is a request for a single header by hash. The node will respond with headers for blocks not in the main chain as well as those in the main chain. To avoid fingerprinting, the node should, however, ignore requests for headers on side branches that are too old.
2017-10-03Merge #11293: Deduplicate CMerkleBlock construction code, add test coverageMarcoFalke
46ce223d1 Add tests for CMerkleBlock usage with txids specified (James O'Beirne) 5ab586f90 Consolidate CMerkleBlock constructor into a single method (James O'Beirne) Pull request description: What started as a simple task to add test coverage ended up giving way to a light refactoring. This consolidates the mostly-identical `CMerkleBlock` constructors into one (using C++11 constructor delegation) and adds coverage for the by-txids construction case. ### Before ![selection_006](https://user-images.githubusercontent.com/73197/30242104-0f381fe4-9545-11e7-9617-83b87fce0456.png) ### After ![selection_008](https://user-images.githubusercontent.com/73197/30242107-1425dfaa-9545-11e7-9e6b-2c3432517dd1.png) Tree-SHA512: eed84ed3e8bfc43473077b575c8252759a857e37275e4b36ca7cc2c17a65895e5f494bfd9d4aeab09fc6e98fc6a9c641ac7ecc0ddbeefe01a9e4308e7909e529
2017-10-03[Docs] Update Windows build instructions for using WSL and Ubuntu 17.04fanquake
2017-10-02Fix validationinterface build on super old boost/clangMatt Corallo
This should fix all the non-dependancy issues for termux builds. See Github issue #11388.
2017-10-02Merge #11407: [tests] add functional test for mempoolreplacement command ↵MarcoFalke
line arg 1088b5322 add functional test for mempoolreplacement command line arg (Gregory Sanders) Pull request description: Currently untested. Tree-SHA512: 2dd9d55a3499844e48b3774df9155fd650220b0761da45d16869570356bb0ed17a88d4efa4302a517dd96e1e9cb34113661b3c9df688736f6849201a3d544deb
2017-10-02Merge #11365: [Tests] Add Qt GUI tests to Overview and ReceiveCoin PageMarcoFalke
634e38ca7 [Tests] Add Qt GUI tests to Overview and ReceiveCoin Page (Anditto Heristyo) Pull request description: I've added some Qt wallet tests based on #9974, namely the input & buttons on ReceiveCoin. Tree-SHA512: f4223827145e35c2abee83a6ca777498bebcff3825fece10fbb1dbfd1f6bb017d3f2c0521662854b4407cdeee9c6a527269ab9cc28e0dc85c11b668155fcd195
2017-10-02Avoid NULL pointer dereference when _walletModel is NULL (which is valid)practicalswift
2017-10-02Use two boolean literals instead of re-using variablepracticalswift
2017-10-02Remove duplicate uriParts.size() > 0 checkpracticalswift
2017-10-02Remove redundant check (!ecc is always true)practicalswift
2017-10-02Remove redundant NULL checks after newpracticalswift
2017-10-02Merge #11021: [rpc] fix getchaintxstats()Wladimir J. van der Laan
07704c1 Add some tests for getchaintxstats (Akio Nakamura) 3336676 Fix getchaintxstats() (Akio Nakamura) Pull request description: 1. calculate nblocks more adaptive. -> set default nblocks to min (blocks for 1 month, target block's height - 1) -> before PR: if not specify nblocks-parameter, illegal parameter error will happen when target block height is below nblocks. 2. correct error message. -> nblocks accepts [1 .. block's height -1] . so add a word "-1". 3. add check 0-divide. -> if nTimeDiff = 0 then use UniValue(UniValue::VNULL) and returns {... "txrate": null} . -> before PR: if nTimeDiff = 0 then returns {... "txrate":} and bitcoin-cli cannot handle the response. Tree-SHA512: e1962ce7bb05a5bc7dec03eb04a8e7578f50fdb68927fcfc0a2232905ef4d679293eee148ebe0866682d209a8c458d21fbe71715e7311adb81f37089aae1ed93
2017-10-02Merge #11411: script: Change SignatureHash input index check to an assert.Wladimir J. van der Laan
5ddf560 script: Change SignatureHash input index check to an assert. (Jim Posen) Pull request description: In the SignatureHash function, the input index must refer to a valid index. This is not enforced equally in the segwit/non-segwit branches and should be an assertion rather than returning a error hash. Tree-SHA512: a775fc9e9bd9835c0ab36368aa45ab3d53e38f31fd4d2b8684a77ee6028c854c363df038681a59358b30138957573ad63b71d4a722c16e0830fb4fa72669ef39
2017-10-02Merge #11193: [Qt] Terminate string *pszExePath after readlink and without ↵Wladimir J. van der Laan
using memset 3a4401a [Qt] Terminate string *pszExePath after readlink and without using memset (practicalswift) Pull request description: Terminate string `*pszExePath` after `readlink` and before passing to operator `<<`. * `ssize_t readlink(const char *pathname, char *buf, size_t bufsiz)` does not append a null byte to `buf`. * Operator `<<` expects a null-terminated string. Tree-SHA512: fc18844bb23059fead8db0cb9b4b4ba6188f58e3f19ab4719c2737cc5dd6df23ae7d4804ef2820d39b334204a48ee3de1d202c272bcd156e60761af2fcb9349d
2017-10-02Merge #11432: Remove unused fTry from push_lockWladimir J. van der Laan
92848e5 Remove unused fTry from push_lock (João Barbosa) Pull request description: After #9674 (618ee92) the `fTry` argument in `push_lock` is no longer needed. Tree-SHA512: a461f2ca9e590a9dfcc7814d9852d85f03712cb4735176b8b2db0e8dc731597c2a515650998ca7d53cf5a0c48b408a974a0704897036c6ed74788fc24c5e73ae
2017-10-02Merge #11399: Fix bip68-sequence rpc testWladimir J. van der Laan
49f869f Fix bip68-sequence rpc test (Johnson Lau) Pull request description: The test mined 1 extra block for the ACTIVE state. Test added to catch the right moment of LOCKED_IN->ACTIVE transaction Tree-SHA512: a42477cf0b137e7e3b7c6c7b2530101cfad4e4f59866170b8fc0d655c43b3144aad6bca4287a4a8df4c28d7cf08d3f8df166975ad2e8dcb7d2cc15de60cf11cd
2017-10-02Merge #11284: Fix invalid memory access in CScript::operator+= ↵Wladimir J. van der Laan
(guidovranken, ajtowns) d601f16 Fix invalid memory access in CScript::operator+= (Anthony Towns) Pull request description: This is a fix for #11114 -- invoking "s += s" gets turned into "s.insert(s.end(), s.begin(), s.end())" which can result in an invalid memory access is s.capacity() < 2*s.size() (because s gets resized and possibly moved, so s.begin() and s.end() become invalid references when reading the values to be appended). The fix is straightforward: reserve enough space in advance, so that insert() doesn't need to resize and thus its arguments remain valid. A simple test case is added as well; though you probably need to run it via valgrind to actually catch the problem when it's not fixed... Tree-SHA512: 4720d0c17463fdc43b344c45fe603423d20b30d48da1b9d85eeedc505d7f34db1ed5495ef1556459ae962a94717e3c6e8fc441763771901efea210d01322b7ef
2017-10-02Merge #11422: qa: Verify DBWrapper iterators are taking snapshotsWladimir J. van der Laan
bb8376b Verify DBWrapper iterators are taking snapshots (Matt Corallo) Pull request description: The LevelDB docs seem to indicate that an iterator will not take snapshots (even providing instructions on how to do so yourself). In several of the places we use them, we assume snapshots to have been taken. In order to make sure LevelDB doesn't change out from under us (and to prevent the next person who reads the docs from having the same fright I did), verify that snapshots are taken in our tests. Tree-SHA512: 54f24dabc294962e9c20882f61809604421a661208d1568bb107102248603e8e7c12e929ccb0812a73d4e4f23fea61f1b48e7cc24da5a7260f1d14d89ba88cd6
2017-10-02qa: Fix lcov for out-of-tree buildsMarcoFalke
2017-10-02Add new step to clean $PATH var by removing /mnt specific Window's %PATH% ↵Donal OConnor
paths that cause issues with the make system
2017-10-01qa: check-rpc-mapping must not run on empty listsMarcoFalke
2017-10-01qa: Restore bitcoin-util-test py2 compatibilityMarcoFalke
2017-09-30Remove unused fTry from push_lockJoão Barbosa
2017-09-30Verify DBWrapper iterators are taking snapshotsMatt Corallo
The LevelDB docs seem to indicate that an iterator will not take snapshots (even providing instructions on how to do so yourself). In several of the places we use them, we assume snapshots to have been taken. In order to make sure LevelDB doesn't change out from under us (and to prevent the next person who reads the docs from having the same fright I did), verify that snapshots are taken in our tests.
2017-09-30Merge #11303: Fix estimatesmartfee rounding display issueMarcoFalke
1789e4675 Force explicit double -> int conversion for CFeeRate constructor (Matt Corallo) 53a6590f4 Make float <-> int casts explicit outside of test, qt, CFeeRate (Matt Corallo) 0b1b9148c Remove countMaskInv caching in bench framework (Matt Corallo) Pull request description: This fixes an issue where estimatesmartfee which matches at the min relay fee will return 999 sat/byte instead of 1000 sat/byte due to a float rounding issue. I went ahead and made all float <-> int conversion outside of test/qt explicit (test only had one or two more, Qt had quite a few, including many in the Qt headers themselves) and added overloads to CFeeRate to force callers to do an explicit round themselves. Easy to test with -Wfloat-conversion. Tree-SHA512: 66087b08e5dfca67506da54ae057c2f9d86184415e8fa4fa0199e38839e06a3ce96c836fcb7593b7d960065f5240c594ff3a0cfa14333ac528421f5aeac835c9
2017-09-30Merge #11391: Remove lxcbr0 lines from gitian-build.shMarcoFalke
884913041 Remove lxcbr0 lines from gitian-build.sh (MeshCollider) Pull request description: The `gitian-build.sh` script crashes with an error when I tried to use it, @kallewoof also had this same issue: lxcbr0: ERROR while getting interface flags: No such device SIOCSIFADDR: No such device lxcbr0: ERROR while getting interface flags: No such device And then: lxc-execute: failed to find gateway addresses lxc-execute: failed to spawn 'gitian' ./bin/gbuild:21:in `system!': failed to run make-clean-vm --suite trusty --arch amd64 (RuntimeError) I believe it's because of the two lines which this PR removes, I tested it and seems to work as expected now. These lines are unique to this script and aren't mentioned in `gitian-building.md` or `release-process.md`. We discussed it on IRC, @achow101 agrees removing these lines would probably fix it: https://botbot.me/freenode/bitcoin-core-dev/2017-09-19/?msg=91299782&page=2 Has anyone successfully used this script as-is? Or does everyone else manually run the builds/write their own script like I have up til this point? Tree-SHA512: 0cffd3df307ad107fb1d4bae45094fc5002b56c2fe64f03642d968659fdc62f586ba249dbc540b69058b276f2456962e5bc4d665cab21ef1f561735eb78afcc2
2017-09-29Merge #11418: Add error string for CLEANSTACK script violationPieter Wuille
cee28fbc3 Add error string for CLEANSTACK script violation, preventing an "unknown error" if the CLEANSTACK error condition is set. (Mark Friedenbach) Pull request description: This prevents an unhelpful "unknown error" from being printed in test logs if the CLEANSTACK error condition is set. Tree-SHA512: cd6764e930184aef3d662e40c67f2ea8aea8552a26d33a567d0315a19d707a82aa2afad9f48ecbb731aa5b77fbbfbd7a6a3a989fdb1424a1181350052ff2a9b5
2017-09-29[rpc] getblockchaininfo: add size_on_disk, prune_target_size, automatic_pruningDaniel Edgecumbe
Fix pruneheight help text. Move fPruneMode block to match output ordering with help text. Add functional tests for new fields in getblockchaininfo.
2017-09-29Merge #11319: [qa] Fix error introduced into p2p-segwit.py, and prevent ↵MarcoFalke
future similar errors f97ab35fa qa: Fix bug introduced in p2p-segwit.py (Suhas Daftuar) a7820422e qa: Treat mininode p2p exceptions as fatal (Suhas Daftuar) Pull request description: #11121 inadvertently broke the constructor for the `TestNode()` object in `p2p-segwit.py`, silently breaking at least one of the tests. Although the python code was raising exceptions due to a `TestNode()` object not existing (or having the right type), mininode was masking these from anyone running the test through the test_runner (like travis), because it catches all exceptions during message delivery and just prints a log message and continues. Such "graceful" handling of errors is almost certainly something we don't want in our test suite, so the first commit here attempts to prevent that type of failure from ever being masked. The second commit fixes the particular bug in `p2p-segwit.py`. Tree-SHA512: b6646e3cb1e05c35c28e8899c44104bf2e2d0384643ca87042ab7f6ec0960d89f5bf25a7b95bab6e32d401c20a6018226160500f6ddceb923e81ffb04adb4f2f
2017-09-29Merge #10552: [Test] Tests for zmqpubrawtx and zmqpubrawblockMarcoFalke
d3677ab75 Tests for zmqpubrawtx and zmqpubrawblock (Andrew Chow) Pull request description: Tree-SHA512: 9e367fd8936514bfb567ef3f3d83770d374287354b59c9187e844056dd086e8aa2de32ce55d35486cecd706e7c93cd1c1e2709ee82d3dddb805827be8d2bcb14
2017-09-29add functional test for mempoolreplacement command line argGregory Sanders
2017-09-29Bump secp256k1 subtreeMarcoFalke
2017-09-29Squashed 'src/secp256k1/' changes from 84973d393..0b7024185MarcoFalke
0b7024185 Merge #474: Fix header guards using reserved identifiers ab1f89f00 Merge #478: Fixed multiple typos 8c7ea22d5 Fixed multiple typos abe2d3e84 Fix header guards using reserved identifiers f532bdc9f Merge #459: Add pubkey prefix constants to include/secp256k1.h cac7c5559 Merge #470: Fix wnaf_const documentation 768514bac Fix wnaf_const documentation with respect to return value and number of words set b8c26a399 Merge #458: Fix typo in API documentation 817fb2013 Merge #440: Fix typos 12230f90e Merge #468: Remove redundant conditional expression 2e1ccdca0 Remove redundant conditional expression bc61b91ac add pubkey prefix constants to include/secp256k1.h b0452e664 Fix typo in API documentation 4c0f32ed5 Fix typo: "Agressive" → "Aggressive" 73aca8364 Fix typo: "exectured" → "executed" git-subtree-dir: src/secp256k1 git-subtree-split: 0b7024185045a49a1a6a4c5615bf31c94f63d9c4
2017-09-29Merge #11309: Minor cleanups for AcceptToMemoryPoolMarcoFalke
bf64c3cb3 Ignore transactions added to mempool during a reorg for fee estimation purposes. (Alex Morcos) 04f78ab5b Do not reject based on mempool min fee when bypass_limits is set. (Alex Morcos) fd849e1b0 Change AcceptToMemoryPool function signature (Alex Morcos) Pull request description: First commit just removes default arguments from `AcceptToMemoryPool` and consolidates two arguments, it does not change behavior. Second commit finally fixes the fact that we're not meant to reject based on mempool min fee when adding a transaction from a disconnected block during a reorg as mentioned [here](https://github.com/bitcoin/bitcoin/pull/9602#issue-202197849) Third commit makes fee estimation ignore transactions added from a disconnected block during a reorg. I think this was another source of fee estimates returning estimates below 1000 sat/kB as in #11303. Tree-SHA512: 30925ca8b341915bb214f1d2590b36b7931f2e125b7660150e38ae70338f00db5aa7f1608546dddb181446924177eb7cf62ea8bd2583068acc074d6c3f86bc0c
2017-09-29Bump univalue and fix json formatting in testsMarcoFalke
This merge commit bumps the univalue subtree and also updates the whitespace for some failing tests.
2017-09-29Squashed 'src/univalue/' changes from 16a1f7f6e..fe805ea74MarcoFalke
fe805ea74 Declare single-argument (non-converting) constructors "explicit" 8a2d6f1e3 Merge pull request #41 from jgarzik/get-obj-map ba341a20d Add getObjMap() helper method. Also, constify checkObject(). ceb119413 Handle .pushKV() and .checkObject() edge cases. 107db9829 Add ::push_back(double) method for feature parity. d41530031 Move one-line implementation of UniValue::read() to header. 52e85b35b Move exception-throwing get_* methods into separate implementation module. dac529675 README.md: update code quotes 3e31dcffb README.md: close code quote d09b8429d Update README.md f1b86edb4 Convert README to markdown style. 1dfe464ef Import UniValue class unit tests from bitcoin project. 0d3e74dd1 operator[] takes size_t index parameter (versus unsigned int) 640158fa2 Private findKey() method becomes size_t clean, and returns bool on failure. 709913585 Merge pull request #36 from ryanofsky/pr/end-str a31231b51 Version 1.0.3 4fd5444d1 Reject unterminated strings 81eba332b Merge pull request #26 from isle2983/pushBackHelpers 36405413e Merge PR #32 from branch 'nul-not-special' of git://github.com/ryanofsky/univalue into merge 89bb07322 Merge pull request #31 from ryanofsky/raw-literals 511008c36 Merge pull request #30 from ryanofsky/test-driver 77974f3a9 Merge pull request #34 from paveljanik/20161116_Wshadow_codepoint a38fcd355 Do not shadow member variable codepoint. fd32d1ab8 Don't require nul-terminated string inputs 0bb1439d0 Support parsing raw literals in UniValue 28876d045 Merge pull request #29 from btcdrak/exportspace 839ccd71f Add test driver for JSONTestSuite 26ef3fff1 Remove trailing whitespace from JSON export cfa0384d6 Convenience wrappers for push_back-ing integer types REVERT: 16a1f7f6e Merge #3: Pull upstream REVERT: daf1285af Merge pull request #2 from jgarzik/master REVERT: f32df99e9 Merge branch '2016_04_unicode' into bitcoin REVERT: 280b191cb Merge remote-tracking branch 'jgarzik/master' into bitcoin REVERT: 2740c4f71 Merge branch '2015_11_escape_plan' into bitcoin git-subtree-dir: src/univalue git-subtree-split: fe805ea74f8919382720b09a905a14e81311b3ad
2017-09-29Fix launchctl not being able to stop bitcoindAlejandro Avilés
bitcoind should not be launched as daemon from launchctl. Otherwise, the process cannot be stopped from launchctl.
2017-09-29Add error string for CLEANSTACK script violation, preventing an "unknown ↵Mark Friedenbach
error" if the CLEANSTACK error condition is set.
2017-09-29Merge #11414: [docs] Remove partial gitian build instructions from ↵Wladimir J. van der Laan
descriptors dir. bb174e1 [docs] Remove partial gitian instructions from descriptors dir (fanquake) Pull request description: Cleanup after #11401. Tree-SHA512: 9378463d3dd7a3c5b41388749002aef767581de28c92c19c89cc39c4e8ec5959f91d0232c6333e440c157d448be2f686dbcc7099aedd9510e4b36807690201fc
2017-09-29Merge #11417: Correct typo in commentsWladimir J. van der Laan
6f33d8c Correct typo in comments (Johnson Lau) Pull request description: I think this is a search and replace mistake Tree-SHA512: a83e081b817f1607496bfdcee47593d45d75cbe72effe944cdb5494b49a341eeeebdeb954f6db59dfa1ddfa350a117a4b26c754725a3459be78f2a1a093c6fde