aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
Commit message (Collapse)AuthorAgeFilesLines
* Merge AuxPoW support from NamecoreRoss Nicoll2019-07-132-44/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes are as below: Wrap CBlockHeader::nVersion into a new class (CBlockVersion). This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID. Update getauxblock.py for new 'generate' RPC call. Add 'auxpow' to block JSON. Accept auxpow as PoW verification. Add unit tests for auxpow verification. Add check for memory-layout of CBlockVersion. Weaken auxpow chain ID checks for the testnet. Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks. Use this to disable the checks on testnet. Introduce CPureBlockHeader. Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two. Differentiate between uint256 and arith_uint256. This change was done upstream, modify the auxpow code. Add missing lock in auxpow_tests. Fix REST header check for auxpow headers. Those can be longer, thus take that into account. Also perform the check actually on an auxpow header. Correctly set the coinbase for getauxblock results. Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be. (BIP30 block height and COINBASE_FLAGS.) Implement getauxblock plus regression test. Turn auxpow test into FIXTURE test. This allows using of the Params() calls. Move CMerkleTx code to auxpow.cpp. Otherwise we get linker errors when building without wallet. Fix rebase with BIP66. Update the code to handle BIP66's nVersion=3. Enforce that auxpow parent blocks have no auxpow block version. This is for compatibility with namecoind. See also https://github.com/namecoin/namecoin/pull/199. Move auxpow-related parameters to Consensus::Params.
* Correct build and test net seedRoss Nicoll2019-04-281-1/+1
| | | | | * Correct the test case from 100 blocks to 240 * Remove incorrect ", true" in testnet seed configuration
* Replace test data with Dogecoin valuesRoss Nicoll2019-04-031-12/+15
| | | | | | | | | | | | | | | | | | | | Replace test data with Dogecoin equivalents in the folowing tests: * base58 * bip32 * keys * miner * pow * wallet Replace RPC and deterministic signatures in unit tests with Dogecoin values. While conventionally I'd use an alternative implementation for these, as RFC 6979 compliant signature generation isn't terribly common, and there's no reason to suspect we've modified this code, I'm going to assert that it's good enough to test that the code doesn't provide different values. Disabled Bitcoin PoW tests, but left code in place to simplify later merges. These are replaced by the Dogecoin PoW tests.
* rpc: Fix wallet unload during walletpassphrase timeoutJoão Barbosa2018-12-051-8/+12
| | | | | Github-Pull: #14453 Rebased-From: 321decf
* Refactor PSBTInput signing to enforce invariantGlenn Willen2018-12-031-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the process of PSBTInput signing to enforce the invariant that a PSBTInput always has _either_ a witness_utxo or a non_witness_utxo, never both. This simplifies the logic of SignPSBTInput slightly, since it no longer has to deal with the "both" case. When calling it, we now give it, in order of preference: (1) whichever of the utxo fields was already present in the PSBT we received, or (2) if neither, the non_witness_utxo field, which is just a copy of the input transaction, which we get from the wallet. SignPSBTInput no longer has to remove one of the two fields; instead, it will check if we have a witness signature, and if so, it will replace the non_witness_utxo with the witness_utxo (which is smaller, as it is just a copy of the output being spent.) Add PSBTInput::IsSane checks in two more places, which checks for both utxo fields being present; we will now give an RPC error early on if we are supplied such a malformed PSBT to fill in. Also add a check to FillPSBT, to avoid touching any input that is already signed. (This is now redundant, since we should no longer potentially harm an already-signed input, but it's harmless.) fixes #14473 Github-Pull: #14588
* Simplify arguments to SignPSBTInputGlenn Willen2018-12-033-4/+4
| | | | | | | | | | | | Remove redundant arguments to SignPSBTInput -- since it needs several bits of the PartiallySignedTransaction, pass in a reference instead of doing it piecemeal. This saves us having to pass in both a PSBTInput and its index, as well as having to pass in the CTransaction. Also avoid redundantly passing the sighash_type, which is contained in the PSBTInput already. Github-Pull: #14588 Rebased-From: 0f5bda2bd941686620ef0eb90bd7ed973cc7ef73
* New PartiallySignedTransaction constructor from CTransctionGlenn Willen2018-12-031-8/+1
| | | | | | | | | New constructor that creates a PartiallySignedTransaction from a CTransaction, automatically sizing the inputs and outputs vectors for convenience. Github-Pull: #14588 Rebased-From: 65166d4cf828909dc4bc49dd68a58103d015f1fd
* Remove redundant txConst parameter to FillPSBTGlenn Willen2018-12-033-21/+9
| | | | | Github-Pull: #14588 Rebased-From: 4f3f5cb4b142f0fcb36241fa33b52a257901dbee
* More concise conversion of CDataStream to stringGlenn Willen2018-12-031-2/+2
| | | | | | | | Use .str() instead of .data() and .size() when converting CDataStream to a string. Uses std::string, avoiding conversion to a C string. Github-Pull: #14588 Rebased-From: fe5d22bc676f158e8d567d71edb3451118759d62
* Merge #14196: [0.17][psbt] always drop the unnecessary utxo and convert ↵MarcoFalke2018-12-011-2/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-witness utxo to witness when necessary fcefc6851a Convert non-witness UTXOs to witness if witness sig created (Andrew Chow) fcdea8ad2a Drop the unnecessary UTXO based on the UTXOs present, not on earlier wallet things (Andrew Chow) Pull request description: When we sign an input in a psbt that has a non-witness utxo but a witness signature is produced, we will now replace the non-witness utxo with the corresponding witness utxo. Furthermore, we should make sure that the correct UTXO type is used based on what UTXOs are there, not based on earlier wallet behavior. Note that this is PR'd to the 0.17 branch because the code here no longer exists in master. Tree-SHA512: 882e9e4e9b77d6ac1743c35c0d59023aad6f4f19193398f97f2c6b81f6627d74e5220b1d674a0edba1ff2fc2a7f61afbf838d3faf0a964fccd3dee97c631aa47
| * Convert non-witness UTXOs to witness if witness sig createdAndrew Chow2018-09-111-0/+7
| | | | | | | | | | If a witness signature was created when a non-witness UTXO is used, convert the non-witness UTXO to a witness one.
| * Drop the unnecessary UTXO based on the UTXOs present, not on earlier wallet ↵Andrew Chow2018-09-111-2/+2
| | | | | | | | | | | | | | things Instead of dropping the unnecessary UTXO based on whether the wallet did something, do it based on whether two UTXOs are there.
* | CreateTransaction: Assume minimum p2sh-p2wpkh spend size for unknown changeGregory Sanders2018-11-303-1/+55
| |
* | Remove stale comment in CalculateMaximumSignedInputSizeGregory Sanders2018-11-301-2/+0
| |
* | wallet: Avoid potential use of unitialized value bnb_used in ↵practicalswift2018-11-281-0/+2
| | | | | | | | | | | | | | CWallet::CreateTransaction(...) Github-Pull: #13546 Rebased-From: a23a7f60aa07de52d23ff1f2034fc43926ec3520
* | [wallet] Ensure wallet is unlocked before signinggustavonalle2018-11-281-0/+2
| | | | | | | | | | Github-Pull: #14310 Rebased-From: db15805668e923c3493d77122d20926496cf6a1a
* | [wallet] Restore ability to list incoming transactions by labelRussell Yanofsky2018-10-101-8/+15
|/ | | | | | | | Backport of PR 14411 to v0.17. This change partially reverts #13075 and #14023. Fixes #14382
* fix walletcreatefundedpsbt deriv paths, add testGregory Sanders2018-08-281-1/+1
| | | | | | Github-Pull: #14055 Rebased-From: 61fe653bd919cb0533b2b9d6259bc86a4b2975c0 Tree-SHA512: 2f3edf62318fab4b405b47788096005f59cbe6ba4723fe51ce3b386539a58b7ea7369c31c3840c6baa76cdf6ba8f8440f977c36e2ee2916e711d7872bd1eadad
* Docs: Fix help message typo optiona -> optionalBen Woosley2018-08-271-2/+2
| | | | | Github-Pull: #14056 Rebased-From: 7d0a8ad3103200145ab2e73368c3b8345a66c15d
* RPCTypeCheck bip32derivs arg in walletcreatefundedGregory Sanders2018-08-211-1/+2
| | | | | | Github-Pull: #13968 Rebased-From: faaac5caaab4d5131040292f4ef2404074ad268b Tree-SHA512: 758c0c3e4435897d1a9b03ea93f1b2a1a1b64071eda9450f968acf537c172ee61acf9d962bc22ddb6de26e0ad39d9165cdee6f260bb5a95bf97b4003853f0874
* walletcreatefundedpsbt: remove duplicate replaceable argGregory Sanders2018-08-211-9/+7
| | | | | | Github-Pull: #13968 Rebased-From: 1f18d7b591ffcc8bb9422a9b728bd9a0d8da6a2a Tree-SHA512: 90391703181db6880a135c60aca792a9e92c4abcad26907cd6cb0a0378593fe45cf995a22ae142ea7de2767c72a9df444e918ff15e460ce19c0435163917d812
* Only wipe wrong UTXO type data if overwritten by walletPieter Wuille2018-08-151-6/+9
| | | | | GitHub-Pull: #13917 Rebased-From: c05712c
* Merge #13666: Always create signatures with Low R valuesWladimir J. van der Laan2018-08-132-30/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e306be742932d4ea5aca0ea4768e54b2fc3dc6a0 Use 72 byte dummy signatures when watching only inputs may be used (Andrew Chow) 48b1473c898129a99212e2db36c61cf93625ea17 Use 71 byte signature for DUMMY_SIGNATURE_CREATOR (Andrew Chow) 18dfea0dd082af18dfb02981b7ee1cd44d514388 Always create 70 byte signatures with low R values (Andrew Chow) Pull request description: When creating signatures for transactions, always make one which has a 32 byte or smaller R and 32 byte or smaller S value. This results in signatures that are always less than 71 bytes (32 byte R + 32 byte S + 6 bytes DER + 1 byte sighash) with low R values. In most cases, the signature will be 71 bytes. Because R is not mutable in the same way that S is, a low R value can only be found by trying different nonces. RFC 6979 for deterministic nonce generation has the option to specify additional entropy, so we simply use that and add a uin32_t counter which we increment in order to try different nonces. Nonces are sill deterministically generated as the nonce used will the be the first one where the counter results in a nonce that results in a low R value. Because different nonces need to be tried, time to produce a signature does increase. On average, it takes twice as long to make a signature as two signatures need to be created, on average, to find one with a low R. Having a fixed size signature makes size calculations easier and also saves half a byte of transaction size, on average. DUMMY_SIGNATURE_CREATOR has been modified to produce 71 byte dummy signatures instead of 72 byte signatures. Tree-SHA512: 3cd791505126ce92da7c631856a97ba0b59e87d9c132feff6e0eef1dc47768e81fbb38bfbe970371bedf9714b7f61a13a5fe9f30f962c81734092a4d19a4ef33
| * Use 72 byte dummy signatures when watching only inputs may be usedAndrew Chow2018-08-092-27/+29
| | | | | | | | | | | | | | | | | | With watching only inputs, we do not know how large the signatures for those inputs will be as their signers may not have implemented 71 byte signatures. Thus we estimate their fees using the 72 byte dummy signature to ensure that we pay enough fees. This only effects fundrawtransaction when includeWatching is true.
| * Use 71 byte signature for DUMMY_SIGNATURE_CREATORAndrew Chow2018-08-092-3/+3
| | | | | | | | | | | | Changes DUMMY_SIGNATURE_CREATOR to create 71 byte dummy signatures. Update comments to reflect this change
* | Merge #13808: wallet: shuffle coins before grouping, where warrantedWladimir J. van der Laan2018-08-131-1/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 18f690ec2f7eb1b4aa51825bfed0cbfdadc93ac7 wallet: shuffle coins before grouping, where warranted (Karl-Johan Alm) Pull request description: Coins are randomly shuffled in coin selection to avoid unintentional privacy leaks regarding the user's coin set. For the case where a user has a lot of coins with the same destination, these will be grouped into groups of 10 *before* the shuffling. It is unclear whether this has any implications at all, but this PR plugs the potential issue, if there ever is one, by shuffling the coins before they are grouped. Issue brought up in https://github.com/bitcoin/bitcoin/pull/12257#discussion_r204554549 Tree-SHA512: fb50ed4b5fc03ab4853d45b76e1c64476ad5bcd797497179bc37b9262885c974ed6811159fd8e581f1461b6cc6d0a66146f4b70a2777c0f5e818d1322e0edb89
| * | wallet: shuffle coins before grouping, where warrantedKarl-Johan Alm2018-08-101-1/+9
| | | | | | | | | | | | Issue brought up in https://github.com/bitcoin/bitcoin/pull/12257\#discussion_r204554549
* | | Merge #13908: [Docs] upgrade rescan time warning from minutes to >1 hourMarcoFalke2018-08-101-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bb5b1c0b2d [Docs] upgrade rescan time warning from minutes to >1 hour (Mason Simon) Pull request description: When I rescanned just now it took well over an hour. The time warning "may take minutes" didn't prepare me for that. ``` 2018-08-08T03:10:17Z [wallet] Still rescanning. At block 174747. Progress=0.008341 2018-08-08T03:11:17Z [wallet] Still rescanning. At block 204233. Progress=0.024533 2018-08-08T03:12:17Z [wallet] Still rescanning. At block 221170. Progress=0.038340 ... 2018-08-08T04:16:17Z [wallet] Still rescanning. At block 524815. Progress=0.957105 2018-08-08T04:17:17Z [wallet] Still rescanning. At block 528572. Progress=0.971323 2018-08-08T04:18:17Z [wallet] Still rescanning. At block 532458. Progress=0.986824 ``` This is on a 4-core 4ghz system with a 7200rpm drive. Tree-SHA512: 722ccf566bfd6a3381fa173e08849cb676fe4c1f1cb2c4b86b07df2a5dc1ca0d54797cbe8fd606cdc2c60fef2be7c98e052460decdac2132ba759cff822132e8
| * | | [Docs] upgrade rescan time warning from minutes to >1 hourMason Simon2018-08-071-4/+4
| | |/ | |/|
* | | Use pushKV in some new PSBT RPCs.Daniel Kraft2018-08-091-2/+2
| |/ |/| | | | | | | Most of the code uses UniValue::pushKV where appropriate, but some new RPC code related to PSBTs did not.
* | Merge #13911: doc: Revert translated string change, clarify wallet log messagesMarcoFalke2018-08-091-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | c4a884d555 Trivial: Revert translated string change, clarify wallet log messages (Pierre Rochard) Pull request description: Fixes https://github.com/bitcoin/bitcoin/pull/12992 post-merge nits from @jnewbery Tree-SHA512: 002d8a69b489fd216e15b7d6200d7117c489b32405d5e9f514f120d43113fd97ca2f235452b0093e0760bc03baf714edc4564ae14af8456e1b2a54f83c577bf3
| * | Trivial: Revert translated string change, clarify wallet log messagesPierre Rochard2018-08-081-3/+3
| | |
* | | Merge #13876: wallet: Catch filesystem_error and raise InitErrorMarcoFalke2018-08-091-1/+6
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | fa8527ffec wallet: Catch filesystem_error and raise InitError (MarcoFalke) Pull request description: Fixes #13754 by restoring the previous behaviour Tree-SHA512: f64052e89f6b332be395df2a5ea6f227c213fa2f38e415e83f30a4fad0938e947e5cddff7902368a43c07be135955a31b90f7eac5a46875c58d54ea95f87f6e6
| * | wallet: Catch filesystem_error and raise InitErrorMarcoFalke2018-08-041-1/+6
| | |
* | | Merge #13780: 0.17: Pre-branch maintenanceWladimir J. van der Laan2018-08-0827-27/+27
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3fc20632a3ad30809356a58d2cf0ea4a4ad4cec3 qt: Set BLOCK_CHAIN_SIZE = 220 (DrahtBot) 2b6a2f4a28792f2fe9dc1be843b1ff1ecae35e8a Regenerate manpages (DrahtBot) eb7daf4d600eeb631427c018a984a77a34aca66e Update copyright headers to 2018 (DrahtBot) Pull request description: Some trivial maintenance to avoid having to do it again after the 0.17 branch off. (The scripts to do this are in `./contrib/`) Tree-SHA512: 16b2af45e0351b1c691c5311d48025dc6828079e98c2aa2e600dc5910ee8aa01858ca6c356538150dc46fe14c8819ed8ec8e4ec9a0f682b9950dd41bc50518fa
| * | Update copyright headers to 2018DrahtBot2018-07-2727-27/+27
| | |
* | | Merge #13812: wallet: sum ancestors rather than taking max in output groupsWladimir J. van der Laan2018-08-071-6/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 23fbbb100f63cb621b4b901dac0c0f16d7d74bc7 wallet: sum ancestors rather than taking max in output groups (Karl-Johan Alm) Pull request description: This is pointed out in https://github.com/bitcoin/bitcoin/pull/12257#discussion_r204549758. Basically, the ancestors gives an indication as to how many ancestors the resulting transaction will have, which is more precise when summing up the values, rather than taking the maximum, since all the coins in the group will become ancestors if selected. Tree-SHA512: 0588c4b6059669650614817e041526a2ab89dda8c07fca8e077c7669dca1fed51cd164f7df56340840ab60285d48f3b140dcee64f64bf696b2dd4ab16d556a13
| * | | wallet: sum ancestors rather than taking max in output groupsKarl-Johan Alm2018-07-311-6/+6
| | | |
* | | | Merge #13843: [trivial] Add doxygen-compatible comments to CAffectedKeysVisitorWladimir J. van der Laan2018-08-071-0/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3339d845354c9c357ec90505192748d9d639e72e [trivial] add doxygen-compatible comments to CAffectedKeysVisitor (Pierre Rochard) Pull request description: Tree-SHA512: 0003fde198a6977d0c8988efc8f76428f9e095009fddf131b07bd9809ef76a778c86bb2b1305e33df16101b6b703cf43eb6193462bb9f3687f98c1d9b109dd96
| * | | | [trivial] add doxygen-compatible comments to CAffectedKeysVisitorPierre Rochard2018-08-031-0/+11
| | |_|/ | |/| |
* | | | Merge #13657: wallet: assert to ensure accuracy of ↵Wladimir J. van der Laan2018-08-071-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMerkleTx::GetBlocksToMaturity 93de2891fa9cb8314573ba3a6ab764bc9c52444d wallet: assert to ensure accuracy of CMerkleTx::GetBlocksToMaturity (Ben Woosley) Pull request description: According to my understanding, it should not be possible for coinbase transactions to be conflicting, thus it should not be possible for GetDepthInMainChain to return a negative result. If it did, this would also result in innacurate results for GetBlocksToMaturity due to the math therein. asserting ensures accuracy. Tree-SHA512: 8e71c26f09fe457cfb00c362ca27066f7f018ea2af1f395090fdc7fd9f5964b76f4317c23f7a4923776f00087558511da5c1c368095be39fb1bacc614a93c32f
| * | | | wallet: assert to ensure accuracy of CMerkleTx::GetBlocksToMaturityBen Woosley2018-07-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to my understanding, it should not be possible for coinbase transactions to be conflicting, thus it should not be possible for GetDepthInMainChain to return a negative result. If it did, this would also result in innacurate results for GetBlocksToMaturity due to the math therein. asserting ensures accuracy.
* | | | | Merge #13667: wallet: Fix backupwallet for multiwalletsWladimir J. van der Laan2018-08-071-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a1a998cf24c0cf1232e44ec8eaf2ad6875ab5153 wallet: Fix backupwallet for multiwallets (Daniel Kraft) Pull request description: `backupwallet` was broken for multiwallets in their own directories (i.e. something like `DATADIR/wallets/mywallet/wallet.dat`). In this case, the backup would use `DATADIR/wallets/wallet.dat` as source file and not take the specific wallet's directory into account. This led to either an error during the backup (if the wrong source file was not present) or would silently back up the wrong wallet; especially the latter behaviour can be quite bad for users. Tree-SHA512: 7efe2450ca047e40719fcc7cc211ed94699056020ac737cada7b59e8240298675960570c45079add424d0aab520437d5050d956acd695a9c2452dd4317b4d2c4
| * | | | | wallet: Fix backupwallet for multiwalletsDaniel Kraft2018-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backupwallet was broken for multiwallets in their own directories (i.e. something like DATADIR/wallets/mywallet/wallet.dat). In this case, the backup would use DATADIR/wallets/wallet.dat as source file and not take the specific wallet's directory into account. This led to either an error during the backup (if the wrong source file was not present) or would silently back up the wrong wallet; especially the latter behaviour can be quite bad for users.
* | | | | | [wallet] Add wallet name to log messagesPierre Rochard2018-08-025-54/+66
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | After multiple wallets became supported, wallet-related log messages became ambiguous as to which wallet they were being emitted by. fixes #11317
* | | | | trivial: correct typosVarunram2018-08-021-1/+1
| | | | |
* | | | | Merge #13805: [wallet] Correctly limit output group sizeMarcoFalke2018-08-011-1/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a13647b8bd [qa] Add test for too-large wallet output groups (Suhas Daftuar) 57ec1c97b2 [wallet] correctly limit output group size (Suhas Daftuar) Pull request description: Also add a test to ensure that output groups are being limited, even if a wallet has many outputs corresponding to the same scriptPubKey (the test fails without the first commit). Tree-SHA512: 2aaa82005b0910488f5cbf40690d4c5e2f46949e299ef70b4cb6e440713811443d411dcbc6d71b1701fd82423073125e21747787d70830cd021c841afb732d51
| * | | | | [wallet] correctly limit output group sizeSuhas Daftuar2018-07-301-1/+4
| | |_|/ / | |/| | |
* / | | | refactor: Avoid locking tx pool cs thriceMarcoFalke2018-07-291-1/+2
|/ / / /
* | | | Merge #13774: Return void instead of bool for functions that cannot failMarcoFalke2018-07-293-44/+20
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d78a8dc3e8 Return void instead of bool for functions that cannot fail (practicalswift) Pull request description: Return `void` instead of `bool` for functions that cannot fail: * `CBlockTreeDB::ReadReindexing(...)` * `CChainState::ResetBlockFailureFlags(...)` * `CTxMemPool::addUnchecked(...)` * `CWallet::CommitTransaction(...)` * `CWallet::LoadDestData(...)` * `CWallet::LoadKeyMetadata(...)` * `CWallet::LoadScriptMetadata(...)` * `CWallet::LoadToWallet(...)` * `CWallet::SetHDChain(...)` * `CWallet::SetHDSeed(...)` * `PendingWalletTx::commit(...)` * `RemoveLocal(...)` * `SetMinVersion(...)` * `StartHTTPServer(...)` * `StartRPC(...)` * `TorControlConnection::Disconnect(...)` Some of the functions can fail by throwing. Found by manually inspecting the following candidate functions: ``` $ git grep -E '(^((static|virtual|inline|friend)[^a-z])*[^a-z]*bool [^=]*\(|return true|return false)' -- "*.cpp" "*.h" ``` Tree-SHA512: c0014e045362dbcd1a0cc8f69844e7b8cbae4f538e7632028daeca3a797ac11d8d3d86ebc480bedcb8626df3e96779d592747d52a12556fc49921b114fa0ccc6