aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-11-02net: use an interface class rather than signals for message processingCory Fields
Drop boost signals in favor of a stateful class. This will allow the message processing loop to actually move to net_processing in a future step. Github-Pull: #10756 Rebased-From: 8ad663c1fa88d68843e45580deced56112343183
2017-11-02net: pass CConnman via pointer rather than referenceCory Fields
There are a few too many edge-cases here to make this a scripted diff. The following commits will move a few functions into PeerLogicValidation, where the local connman instance can be used. This change prepares for that usage. Github-Pull: #10756 Rebased-From: 28f11e9406b185dc87144f1f29af0d93eb115b4e
2017-11-02Rename fAddnode to a more-descriptive "manual_connection"Matt Corallo
Github-Pull: #11456 Rebased-From: 57edc0b0c86549020a39cd65f96496e9771c4769
2017-11-02Add comment explaining forced processing of compact blocksSuhas Daftuar
Github-Pull: #11458 Rebased-From: 01b52cedd42f50a93b40981c91af7c12de6e45ce
2017-11-02Don't process unrequested, low-work blocksSuhas Daftuar
A peer could try to waste our resources by sending us unrequested blocks with low work, eg to fill up our disk. Since e2652002b6011f793185d473f87f1730c625593b we no longer request blocks until we know we're on a chain with more than nMinimumChainWork (our anti-DoS threshold), but we would still process unrequested blocks that had more work than our tip. This commit fixes that behavior. Github-Pull: #11458 Rebased-From: ce8cd7a7da9174ab151172fc0ce97b5164637cf3
2017-11-02Allow setting nMinimumChainWork on command lineSuhas Daftuar
Github-Pull: #10357 Rebased-From: 0311836f6927aec4ba5687ea12af35df3c509682
2017-11-01Avoid opening copied wallet databases simultaneouslyRussell Yanofsky
Make sure wallet databases have unique fileids. If they don't, throw an error. BDB caches do not work properly when more than one open database has the same fileid, because values written to one database may show up in reads to other databases. Bitcoin will never create different databases with the same fileid, but users can create them by manually copying database files. BDB caching bug was reported by Chris Moore <dooglus@gmail.com> https://github.com/bitcoin/bitcoin/issues/11429 Fixes #11429 Github-Pull: #11476 Rebased-From: 478a89c1ef79a75275d1b508122c06eee9386b2d
2017-11-01[wallet] Fix leak in CDB constructorJoão Barbosa
Now using a std::unique_ptr, the Db instance is correctly released when CDB initialization fails. The internal CDB state and mapFileUseCount are only mutated when the CDB initialization succeeds. Github-Pull: #11492 Rebased-From: 7104de8b1f3a31d3a60009b5dc376adbedac6a9c
2017-11-01Ensure backupwallet fails when attempting to backup to source fileTomas van der Wansem
Previous behaviour was to destroy the wallet (to zero-length) Github-Pull: #11376 Rebased-From: 5d465e396249a0e2cc60b16984a2bdbe4c8993c3
2017-11-01Make listsinceblock refuse unknown block hashRussell Yanofsky
Change suggested by Cory Fields <cory-nospam-@coryfields.com> who noticed listsinceblock would ignore invalid block hashes causing it to return a completely unfiltered list of transactions. Github-Pull: #11565 Rebased-From: 659b2061c4329472a45e913c5d45e6ab180600a3 Tree-SHA512: 2091a830b730421b49c806cb83a16c7da2ec0a7adac2bac0585324aad12a32bb99a840264c3d346937ea84786fac56e44befb6641511a417977803875efe5a21
2017-10-19Remove my testnet DNS seed as I currently don't have the capacity to keep it ↵Andreas Schildbach
up to date. Github-Pull: #11527 Rebased-From: 132d3225f325b84afc282638c9e99623d249a52c Tree-SHA512: 3738afd8070fa601b5039e268088b7f3827613dbc37fae192b96b13c91f56d41fa3209533a3cad876c4e673b19015aabfce331b0b5f46a0ac518d00816e912a4
2017-10-18Merge #11447: 0.15.1: BackportsWladimir J. van der Laan
20cdc2b Fix importmulti bug when importing an already imported key (Pedro Branco) 405e069 Update importprivkey named args documentation (Dusty Williams) c94527a [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 (fanquake) 27e861a net: Improve and document SOCKS code (Wladimir J. van der Laan) dea3b87 Add new step to clean $PATH var by removing /mnt specific Window's %PATH% paths that cause issues with the make system (Donal OConnor) a43be5b rpc: Prevent `dumpwallet` from overwriting files (Wladimir J. van der Laan) b6c0209 Fix validationinterface build on super old boost/clang (Matt Corallo) 6a62c74 qt: Backup former GUI settings on `-resetguisettings` (Wladimir J. van der Laan) 0fe2a9a when clearing addrman clear mapInfo and mapAddr (Gregory Sanders) 6b4d9f2 wallet: update stored witness in AddToWallet (Suhas Daftuar) 62d18cd doc: Prepare release notes for 0.15.1 (MarcoFalke) 8b61aee Put back inadvertently removed copyright notices (Paul Berg) 75997c3 Disallow uncompressed pubkeys in bitcoin-tx [multisig] output adds (Matt Corallo) 8d13b42 Replace save|restoreWindowGeometry with Qt functions (MeshCollider) 6642558 [Qt] Add delay before filtering transactions Fixes 3141 (Lucas Betschart) 19d63e8 Remove custom fee radio group (Andrew Chow) b1a6c94 rpc: make estimatesmartfee argument naming consistent with documentation (Wladimir J. van der Laan) 921542e rpc: update cli for estimatefee argument rename (Wladimir J. van der Laan) 2e31b1d Fix division by zero in time remaining (MeshCollider) 47c02a8 qt: Use IsMine to validate custom change address (Chris Moore) 7310f1f [Qt] Fix display of package name on 'open config file' tooltip (Daniel Edgecumbe) 2cb720a Acquire cs_main lock before cs_wallet during wallet initialization (Russell Yanofsky) b278a43 rpc: Write authcookie atomically (Wladimir J. van der Laan) 50bd3f6 Avoid returning a BIP9Stats object with uninitialized values (practicalswift) 9e8aae3 [wallet] Close DB on error. (Karl-Johan Alm) Pull request description: This mostly backports various commits that fix(ed) bugs and issues. However, it also includes two patches for qt that only fix minor issues, as well as some doc patches. Tree-SHA512: 5165e309faf6b4395fdf2f6662ccc0d58306971f3769e675504f17b2055efe29b2919f22d0dbf78c4c2dc7fd5c9d08a2c53345615e4a1df73914526687c9d571
2017-10-17Fix importmulti bug when importing an already imported keyPedro Branco
Github-Pull: #11483 Rebased-From: a44a215177ab55b4a3b36a7980c313e908e2dd18
2017-10-09Update importprivkey named args documentationDusty Williams
Fixes #11462. Updated documentation for importprivkey function to use the correct name for the first argument. Also updates a call to importprivkey to use named args in functional test. Github-Pull: #11465 Rebased-From: aa57590d7c5eab1df5443e8ac9ed53ad0db46c02
2017-10-09net: Improve and document SOCKS codeWladimir J. van der Laan
Make the SOCKS code more consistent, and document the constants used. Github-Pull: #11397 Rebased-From: 22f816ef4dd57785627d801c247714cace7fc5b5
2017-10-04rpc: Prevent `dumpwallet` from overwriting filesWladimir J. van der Laan
Prevent arbitrary files from being overwritten. There have been reports that users have overwritten wallet files this way. It may also avoid other security issues. Fixes #9934. Adds mention to release notes and adds a test. Github-Pull: #9937 Rebased-From: 0cd9273fd959c6742574259d026039f7da0309a2
2017-10-04qa: Restore bitcoin-util-test py2 compatibilityMarcoFalke
Github-Pull: #11433 Rebased-From: fafff1220cf798e25f02cdd8affb70506dd366cc
2017-10-04Fix validationinterface build on super old boost/clangMatt Corallo
This should fix all the non-dependancy issues for termux builds. See Github issue #11388. Github-Pull: #11440 Rebased-From: 96c2ce9d343147608c197bc2333138b82141340f
2017-10-04qt: Backup former GUI settings on `-resetguisettings`Wladimir J. van der Laan
Writes the GUI settings to `guisettings.bak` in the data directory before wiping them. This can be used to retroactively troubleshoot issues (e.g. #11262) where `-resetguisettings` solves the problem. Github-Pull: #11338 Rebased-From: 723aa1b8752c1d6c6c0a76059c532ebe2f406fc1
2017-10-04when clearing addrman clear mapInfo and mapAddrGregory Sanders
Github-Pull: #11252 Rebased-From: b86a42077a134888c53bfd406b87bf0a39c78264
2017-10-04wallet: update stored witness in AddToWalletSuhas Daftuar
Replace witness-stripped wallet transactions with full transactions; this can happen when upgrading from a pre-segwit wallet to a segwit- aware wallet. Github-Pull: #11225 Rebased-From: d01a9682b126a5f83c7311e652e6e62f2c2e1d20
2017-10-03Verify 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. Github-Pull: #11422 Rebased-From: bb8376bbc3d96af727444f90e5f60d47105609dc
2017-10-03[script] Unit tests for IsMineJim Posen
Does not test watch-only addresses. Github-Pull: #11116 Rebased-From: 7a1e873b27b790c965d9927ecd465710dc103136
2017-10-03[script] Unit tests for script/standard functionsJim Posen
Github-Pull: #11116 Rebased-From: d7afe2d1577eb3f6775301c81b94a191e0db99d9
2017-10-03Disallow uncompressed pubkeys in bitcoin-tx [multisig] output addsMatt Corallo
Github-Pull: #11377 Rebased-From: 28d4542a0ac77a30a242d0568e580a5b437f53fa
2017-10-03Replace save|restoreWindowGeometry with Qt functionsMeshCollider
Github-Pull: #11335 Rebased-From: 13baf7217bf8394ae02efc376208ae86eac4d0f6
2017-10-03[Qt] Add delay before filtering transactionsLucas Betschart
Fixes 3141 Github-Pull: #11015 Rebased-From: 7b137acedd5e2ff3fe5395a927c546a528b0cac6
2017-10-03Remove custom fee radio groupAndrew Chow
Removes the extraneous custom fee radio group and its single radio button. The radio button is replaced with a label that has the radio button's text. Github-Pull: #11334 Rebased-From: e53fa4a1ca58ef46416c4a96542722601fb75c5a
2017-10-03rpc: make estimatesmartfee argument naming consistent with documentationWladimir J. van der Laan
Github-Pull: #11267 Rebased-From: 5acd82de9ad6df8cab922da66d49b8ff2bd35439
2017-10-03rpc: update cli for estimatefee argument renameWladimir J. van der Laan
The first argument of estimatesmartfee was renamed from nblocks to conf_target in 06bcdb8da64502a64df03f3c89fbc6ccb72cd349. Update the client-side table as well. Github-Pull: #11267 Rebased-From: 24697c40ee6739b812259140042d426c81179977
2017-10-03Fix division by zero in time remainingMeshCollider
Github-Pull: #11237 Rebased-From: 3b69a08c53c2ef738f32c270fdacf1e4ed5a4c97
2017-10-03Stop test_bitcoin-qt touching ~/.bitcoinMeshCollider
Github-Pull: #11210 Rebased-From: dea086f498097d19a2c9acbfc753c9c2d68dbb03
2017-10-03qt: Use IsMine to validate custom change addressChris Moore
(cherry picked from commit c41224dfd51c896341bbf2fa23e160bf5ffe27c3) Github-Pull: #11247 Rebased-From: a1ea1cfbd8d4fc976f0ab2423d395e03ded6eedd
2017-10-03Remove redundant testutil filesMeshCollider
Github-Pull: #11234 Rebased-From: d1138e36208dac87a27f415f39c70377636e93f1
2017-10-03[Qt] Fix display of package name on 'open config file' tooltipDaniel Edgecumbe
Github-Pull: #11198 Rebased-From: 14ccd4d8d1847d64903224562ad3c7eb795b3781
2017-10-03RPC: gettxout: Slightly improve doc and testsJorge Timón
Github-Pull: #10859 Rebased-From: 6d2d2eb49389d70a5db327e133c9c90748f82d5f
2017-10-03Acquire cs_main lock before cs_wallet during wallet initializationRussell Yanofsky
CWallet::MarkConflicted may acquire the cs_main lock after CWalletDB::LoadWallet acquires the cs_wallet lock during wallet initialization. (CWalletDB::LoadWallet calls ReadKeyValue which calls CWallet::LoadToWallet which calls CWallet::MarkConflicted). This is the opposite order that cs_main and cs_wallet locks are acquired in the rest of the code, and so leads to POTENTIAL DEADLOCK DETECTED errors if bitcoin is built with -DDEBUG_LOCKORDER. This commit changes CWallet::LoadWallet (which calls CWalletDB::LoadWallet) to acquire both locks in the standard order. It also fixes some tests that were acquiring wallet and main locks out of order and failed with the new locking in CWallet::LoadWallet. Error was reported by Luke Dashjr <luke-jr@utopios.org> in https://botbot.me/freenode/bitcoin-core-dev/msg/90244330/ Github-Pull: #11126 Rebased-From: de9a1db2ed14e0c75ffd82dc031f7ad30c56d195
2017-10-03rpc: Write authcookie atomicallyWladimir J. van der Laan
Use POSIX rename atomicity at the `bitcoind` side to create a working cookie atomically: - Write `.cookie.tmp`, close file - Rename `.cookie.tmp` to `.cookie` This avoids clients reading invalid/partial cookies as in #11129. Github-Pull: #11131 Rebased-From: 82dd7195e1fb943f9cd45a48188f9678219c0206
2017-10-03Avoid returning a BIP9Stats object with uninitialized valuespracticalswift
Uninitialized data potentially used in `rpc/blockchain.cpp`: ``` static UniValue BIP9SoftForkDesc(const Consensus::Params& consensusParams, Consensus::DeploymentPos id) { ... const ThresholdState thresholdState = VersionBitsTipState(consensusParams, id); ... if (THRESHOLD_STARTED == thresholdState) { UniValue statsUV(UniValue::VOBJ); BIP9Stats statsStruct = VersionBitsTipStatistics(consensusParams, id); statsUV.push_back(Pair("period", statsStruct.period)); statsUV.push_back(Pair("threshold", statsStruct.threshold)); statsUV.push_back(Pair("elapsed", statsStruct.elapsed)); statsUV.push_back(Pair("count", statsStruct.count)); statsUV.push_back(Pair("possible", statsStruct.possible)); rv.push_back(Pair("statistics", statsUV)); } ... return rv; } ``` Github-Pull: #10957 Rebased-From: 3eb53b867153c957529484b5338d27e69de027c1
2017-10-03[wallet] Close DB on error.Karl-Johan Alm
Github-Pull: #11017 Rebased-From: 03bc719a85cb4928cb4b43d0bc4142f72cb01b23
2017-09-15qt: Translations update pre-0.15.0.1Wladimir J. van der Laan
Tree-SHA512: 942fbba8a959ec5430afeecbb663731944fd646fa3b997252e599d835faff12f329d1b70509b161275c3c88845de031357c8317d7f7c801e24be488912cf4035
2017-09-15Fix Qt 0.14.2->0.15.0 segfault if "total at least" is selectedMatt Corallo
A button was removed, so now button(1) is nullptr Github-Pull: #11332 Rebased-From: cdaf3a1f9e93be273ebf3e470dc709828c55476c Tree-SHA512: 0a49bf4e9ab08e5869170c8a212da60c9a6b90c36427d788de384aa4be6d87bb5e00a21edf78eed34f81bbc554b6f15565bb9b493dafcbfe9d6f4664d7424d9d
2017-08-28qt: Translation update pre-rc3v0.15.0rc3Wladimir J. van der Laan
Tree-SHA512: d813ef923d804722bc161cc62e09ee003b386c0abf2d513ede671e9f14ac4c3df749a9f23ddcba9400fcc335dbef6540e47a212dca8ddc0a3d73aee01f098754
2017-08-28Changing -txindex requires -reindex, not -reindex-chainstateMatt Corallo
Github-Pull: #11108 Rebased-From: cd0ea487422028bec1f5df62ab4c57909c2bcc90 Tree-SHA512: 0fbd50b1343eec14301ee9c2fc76e48dcb1610ce1ddbf3cccbd937e2c0d1bbdfc4920fbc05e7e560c424e0ed7367d6ad3595a1bd38dea669bcbd1c838f522d8e
2017-08-28Output a bit more information for fee calculation report.Alex Morcos
Github-Pull: #11145 Rebased-From: 6af49dddeaeec7f134e86d6f8cf839c55870b7ab Tree-SHA512: 7245c6f7ed81cf3913e351ff1df7f74f4be7abe0ae8be312e4862c9875e2943b0b11136bc9999191cdf03468fdac5d41e294bb59b657605c22643b102e37c070
2017-08-28Fix rounding errors in calculation of minimum change sizeAlex Morcos
Github-Pull: #11145 Rebased-From: a54c7b94f8825e9b52fec9066fe7c1d5b6f53482 Tree-SHA512: d9abb9794edbf7e52450c63d183a4f28e9a3621a670b7f21af92407be096363b44a356818f2abbea11c168d123c04852bd0b60f1cd9d423aefbf4ae831f8567d
2017-08-21qt: Update translations pre-rc2Wladimir J. van der Laan
New locales: - bn - bs - de_DE - en_AU - en_US - es_419 - he_IL - id - ja_JP - my - nb_NO - nl_NL - si - te - th Tree-SHA512: af4e9d0107122e3da7da8ee4952e01a731ed04f13e83ed1979ace24d29c437a83cc23453d8f0b2160829df02c2ffbff0ce749083f82c4d4695c69a3c7feeebed
2017-08-21Pass serialization flags and whether to include hex to TxToUnivAndrew Chow
Github-Pull: #11027 Rebased-From: 6bbdafcdc4f9d9e3f9de72ed686c060fb4b8b465 Tree-SHA512: 8ed049a0945c4f56c518aef6d60efebda5cde09ef63d8e472b363821170d71fb4d16414b360824d7537fc7c7b5e5277bbbd092a20899446e97c188ab8df58c1b
2017-08-21Only return hex field once in getrawtransactionAndrew Chow
The hex is already returned in TxToUniv, no need to give it out a second independent time in getrawtransaction itself. Github-Pull: #11027 Rebased-From: e029c6e709d251809aa04edc08f76a077a2443e7 Tree-SHA512: 4f7892431ddb9b59bcc59756890b97a20d046d1d4898f8a80c564223e1cde1c922da403cea4b8ae79d70741d1a9ff337f077043e5bb538cdc4d34fbe09301240
2017-08-21[wallet] Add logging to MarkReserveKeysAsUsedJohn Newbery
Github-Pull: #11044 Rebased-From: 67ceff4039ae038ae16f06128f868a2e8395b59a Tree-SHA512: 850c5b1010c84e164edf24a83ae36e46309b2eb7a67854bad509265ed590ba67d5f743a8416590da6ecca85fe4bda7f20e8c3152e422638eb7898db11a416af7