aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
AgeCommit message (Collapse)Author
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-19LoadWallet: acquire cs_wallet mutex before clearing setKeyPoolWladimir J. van der Laan
Make the function mutex-aware, to prevent having to lock cs_wallet at the call site in Init.
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-12-05Merge pull request #3356Wladimir J. van der Laan
d3ef9b0 Prevent empty transactions from being added to vtxPrev (Wladimir J. van der Laan)
2013-12-04Refuse to retransmit transactions without vinsWladimir J. van der Laan
Versions of bitcoin before 0.8.6 have a bug that inserted empty transactions into the vtxPrev in the wallet, which will cause the node to be banned when retransmitted, hence add a check for !tx.vin.empty() before RelayTransaction.
2013-12-04Prevent empty transactions from being added to vtxPrevWladimir J. van der Laan
CWalletTx::AddSupportingTransactions() was adding empty transaction to vtxPrev in some cases. Skip over these. Part one of the solution to #3190. This prevents invalid vtxPrev from entering the wallet, but not current ones being transmitted.
2013-12-02Sanitize assert usage and refuse to compile with NDEBUG.Gregory Maxwell
There were quite a few places where assert() was used with side effects, making operation with NDEBUG non-functional. This commit fixes all the cases I know about, but also adds an #error on NDEBUG because the code is untested without assertions and may still have vulnerabilities if used without assert.
2013-11-30Add verbose boolean to getrawmempoolGavin Andresen
Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
2013-11-30Refactor: move GetValueIn(tx) to tx.GetValueIn()Gavin Andresen
GetValueIn makes more sense as a CTransaction member.
2013-11-20Merge pull request #3257Wladimir J. van der Laan
379778b core: remove includes in .cpp, if header is already in .h (Philip Kaufmann)
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-15core: remove includes in .cpp, if header is already in .hPhilip Kaufmann
- example: if util.h includes stdint.h, remove it from util.cpp, as util.h is the first header included in util.cpp
2013-11-14Coin Control FeaturesCozz Lovan
2013-11-14pass nBytes as parameter to GetMinFee(..)Cozz 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-26Break dependency of init on wallet.Pieter Wuille
This required some code movement (what was CWalletTx::AcceptToMemoryPool doing in main?), and adding a few explicit includes that used to be implicit through init.h.
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-22Merge branch 'bugfix_unknownoutputs' of git://github.com/luke-jr/bitcoinGavin Andresen
Conflicts: src/wallet.cpp Fixed LogPrint/printf merge conflict.
2013-10-20Merge pull request #3074 from laanwj/2013_10_remove_default_key_1Gavin Andresen
Remove automatic update of default key
2013-10-20Merge pull request #3119Pieter Wuille
db0e8cc Bump Year Number to 2013 (super3)
2013-10-20Bump Year Number to 2013super3
2013-10-19Merge pull request #2945 from gmaxwell/fee-logic_encourage_sweepingGavin Andresen
[Fee logic] Don't count txins for priority to encourage sweeping.
2013-10-19Merge pull request #3008 from gavinandresen/CENTruleGavin Andresen
Two small free transaction policy changes
2013-10-11Refactor/encapsulate chain globals into a CChain classPieter Wuille
2013-10-10wallet: remove automatic update of default keyWladimir J. van der Laan
2013-10-04Remove CENT-output free transaction rule when relayingGavin Andresen
Remove the (relay/mempool) rule that all outputs of free transactions must be greater than 0.01 XBT. Dust spam is now taken care of by making dusty outputs non-standard.
2013-09-20fix some printf -> LogPrintf leftoversPhilip Kaufmann
2013-09-18Replace printf with LogPrintf / LogPrintGavin Andresen
2013-09-17[Fee logic] Don't count txins for priority to encourage sweeping.Gregory Maxwell
This changes the priority calculation to not include the size of per-txin data including up to 110 bytes of scriptsig so that transactions which sweep up extra UTXO don't lose priority relative to ones that don't. I'd toyed with some other variations, but it seems like any formulation which results in an incentive stronger than making them not count will sometimes create incentives to add extra outputs so that you have extra inputs to consume later. The maximum credit is limited so that users don't lose the disincentive to stuff random data in their transactions, the limit of 110 is based on the size of a P2SH redemption with a compressed public key. This shouldn't need a staged deployment because the priority is not used as a relay criteria, only a mining criteria.
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-31Remove #define loop from util.hGavin Andresen
Replace the loop macro with while (true). The #define caused problems for Qt.
2013-07-17Bugfix: Avoid trying to parse outputs that aren't relevant to ↵Luke Dashjr
CWalletTx::GetAmounts This fixes a warning when an output we aren't concerned with can't be parsed.
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-23Moved CBlock::ReadFromDisk out of CBlock to functions ReadBlockFromDisk in ↵Eric Lombrozo
main.h
2013-06-23Merge pull request #2592 from sipa/dumpwalletPieter Wuille
Add dumpwallet and importwallet RPC commands
2013-06-22Merge pull request #2660 from TheBlueMatt/gmfrefactorPieter Wuille
Refactor fee rules to make them actually readable.
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-14Refactor fee rules to make them actually readable.Matt Corallo
This (nearly) doesn't change fee rules at all: * To make it into the fee transaction area, the dPriority comparison changed from < to <= * We now just ignore transactions > MAX_BLOCK_SIZE/4 instead of doing some calculations to require increasingly large fees as size increases.