aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
AgeCommit message (Collapse)Author
2014-09-22Merge pull request #4787Wladimir J. van der Laan
4b0deb3 Clean up CMerkleTx::SetMerkleBranch. (Daniel Kraft)
2014-09-16Move CTxDestination from script/script to script/standardPieter Wuille
2014-09-16Merge pull request #4825Pieter Wuille
8d657a6 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (ENikS)
2014-09-10Move CAffectedKeysVisitor to wallet.cpp (remove ExtractAffectedKeys)jtimon
2014-09-09Merge pull request #4868Pieter Wuille
2c2cc5d Remove some unnecessary c_strs() in logging and the GUI (Philip Kaufmann) f7d0a86 netbase: Use .data() instead of .c_str() on binary string (Wladimir J. van der Laan)
2014-09-09Remove some unnecessary c_strs() in logging and the GUIPhilip Kaufmann
Includes `core: remove unneeded c_str() / Qt: replace c_str() with Qt code` by P. Kaufmann.
2014-09-08Separate script/signjtimon
2014-09-06Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false'ENikS
2014-09-04Introduce BlockMap type for mapBlockIndexPieter Wuille
2014-08-30Clean up CMerkleTx::SetMerkleBranch.Daniel Kraft
The case SetMerkleBranch(NULL) was never actually used, and thus the involved code (loading the block from disk) can be removed and the implementation simplified.
2014-08-29Move CMerkleTx to wallet.cpp/hWladimir J. van der Laan
It is only used by the wallet so it has no place in main.
2014-08-26Merge pull request #4673Wladimir J. van der Laan
1c5f0af [Qt] Add column Watch-only to transactions list (Cozz Lovan) 939ed97 Add boolean HaveWatchonly and signal NotifyWatchonlyChanged (Cozz Lovan)
2014-08-26Split up util.cpp/hWladimir J. van der Laan
Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26Move functions in wallet.h to implementation fileWladimir J. van der Laan
Breaks compile-time dependency of wallet.h on util.
2014-08-11Add boolean HaveWatchonly and signal NotifyWatchonlyChangedCozz Lovan
2014-07-21Revert "UI to alert of respend attempt affecting wallet."Wladimir J. van der Laan
This reverts commit ada5a067c75f19a724cc054286ecf2254e5dbe8f. Conflicts: src/qt/guiconstants.h src/wallet.h
2014-07-21Revert "Add -respendnotify option and new RPC data"Wladimir J. van der Laan
This reverts commit 9004798e62e987ddf50030b17fa1881b63dd5e45.
2014-07-21Revert "Formatting, spelling, comment fixes."Wladimir J. van der Laan
This reverts commit 7a19efe04069d9a1e251cdc94b25184f76d9d901.
2014-07-18Fix a signed/unsigned warning introduced in 1b4568cWladimir J. van der Laan
vout counter must be unsigned.
2014-07-15Add vout to ListTransactions outputCozz Lovan
2014-07-14Fixed error in 'getbalance' when using watchonly addresses.JaSK
2014-07-14Merge pull request #4400Wladimir J. van der Laan
4eedf4f make RandAddSeed() use OPENSSL_cleanse() (Philip Kaufmann) 6354935 move rand functions from util to new random.h/.cpp (Philip Kaufmann) 001a53d add GetRandBytes() as wrapper for RAND_bytes() (Philip Kaufmann)
2014-07-13Fix Watchonly: cs_main lock not heldCozz Lovan
2014-07-11`getrawchangeaddress` should fail when keypool exhaustedWladimir J. van der Laan
An user on IRC reported an issue where `getrawchangeaddress` keeps returning a single address when the keypool is exhausted. In my opinion this is strange behaviour. - Change CReserveKey to fail when running out of keys in the keypool. - Make `getrawchangeaddress` return RPC_WALLET_KEYPOOL_RAN_OUT when unable to create an address. - Add a Python RPC test for checking the keypool behaviour in combination with encrypted wallets.
2014-07-09add GetRandBytes() as wrapper for RAND_bytes()Philip Kaufmann
- add a small wrapper in util around RAND_bytes() and replace with GetRandBytes() in the code to log errors from calling RAND_bytes() - remove OpenSSL header rand.h where no longer needed
2014-07-08Fee fixesCozz Lovan
2014-07-07Merge pull request #4045Wladimir J. van der Laan
a3e192a replaced MINE_ with ISMINE_ (JaSK) 53a2148 fixed bug where validateaddress doesn't display information (JaSK) f28707a fixed bug in ListReceived() (JaSK) 519dd1c Added MINE_ALL = (spendable|watchonly) (JaSK) 23b0506 Fixed some stuff in TransactionDesc (JaSK) 80dda36 removed default argument values for ismine filter (JaSK) d5087d1 Use script matching rather than destination matching for watch-only. (Pieter Wuille) 0fa2f88 added includedWatchonly argument to listreceivedbyaddress/...account (JaSK) f87ba3d added includeWatchonly argument to 'gettransaction' because it affects balance calculation (JaSK) a5c6c5d fixed tiny glitch and improved readability like laanwj suggested (JaSK) d7d5d23 Added argument to listtransactions and listsinceblock to include watchonly addresses (JaSK) 952877e Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'. It is only appended when the transaction involves a watchonly address. (JaSK) 83f3543 Added argument to listaccounts to include watchonly addresses (JaSK) d4640d7 Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation. (JaSK) d2692f6 Watchonly transactions are marked in transaction history (JaSK) ffd40da Watchonly balances are shown separately in gui. (JaSK) 2935b21 qt: Hide unspendable outputs in coin control (Wladimir J. van der Laan) c898846 Add support for watch-only addresses (Pieter Wuille)
2014-07-07Merge pull request #4446Wladimir J. van der Laan
209377a Use GetBlockTime() more (jtimon)
2014-07-07Use GetBlockTime() morejtimon
2014-07-07Rename SendMoneyToDestination to SendMoney.Daniel Kraft
Get rid of SendMoney and replace it by the functionality of SendMoneyToDestination. This cleans up the code, since only SendMoneyToDestination was actually used (SendMoney internally from this routine).
2014-07-03Move fee policy out of coreGavin Andresen
2014-07-03Use fee/priority estimates in wallet CreateTransactionGavin Andresen
The wallet now uses the mempool fee estimator with a new command-line option: -txconfirmtarget (default: 1) instead of using hard-coded fees or priorities. A new bitcoind that hasn't seen enough transactions to estimate will fall back to the old hard-coded minimum priority or transaction fee. -paytxfee option overrides -txconfirmtarget. Relaying and mining code isn't changed. For Qt, the coin control dialog now uses priority estimates to label transaction priority (instead of hard-coded constants); unspent outputs were consistently labeled with a much higher priority than is justified by the free transactions actually being accepted into blocks. I did not implement any GUI for setting -txconfirmtarget; I would suggest getting rid of the "Pay transaction fee" GUI and replace it with either "target number of confirmations" or maybe a "faster confirmation <--> lower fee" slider or select box.
2014-07-02replaced MINE_ with ISMINE_JaSK
2014-07-02Added MINE_ALL = (spendable|watchonly)JaSK
2014-07-02removed default argument values for ismine filterJaSK
2014-07-02Use script matching rather than destination matching for watch-only.Pieter Wuille
This changes the keystore data format, wallet format and IsMine logic to detect watch-only outputs based on direct script matching rather than first trying to convert outputs to destinations (addresses). The reason is that we don't know how the software that has the spending keys works. It may support the same types of scripts as us, but that is not guaranteed. Furthermore, it removes the ambiguity between addresses used as identifiers for output scripts or identifiers for public keys. One practical implication is that adding a normal pay-to-pubkey-hash address via importaddress will not cause payments to the corresponding full public key to be detected as IsMine. If that is wanted, add those scripts directly (importaddress now also accepts any hex-encoded script). Conflicts: src/wallet.cpp
2014-07-02fixed tiny glitch and improved readability like laanwj suggestedJaSK
2014-07-02Added argument to getbalance to include watchonly addresses and fixed errors ↵JaSK
in balance calculation.
2014-07-02Watchonly balances are shown separately in gui.JaSK
2014-07-02qt: Hide unspendable outputs in coin controlWladimir J. van der Laan
2014-07-02Add support for watch-only addressesPieter Wuille
Changes: * Add Add/Have WatchOnly methods to CKeyStore, and implementations in CBasicKeyStore. * Add similar methods to CWallet, and support entries for it in CWalletDB. * Make IsMine in script/wallet return a new enum 'isminetype', rather than a boolean. This allows distinguishing between spendable and unspendable coins. * Add a field fSpendable to COutput (GetAvailableCoins' return type). * Mark watchonly coins in listunspent as 'watchonly': true. * Add 'watchonly' to validateaddress, suppressing script/pubkey/... in this case. Based on a patch by Eric Lombrozo. Conflicts: src/qt/walletmodel.cpp src/rpcserver.cpp src/wallet.cpp
2014-06-27Formatting, spelling, comment fixes.Tom Harding
2014-06-27Add -respendnotify option and new RPC dataTom Harding
-respendnotify=<cmd> Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID) Add respendsobserved array to gettransaction, listtransactions, and listsinceblock RPCs. This omits the malleated clones that are included in the walletconflicts array. Add RPC help for respendsobserved and walletconflicts (help was missing for the latter).
2014-06-27UI to alert of respend attempt affecting wallet.Tom Harding
Respend transactions that conflict with transactions already in the wallet are added to it. They are not displayed unless they also involve the wallet, or get into a block. If they do not involve the wallet, they continue not to affect balance. Transactions that involve the wallet, and have conflicting non-equivalent transactions, are highlighted in red. When the conflict first occurs, a modal dialog is thrown. CWallet::SyncMetaData is changed to sync only to equivalent transactions. When a conflict is added to the wallet, counter nConflictsReceived is incremented. This acts like a change in active block height for the purpose of triggering UI updates.
2014-06-25Move network-time related functions to timedata.cpp/hWladimir J. van der Laan
The network time-offset-mangement functions from util.cpp are moved to timedata.(cpp|h). This breaks the dependency of util on netbase.
2014-06-24Merge pull request #3674Wladimir J. van der Laan
77cbd46 Let -zapwallettxes recover transaction meta data (Cozz Lovan)
2014-06-22Code simplifications after CTransaction::GetHash() cachingPieter Wuille
2014-06-21Add CMutableTransaction and make CTransaction immutable.Pieter Wuille
In addition, introduce a cached hash inside CTransaction, to prevent recalculating it over and over again.
2014-06-20AvailableCoins: acquire cs_main mutexPavel Vasin
It's required when called from WalletModel
2014-06-16Let -zapwallettxes recover transaction meta dataCozz Lovan