aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
AgeCommit message (Collapse)Author
2014-04-02[Qt] rescan progressCozz Lovan
2014-03-29Add nHighTransactionFeeWarning as per #3969.Bardi Harborow
2014-03-28Make GetAvailableCredit run GetHash() only once per transaction.Gregory Maxwell
This makes the first getbalance/getinfo 63x faster on my wallet.
2014-03-05Fix null pointer in IsTrusted()Cozz Lovan
2014-02-26Remove CWalletTx::vfSpentGavin Andresen
Use the spent outpoint multimap to figure out which wallet transaction outputs are unspent, instead of a vfSpent array that is saved to disk.
2014-02-18Wallet locking fixes for -DDEBUG_LOCKORDERGavin Andresen
Compiling with -DDEBUG_LOCKORDER and running the qa/rpc-test/ regression tests uncovered a couple of wallet methods that should (but didn't) acquire the cs_wallet mutext. I also changed the AssertLockHeld() routine print to stderr and abort, instead of printing to debug.log and then assert()'ing. It is annoying to look in debug.log to find out which AssertLockHeld is failing.
2014-02-15Merge pull request #3671 from gavinandresen/txn_conflictsGavin Andresen
Report transaction conflicts, and tentative account balance fix
2014-02-14Track and report wallet transaction clonesGavin Andresen
Adds a "walletconflicts" array to transaction info; if a wallet transaction is mutated, the alternate transaction id or ids are reported there (usually the array will be empty). Metadata from the original transaction is copied to the mutant, so the transaction time and "from" account of the mutant are reported correctly.
2014-02-14Merge pull request #3669 from gavinandresen/dead_txnsGavin Andresen
Handle "conflicted" transactions properly
2014-02-14Add -zapwallettxes cli/config option, used for wallet recoveryJeff Garzik
This diagnostic tool removes all "tx" records from the wallet db, then forces a full rescan, to rebuild "tx" records accurately.
2014-02-14Handle "conflicted" transactions properlyGavin Andresen
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.
2014-02-13Merge pull request #3662Wladimir J. van der Laan
0542619 Rename IsConfirmed to IsTrusted to better match the intended behavior. (Gregory Maxwell)
2014-02-12Rename IsConfirmed to IsTrusted to better match the intended behavior.Gregory Maxwell
This doesn't change the functionality at all.
2014-02-12If requested, actually treat uncomfirmed change as being uncomfirmedb6393ce9-d324-4fe1-996b-acf82dbc3d53
This commit strengthens 1bbca249b202c4802cc2c4d4de4a26e6392b4d92 by updating the CWalletTx::IsConfirmed() function. If (bSpendZeroConfChange==false), then IsConfirmed() should actually treat unconfirmed change as being unconfirmed.
2014-02-11Add option to avoid spending unconfirmed changeWladimir J. van der Laan
2014-01-19wallet: add interface for storing generic data on destinationsWladimir J. van der Laan
2014-01-06Merge pull request #3401Wladimir J. van der Laan
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)
2013-12-19Merge pull request #3412Wladimir J. van der Laan
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)
2013-12-19Document cs_wallet lock and add AssertLockHeldWladimir J. van der Laan
Add locking assertions to wallet to all methods that access internal fields and do not aquire the cs_wallet mutex.
2013-12-14Remove unused ThreadSafeAskFee from ui_interfaceWladimir J. van der Laan
ThreadSafeAskFee is effectively unused. It is only called when the fAskFee parameter on SendMoney or SendMoneyToDestination is true, which never happens. Remove it.
2013-12-13Move `nTransactionFee` from main.cpp to wallet.cppWladimir J. van der Laan
Transaction fee is only used by the wallet. No need for it to be in main.cpp.
2013-11-18Coincontrol cleanup (e.g. add missing license)Philip Kaufmann
- 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)
2013-11-14Coin Control FeaturesCozz Lovan
2013-11-10Cleanup code using forward declarations.Brandon Dahler
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.
2013-10-26Use boost signals for callbacks from main to walletPieter Wuille
2013-10-26Remove broken PrintWallet functionalityPieter Wuille
2013-10-26Do not treat fFromMe transaction differently when broadcastingPieter Wuille
2013-10-20Bump Year Number to 2013super3
2013-09-18Replace printf with LogPrintf / LogPrintGavin Andresen
2013-08-29qt: Handle address purpose in incremental updatesWladimir J. van der Laan
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.
2013-08-23Remove fAllowReuse from GetKeyFromPool.Gregory Maxwell
With the GUI password fix this was always false.
2013-08-22Payment Protocol: X509-validated payment requestsGavin Andresen
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.
2013-08-22Refactor: Move GetAccountAddresses to CWalletGavin Andresen
2013-08-22Refactor: CAddressBookData for mapAddressBookGavin Andresen
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.
2013-08-14Merge pull request #2776 from jgarzik/keypoolsizeGavin Andresen
RPC: keypoolrefill now permits optional size parameter, to bump keypool
2013-07-29Make sure new wallet variables are initializedPieter Wuille
2013-07-17Bugfix: Store last/next wallet resend times unique per CWallet objectLuke Dashjr
2013-06-25CWallet::TopUpKeyPool() takes optional pool size argumentJeff Garzik
Also, GetKeyPoolSize() now returns an accurate type, unsigned int.
2013-06-22Add GetKeyBirthTimes to walletPieter Wuille
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.
2013-06-20Refactor keytime/metadata and wallet encryption bugfixPieter Wuille
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.
2013-06-13Remove broken option to skip input checking for wallet txn.Matt Corallo
2013-06-10Wallet: store key creation time. Calculate whole-wallet birthday.Jeff Garzik
This also encapsulate wallet-read state information into CWalletScanState.
2013-06-05Removed AcceptToMemoryPool method from CTransaction. This method belongs to ↵Eric Lombrozo
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.
2013-06-05Get rid of db dependencies on mainEric Lombrozo
2013-05-30CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille
2013-05-04Merge pull request #2577 from gavinandresen/fee_bandaidGavin Andresen
Treat dust outputs as non-standard, un-hardcode TX_FEE constants
2013-05-03Merge pull request #2566 from sipa/nodefGavin Andresen
Allow the default key to be unavailable
2013-05-03CreateTransaction: return strFailReason on failureGavin Andresen
2013-05-02Do not write to wallet during LoadWalletGavin Andresen
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.
2013-04-25Allow the default key to be unavailablePieter Wuille
This solves the issue where no default key can be added after -salvagewallet.