aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #3669 from gavinandresen/dead_txnsGavin Andresen2014-02-141-2/+8
|\| | | | | Handle "conflicted" transactions properly
| * Handle "conflicted" transactions properlyGavin Andresen2014-02-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend CMerkleTx::GetDepthInMainChain with the concept of a "conflicted" transaction-- a transaction generated by the wallet that is not in the main chain or in the mempool, and, therefore, will likely never be confirmed. GetDepthInMainChain() now returns -1 for conflicted transactions (0 for unconfirmed-but-in-the-mempool, and >1 for confirmed). This makes getbalance, getbalance '*', and listunspent all agree when there are mutated transactions in the wallet. Before: listunspent: one 49BTC output getbalance: 96 BTC (change counted twice) getbalance '*': 46 BTC (spends counted twice) After: all agree, 49 BTC available to spend.
* | Add -zapwallettxes cli/config option, used for wallet recoveryJeff Garzik2014-02-141-0/+1
|/ | | | | This diagnostic tool removes all "tx" records from the wallet db, then forces a full rescan, to rebuild "tx" records accurately.
* Merge pull request #3662Wladimir J. van der Laan2014-02-131-1/+1
|\ | | | | | | 0542619 Rename IsConfirmed to IsTrusted to better match the intended behavior. (Gregory Maxwell)
| * Rename IsConfirmed to IsTrusted to better match the intended behavior.Gregory Maxwell2014-02-121-1/+1
| | | | | | | | This doesn't change the functionality at all.
* | If requested, actually treat uncomfirmed change as being uncomfirmedb6393ce9-d324-4fe1-996b-acf82dbc3d532014-02-121-1/+1
|/ | | | | This commit strengthens 1bbca249b202c4802cc2c4d4de4a26e6392b4d92 by updating the CWalletTx::IsConfirmed() function. If (bSpendZeroConfChange==false), then IsConfirmed() should actually treat unconfirmed change as being unconfirmed.
* Add option to avoid spending unconfirmed changeWladimir J. van der Laan2014-02-111-0/+1
|
* wallet: add interface for storing generic data on destinationsWladimir J. van der Laan2014-01-191-0/+12
|
* Merge pull request #3401Wladimir J. van der Laan2014-01-061-3/+10
|\ | | | | | | | | | | 012ca1c LoadWallet: acquire cs_wallet mutex before clearing setKeyPool (Wladimir J. van der Laan) 9569168 Document cs_wallet lock and add AssertLockHeld (Wladimir J. van der Laan) 19a5676 Use mutex pointer instead of name for AssertLockHeld (Wladimir J. van der Laan)
| * Document cs_wallet lock and add AssertLockHeldWladimir J. van der Laan2013-12-191-3/+10
| | | | | | | | | | Add locking assertions to wallet to all methods that access internal fields and do not aquire the cs_wallet mutex.
* | Merge pull request #3412Wladimir J. van der Laan2013-12-191-0/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | c3a7f51 Move `verifymessage` from rpcwallet to rpcmisc (Wladimir J. van der Laan) 723a03d Move `createmultisig` from rpcwallet to rpcmisc (Wladimir J. van der Laan) 452955f Move `validateaddress` from rpcwallet to rpcmisc (Wladimir J. van der Laan) cd7fa8b Move `nTransactionFee` from main.cpp to wallet.cpp (Wladimir J. van der Laan) a943bde Move `settxfee` from rpcblockchain to rpcwallet (Wladimir J. van der Laan) 16bc9aa Move `getinfo` from rpcnet to rpcmisc (Wladimir J. van der Laan) 652e156 add new RPC implementation file `rpcmisc.cpp` (Wladimir J. van der Laan)
| * Move `nTransactionFee` from main.cpp to wallet.cppWladimir J. van der Laan2013-12-131-0/+3
| | | | | | | | | | Transaction fee is only used by the wallet. No need for it to be in main.cpp.
* | Remove unused ThreadSafeAskFee from ui_interfaceWladimir J. van der Laan2013-12-141-2/+2
|/ | | | | | ThreadSafeAskFee is effectively unused. It is only called when the fAskFee parameter on SendMoney or SendMoneyToDestination is true, which never happens. Remove it.
* Coincontrol cleanup (e.g. add missing license)Philip Kaufmann2013-11-181-5/+5
| | | | | | | | | - add missing license headers - make compatible with Qt5 - enforce header cleanup style - small code style cleanups - rename Coin Control dialog into Coin Control Address Selection - use default font for the windows labels (no monospace)
* Coin Control FeaturesCozz Lovan2013-11-141-4/+5
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-74/+78
| | | | | | | | | 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.
* Use boost signals for callbacks from main to walletPieter Wuille2013-10-261-5/+4
|
* Remove broken PrintWallet functionalityPieter Wuille2013-10-261-2/+0
|
* Do not treat fFromMe transaction differently when broadcastingPieter Wuille2013-10-261-2/+0
|
* Bump Year Number to 2013super32013-10-201-1/+1
|
* Replace printf with LogPrintf / LogPrintGavin Andresen2013-09-181-1/+1
|
* qt: Handle address purpose in incremental updatesWladimir J. van der Laan2013-08-291-2/+6
| | | | | | Correctly use the purpose of addresses that are added after the start of the client. Addresses with purpose "refund" and "change" should not be visible in the GUI. This is now handled correctly.
* Remove fAllowReuse from GetKeyFromPool.Gregory Maxwell2013-08-231-1/+1
| | | | With the GUI password fix this was always false.
* Payment Protocol: X509-validated payment requestsGavin Andresen2013-08-221-2/+4
| | | | | | | | Add support for a Payment Protocol to Bitcoin-Qt. Payment messages are protocol-buffer encoded and communicated over http(s), so this adds a dependency on the Google protocol buffer library, and requires Qt with OpenSSL support.
* Refactor: Move GetAccountAddresses to CWalletGavin Andresen2013-08-221-5/+2
|
* Refactor: CAddressBookData for mapAddressBookGavin Andresen2013-08-221-1/+17
| | | | | | | | Straight refactor, so mapAddressBook stores a CAddressBookData (which just contains a std::string) instead of a std::string. Preparation for payment protocol work, which will add the notion of refund addresses to the address book.
* Merge pull request #2776 from jgarzik/keypoolsizeGavin Andresen2013-08-141-2/+2
|\ | | | | RPC: keypoolrefill now permits optional size parameter, to bump keypool
| * CWallet::TopUpKeyPool() takes optional pool size argumentJeff Garzik2013-06-251-2/+2
| | | | | | | | Also, GetKeyPoolSize() now returns an accurate type, unsigned int.
* | Make sure new wallet variables are initializedPieter Wuille2013-07-291-0/+4
| |
* | Bugfix: Store last/next wallet resend times unique per CWallet objectLuke Dashjr2013-07-171-0/+3
|/
* Add GetKeyBirthTimes to walletPieter Wuille2013-06-221-1/+3
| | | | | | | Compute safe lower bounds on the birth times of all wallet keys. For pool keys or keys with metadata, the actually stored birth time is used. For all others, the birth times are inferred from the wallet transactions.
* Refactor keytime/metadata and wallet encryption bugfixPieter Wuille2013-06-201-3/+5
| | | | | | | | | | | | | | | | | | | | | Refactor keytime: * Key metadata is kept in a CWallet::mapKeyMetadata (std::map<CKeyId,CKeyMetadata>). * When generating a new key, time is put in that map, and new key is written. * AddKeyPubKey and AddCryptedKey do not take a creation time argument, but instead pull it from that map, if it exists there. Bugfix: * AddKeyPubKey and AddCryptedKey in CWallet didn't override the CKeyStore definition anymore. This is fixed, as they no longed need the nCreationTime argument now. Also a few related other changes: * Metadata can be overwritten. * Only GenerateNewKey calls GetTime(), as it's the only place where we know for sure a key was not constructed earlier. * When the nTimeFirstKey is known to be inaccurate, it is set to the value 1 (instead of 0, which would mean unknown). * Use CPubKey instead of std::vector<unsigned char> where possible.
* Remove broken option to skip input checking for wallet txn.Matt Corallo2013-06-131-1/+1
|
* Wallet: store key creation time. Calculate whole-wallet birthday.Jeff Garzik2013-06-101-2/+4
| | | | This also encapsulate wallet-read state information into CWalletScanState.
* Removed AcceptToMemoryPool method from CTransaction. This method belongs to ↵Eric Lombrozo2013-06-051-2/+2
| | | | | | | | | | | | | | | | | the mempool instance. Removed AreInputsStandard from CTransaction, made it a regular function in main. Moved CTransaction::GetOutputFor to CCoinsViewCache. Moved GetLegacySigOpCount and GetP2SHSigOpCount out of CTransaction into regular functions in main. Moved GetValueIn and HaveInputs from CTransaction into CCoinsViewCache. Moved AllowFree, ClientCheckInputs, CheckInputs, UpdateCoins, and CheckTransaction out of CTransaction and into main. Moved IsStandard and IsFinal out of CTransaction and put them in main as IsStandardTx and IsFinalTx. Moved GetValueOut out of CTransaction into main. Moved CTxIn, CTxOut, and CTransaction into core. Added minimum fee parameter to CTxOut::IsDust() temporarily until CTransaction is moved to core.h so that CTxOut needn't know about CTransaction.
* Get rid of db dependencies on mainEric Lombrozo2013-06-051-1/+3
|
* CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille2013-05-301-2/+2
|
* Merge pull request #2577 from gavinandresen/fee_bandaidGavin Andresen2013-05-041-2/+4
|\ | | | | Treat dust outputs as non-standard, un-hardcode TX_FEE constants
| * CreateTransaction: return strFailReason on failureGavin Andresen2013-05-031-2/+4
| |
* | Merge pull request #2566 from sipa/nodefGavin Andresen2013-05-031-1/+1
|\ \ | | | | | | Allow the default key to be unavailable
| * | Allow the default key to be unavailablePieter Wuille2013-04-251-1/+1
| |/ | | | | | | This solves the issue where no default key can be added after -salvagewallet.
* / Do not write to wallet during LoadWalletGavin Andresen2013-05-021-1/+1
|/ | | | | | | When debugging another issue, I found a hang-during-startup race condition due to LoadWallet calling SetMinVersion (via LoadCryptedKey). Writing to the file that you're in the process of reading is a bad idea.
* Always print full hashes (tx, block, inv)Pieter Wuille2013-04-071-1/+1
|
* Clean up shutdown processGavin Andresen2013-04-031-2/+1
|
* Merge pull request #1861 from jgarzik/coinlockGavin Andresen2012-12-121-0/+7
|\ | | | | Add new RPC "lockunspent", to prevent spending of selected outputs
| * Add new RPC "lockunspent", to prevent spending of selected outputsJeff Garzik2012-11-151-0/+7
| | | | | | | | | | | | and associated RPC "listlockunspent". This is a memory-only filter, which is empty when a node restarts.
* | Merge pull request #2009 from sipa/fixmoveGavin Andresen2012-11-161-1/+1
|\ \ | |/ |/| Prevent RPC 'move' from deadlocking
| * Prevent RPC 'move' from deadlockingPieter Wuille2012-11-141-1/+1
| | | | | | | | | | It seemed to create two CWalletDB objects that both grab the database lock.
* | add CWalletTx::GetImmatureCredit() and use it in CWallet::GetImmatureBalance()Philip Kaufmann2012-11-131-0/+18
| |
* | Transaction hash cachingPieter Wuille2012-10-201-1/+1
| | | | | | | | | | | | Use CBlock's vMerkleTree to cache transaction hashes, and pass them along as argument in more function calls. During initial block download, this results in every transaction's hash to be only computed once.