aboutsummaryrefslogtreecommitdiff
path: root/src/qt/addresstablemodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge #17918: qt: Hide non PKHash-Addresses in signing address bookJonas Schnelli2020-05-291-3/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c4ea501e96363e937200bc97b8e2d78162bdb699 qt: Hide non PKHash-Addresses in signing address book (Emil Engler) Pull request description: [Video Demo](https://www.youtube.com/watch?v=T-Rp2pFRmzY) This PR hides all non PKHash addresses in the signing GUI in the Address Book when it is opened through the signing dialog, as non PKHash addresses are useless there. ACKs for top commit: jonasschnelli: Code Review ACK c4ea501e96363e937200bc97b8e2d78162bdb699 Tree-SHA512: e321d45e15534b2d68da5a1297b1c7551cdd784f03203f54c9385c2ce0bb2b7316c09f9e8c3eb41bfa1e7207ecc94c8ed08f012e2d6c117b803996ade26feb2f
| * qt: Hide non PKHash-Addresses in signing address bookEmil Engler2020-01-181-3/+6
| |
* | scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* | Wallet: Avoid treating change-in-the-addressbook as non-change everywhereLuke Dashjr2020-04-021-1/+1
| |
* | scripted-diff: Wallet: Rename mapAddressBook to m_address_bookLuke Dashjr2020-04-021-1/+1
|/ | | | | | | | | | Previous versions assumed absence of an entry in mapAddressBook indicated change. This no longer holds true (due to bugs) and will shortly be made intentional. Renaming the field helps ensure that old code using mapAddressBook directly gets checked for necessary rebasing. -BEGIN VERIFY SCRIPT- sed -i -e 's/mapAddressBook/m_address_book/g' $(git grep -l 'mapAddressBook' ./src) -END VERIFY SCRIPT-
* scripted-diff: Bump copyright of files changed in 2019MarcoFalke2019-12-301-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* refactor: replace qLowerBound & qUpperBound with std:: upper_bound & lower_boundfanquake2019-08-221-3/+3
|
* refactor: replace qSort with std::sortfanquake2019-08-221-1/+3
|
* Add GetNewDestination to CWallet to fetch new destinationsAndrew Chow2019-07-091-9/+7
| | | | | | | Instead of having the same multiple lines of code everywhere that new destinations are fetched, introduce GetNewDestination as a member function of CWallet which does the key fetching, label setting, script generation, and destination generation.
* Make reasoning about dependencies easier by not including unused dependenciespracticalswift2019-06-021-1/+0
|
* Replace remaining 0 with nullptr in Qt codeBen Woosley2019-01-131-2/+2
| | | | | | | Also used type-appropriate enum values such as Qt::NoItemFlags in some cases. All cases identified via -Wzero-as-null-pointer-constant
* Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant)practicalswift2019-01-131-1/+1
| | | | Qt-only changes.
* Merge #13769: Mark single-argument constructors "explicit"MarcoFalke2018-08-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1ac3c983bf Mark single-argument constructors "explicit" (practicalswift) Pull request description: Mark single-argument constructors `explicit`. Rationale: * Avoid unexpected implicit promotions. From the developer notes: > **By default, declare single-argument constructors explicit.** > Rationale: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. Tree-SHA512: 7901ed5be808c9d0ecb5ca501e1bc0395987fe1b7941b8548cebac2ff08a14f7dab61fab374a69b9ba29a9295a04245c814325c7f95b97ae558af0780f111dfa
| * Mark single-argument constructors "explicit"practicalswift2018-07-261-1/+1
| |
* | Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|/
* Merge #12928: qt: Initialize non-static class members that were previously ↵Wladimir J. van der Laan2018-05-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | neither initialized where defined nor in constructor 3fdc5fe Make sure initialization occurs in the constructor (practicalswift) 1e7813e Remove redundant initializations from the constructor (practicalswift) f131872 Initialize non-static class members where they are defined (practicalswift) 73bc1b7 Initialize editStatus and autoCompleter. Previously not initialized where defined or in constructor. (practicalswift) Pull request description: Initialize variables previously neither defined where defined nor in constructor: * `editStatus` * `autoCompleter` Also; initialize non-static class members where they are defined in accordance with developer notes. Tree-SHA512: 84f0cb87ec8394ed7641bfa0731be2ec72e6a920e00ae206ff89e2e7c960358f603c52878311b24601a33aa7cba6ea4f9a78a8ade88112dea0f41efb08e84e25
| * Remove redundant initializations from the constructorpracticalswift2018-04-111-1/+1
| |
* | [qt] Display more helpful message when adding a send address has failedJames O'Beirne2018-04-251-9/+19
| | | | | | | | | | | | | | | | | | Addresses #12796. When we're unable to add a sending address to the address book because it already exists as a receiving address, display a message indicating as much. This should help avoid confusion about an address supposedly already in the book but which isn't currently visible in the interface.
* | Add purpose arg to Wallet::getAddressJames O'Beirne2018-04-251-2/+4
|/ | | | Also make all arguments to getAddress required and document args at call sites.
* scripted-diff: Avoid `interface` keyword to fix windows gitian buildRussell Yanofsky2018-04-071-2/+2
| | | | | | | | | | | | | | | | | | Rename `interface` to `interfaces` Build failure reported by Chun Kuan Lee <[email protected]> https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756 -BEGIN VERIFY SCRIPT- git mv src/interface src/interfaces ren() { git grep -l "$1" | xargs sed -i "s,$1,$2,g"; } ren interface/ interfaces/ ren interface:: interfaces:: ren BITCOIN_INTERFACE_ BITCOIN_INTERFACES_ ren "namespace interface" "namespace interfaces" -END VERIFY SCRIPT-
* Remove direct bitcoin calls from qt/addresstablemodel.cppRussell Yanofsky2018-04-041-33/+26
|
* wallet: Change output type globals to membersMarcoFalke2018-03-171-0/+2
|
* Split key_io (address/key encodings) off from base58Pieter Wuille2018-02-191-2/+1
|
* Merge #11733: qt: Remove redundant locksWladimir J. van der Laan2018-02-141-9/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | d6f3a73 Remove redundant locks (practicalswift) Pull request description: Remove redundant locks: * ~~`FindNode(...)` is locking `cs_vNodes` internally~~ * `SetAddressBook(...)` is locking `cs_wallet` internally * `DelAddressBook(...)` is locking `cs_wallet` internally **Note to reviewers:** From what I can tell these locks are redundantly held from a data integrity perspective (guarding specific variables), and they do not appear to be needed from a data consistency perspective (ensuring a consistent state at the right points). Review thoroughly and please let me know if I'm mistaken :-) Tree-SHA512: 7e3ca2d52fecb16385dc65051b5b20d81b502c0025d70b0c489eb3881866bdd57947a9c96931f7b213f5a8a76b6d2c7b084dff0ef2028a1e9ca9ccfd83e5b91e
| * Remove redundant lockspracticalswift2017-11-211-9/+3
| | | | | | | | | | * SetAddressBook(...) is locking cs_wallet internally * DelAddressBook(...) is locking cs_wallet internally
* | [qt] receive tab: bech32 address opt-in checkboxSjors Provoost2018-01-161-3/+3
| | | | | | | | When launched with -adresstype=legacy the checkbox will be hidden.
* | Merge #11403: SegWit wallet supportJonas Schnelli2018-01-101-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b224a47a1 Add address_types test (Pieter Wuille) 7ee54fd7c Support downgrading after recovered keypool witness keys (Pieter Wuille) 940a21932 SegWit wallet support (Pieter Wuille) f37c64e47 Implicitly know about P2WPKH redeemscripts (Pieter Wuille) 57273f2b3 [test] Serialize CTransaction with witness by default (Pieter Wuille) cf2c0b6f5 Support P2WPKH and P2SH-P2WPKH in dumpprivkey (Pieter Wuille) 37c03d3e0 Support P2WPKH addresses in create/addmultisig (Pieter Wuille) 3eaa003c8 Extend validateaddress information for P2SH-embedded witness (Pieter Wuille) 30a27dc5b Expose method to find key for a single-key destination (Pieter Wuille) 985c79552 Improve witness destination types and use them more (Pieter Wuille) cbe197470 [refactor] GetAccount{PubKey,Address} -> GetAccountDestination (Pieter Wuille) 0c8ea6380 Abstract out IsSolvable from Witnessifier (Pieter Wuille) Pull request description: This implements a minimum viable implementation of SegWit wallet support, based on top of #11389, and includes part of the functionality from #11089. Two new configuration options are added: * `-addresstype`, with options `legacy`, `p2sh`, and `bech32`. It controls what kind of addresses are produced by `getnewaddress`, `getaccountaddress`, and `createmultisigaddress`. * `-changetype`, with the same options, and by default equal to `-addresstype`, that controls what kind of change is used. All wallet private and public keys can be used for any type of address. Support for address types dependent on different derivation paths will need a major overhaul of how our internal detection of outputs work. I expect that that will happen for a next major version. The above also applies to imported keys, as having a distinction there but not for normal operations is a disaster for testing, and probably for comprehension of users. This has some ugly effects, like needing to associate the provided label to `importprivkey` with each style address for the corresponding key. To deal with witness outputs requiring a corresponding redeemscript in wallet, three approaches are used: * All SegWit addresses created through `getnewaddress` or multisig RPCs explicitly get their redeemscripts added to the wallet file. This means that downgrading after creating a witness address will work, as long as the wallet file is up to date. * All SegWit keys in the wallet get an _implicit_ redeemscript added, without it being written to the file. This means recovery of an old backup will work, as long as you use new software. * All keypool keys that are seen used in transactions explicitly get their redeemscripts added to the wallet files. This means that downgrading after recovering from a backup that includes a witness address will work. These approaches correspond to solutions 3a, 1a, and 5a respectively from https://gist.github.com/sipa/125cfa1615946d0c3f3eec2ad7f250a2. As argued there, there is no full solution for dealing with the case where you both downgrade and restore a backup, so that's also not implemented. `dumpwallet`, `importwallet`, `importmulti`, `signmessage` and `verifymessage` don't work with SegWit addresses yet. They're remaining TODOs, for this PR or a follow-up. Because of that, several tests unexpectedly run with `-addresstype=legacy` for now. Tree-SHA512: d425dbe517c0422061ab8dacdc3a6ae47da071450932ed992c79559d922dff7b2574a31a8c94feccd3761c1dffb6422c50055e6dca8e3cf94a169bc95e39e959
| * | SegWit wallet supportPieter Wuille2018-01-091-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This introduces two command line flags (-addresstype and -changetype) which control the type of addresses/outputs created by the GUI and RPCs. Certain RPCs allow overriding these (`getnewaddress` and `getrawchangeaddress`). Supported types are "legacy" (P2PKH and P2SH-multisig), "p2sh-segwit" (P2SH-P2WPKH and P2SH-P2WSH-multisig), and "bech32" (P2WPKH and P2WSH-multisig). A few utility functions are added to the wallet to construct different address type and to add the necessary entries to the wallet file to be compatible with earlier versions (see `CWallet::LearnRelatedScripts`, `GetDestinationForKey`, `GetAllDestinationsForKey`, `CWallet::AddAndGetDestinationForScript`).
* / Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|/
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Introduce wrappers around CBitcoinAddressPieter Wuille2017-09-061-11/+11
| | | | | | | This patch removes the need for the intermediary Base58 type CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination function that directly operate on the conversion between strings and CTxDestination.
* scripted-diff: Remove #include <boost/foreach.hpp>Jorge Timón2017-06-221-1/+0
| | | | | | -BEGIN VERIFY SCRIPT- sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp -END VERIFY SCRIPT-
* scripted-diff: Remove PAIRTYPEJorge Timón2017-06-051-1/+1
| | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i ':a;N;$!ba;s/#define std::pair<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ; -END VERIFY SCRIPT-
* scripted-diff: Fully remove BOOST_FOREACHJorge Timón2017-06-051-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Do not shadow in src/qtPavel Janík2016-09-231-6/+6
|
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* [qt] Use fixed pitch font for the rpc consoleMarcoFalke2015-10-291-1/+1
| | | | | | Also: * Preserve white space * Make fixed font as large as default font
* qt: define QT_NO_KEYWORDSWladimir J. van der Laan2015-07-151-1/+1
| | | | | | | | QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`, `slots` and `emit` macros. Avoid overlap between Qt macros and boost - for example #undef hackiness in #6421.
* Includes: Do not include main.h from any other headerJorge Timón2015-03-241-0/+2
|
* [Move Only] Move wallet related things to src/wallet/Jonas Schnelli2015-03-121-1/+1
| | | | could once be renamed from /src/wallet to /src/legacywallet.
* Remove whitespaces before double colon in errors and logsPavel Janík2015-01-311-3/+3
|
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* qt: Change serious messages from qDebug to qWarningWladimir J. van der Laan2014-07-011-3/+3
| | | | | By changing the logging stream for warnings from qDebug to qWarning, these will always be logged to debug.log.
* qt: change CT_NOW string to CT_NEW in log messagephilsong2014-03-151-1/+1
| | | | | | | Closes #3852. Rebased-By: Wladimir J. van der Laan <[email protected]> Rebased-From: 5f2907a, 88d3df4
* qt: add missing cs_wallet lock in AddressTableModel::setDataWladimir J. van der Laan2014-01-061-20/+17
| | | | | duplicate check in AddressTableModel::setData accesses wallet data structure as well as SetAddressBook without proper LOCK, fix this.
* qt: keep a list of requested paymentsWladimir J. van der Laan2013-11-191-1/+1
| | | | | | | | | Keep a list of requested payments in the Receive tab so that a user can recall previously created requests after closing their windows. Currently this list is not stored between bitcoin-qt sessions. This can be implemented later, but it is not clear where it should be stored as I don't think it belongs in the wallet (maybe in QSettings?)
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-1/+1
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* qt: add license header to source filesWladimir J. van der Laan2013-11-041-0/+4
| | | | Closes #839