aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
Commit message (Collapse)AuthorAgeFilesLines
* include the chaintip *blockIndex in the SyncTransaction signalJonas Schnelli2015-12-041-1/+1
| | | | | - allows reducing of calls to main.cpp for getting the chaintip during transaction syncing - potentially allows reducing of cs_main locks
* Fix typo in wallet.cppMarcoFalke2015-12-021-1/+1
|
* Merge pull request #6216Wladimir J. van der Laan2015-12-021-9/+19
|\ | | | | | | db6047d Take the training wheels off anti-fee-sniping (Peter Todd)
| * Take the training wheels off anti-fee-snipingPeter Todd2015-06-211-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the off-by-one error w/nLockTime txs issue has been fixed by 87550eef (75a4d512 in the 0.11 branch) we can make the anti-fee-sniping protection create transactions with nLockTime set such that they're only valid in the next block, rather than an earlier block. There was also a concern about poor propagation, however testing with transactions with nLockTime = GetAdjustedTime()+1 as a proxy for nLockTime propagation, as well as a few transactions sent the moment blocks were received, has turned up no detectable issues with propagation. If you have a block at a given height you certainly have at least one peer with that block who will accept the transaction. That peer will certainly have other peers who will accept it, and soon essentially the whole network has the transaction. In particular, if a node recives a transaction that it rejects due to the tx being non-final, it will be accepted again later as it winds its way around the network.
* | Merge pull request #7096Wladimir J. van der Laan2015-12-011-4/+3
|\ \ | | | | | | | | | | | | | | | | | | ff723da [Qt] improve minimum absolute fee option - Only display the minimum absolute fee control if CoinControl is enabled (Jonas Schnelli) 31b508a [Qt] make use of the nMinimumTotalFee (absolute) in coincontrols fee calculation (Jonas Schnelli) 80462dd [Qt] use ASYMP_UTF8 (≈) whenever we show a fee that is not absolute (Jonas Schnelli) ecc7c82 Move fPayAtLeastCustomFee function to CC (Pieter Wuille)
| * | Move fPayAtLeastCustomFee function to CCPieter Wuille2015-11-301-4/+3
| | |
* | | Merge pull request #7105Wladimir J. van der Laan2015-12-011-14/+83
|\ \ \ | |/ / |/| | | | | 9ac63d6 Keep track of explicit wallet conflicts instead of using mempool (Pieter Wuille)
| * | Keep track of explicit wallet conflicts instead of using mempoolPieter Wuille2015-11-291-14/+83
| | |
* | | Default fPayAtLeastCustomFee to falseRyan Havar2015-11-281-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | This allows for much finer control of the transaction fees per kilobyte as it prevent small transactions using a fee that is more appropriate for one that is of a kilobyte. This also allows controlling the fee per kilobyte over rpc such that: bitcoin-cli settxfee `bitcoin-cli estimatefee 2` would make sense, while currently it grossly fails often by a factor of x3
* | [trivial] Reuse translation and cleanup DEFAULT_* valuesMarcoFalke2015-11-281-2/+2
| | | | | | | | | | * DEFAULT_DISABLE_SAFEMODE = false * Use DEFAULT_* constants for extern bools
* | Constrain constant values to a single location in codeLuke Dashjr2015-11-281-2/+2
| |
* | Merge pull request #6134Wladimir J. van der Laan2015-11-271-13/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | e304432 Pass reference to estimateSmartFee and cleanup whitespace (Suhas Daftuar) 56106a3 Expose RPC calls for estimatesmart functions (Alex Morcos) e93a236 add estimateSmartFee to the unit test (Alex Morcos) 6303051 EstimateSmart functions consider mempool min fee (Alex Morcos) f22ac4a Increase success threshold for fee estimation to 95% (Alex Morcos) 4fe2823 Change wallet and GUI code to use new smart fee estimation calls. (Alex Morcos) 22eca7d Add smart fee estimation functions (Alex Morcos)
| * | Pass reference to estimateSmartFee and cleanup whitespaceSuhas Daftuar2015-11-241-1/+1
| | |
| * | Change wallet and GUI code to use new smart fee estimation calls.Alex Morcos2015-11-161-14/+12
| | |
* | | Optimisation: Store transaction list order in memory rather than compute it ↵Luke Dashjr2015-11-211-29/+18
|/ / | | | | | | | | | | every need Huge performance improvement (450%) for zapwallettxes
* | Merge pull request #6163Wladimir J. van der Laan2015-11-101-1/+1
|\ \ | | | | | | | | | 87cbdb8 Globals: Explicit Consensus::Params arg for main: (Jorge Timón)
| * | Globals: Explicit Consensus::Params arg for main:Jorge Timón2015-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | -CheckBlockIndex -DisconnectTip -GetTransaction -InvalidateBlock -ProcessGetData -ReadBlockFromDisk
* | | Merge pull request #6887Wladimir J. van der Laan2015-11-051-2/+7
|\ \ \ | | | | | | | | | | | | | | | | 53238ff Clarify what minrelaytxfee does (MarcoFalke) abd8b76 [qt] Properly display required fee instead of minTxFee (MarcoFalke)
| * | | [qt] Properly display required fee instead of minTxFeeMarcoFalke2015-11-031-2/+7
| |/ /
* | | Merge pull request #6669Wladimir J. van der Laan2015-11-041-9/+7
|\ \ \ | |/ / |/| | | | | | | | | | | 6342a48 Init: Use DEFAULT_TRANSACTION_MINFEE in help message (MarcoFalke) a9c73a1 [wallet] Add comments for doxygen (MarcoFalke) 6b0e622 [wallet] Refactor to use new MIN_CHANGE (MarcoFalke)
| * | [wallet] Add comments for doxygenMarcoFalke2015-10-281-0/+1
| | |
| * | [wallet] Refactor to use new MIN_CHANGEMarcoFalke2015-10-281-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | * Introduce new constant MIN_CHANGE and use it instead of the hardcoded "CENT" * Add test case for MIN_CHANGE * Introduce new constant for -mintxfee default: DEFAULT_TRANSACTION_MINFEE = 1000
* | | Only call TrimToSize once per reorg/blocks disconnectMatt Corallo2015-10-131-1/+1
| | |
* | | Merge pull request #5924Wladimir J. van der Laan2015-10-011-7/+4
|\ \ \ | | | | | | | | | | | | 835c122 Clean up change computation in CreateTransaction. (Daniel Kraft)
| * | | Clean up change computation in CreateTransaction.Daniel Kraft2015-05-031-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | Compute the change directly as difference between the "requested" and the actual value returned by SelectCoins. This removes a duplication of the fee logic code.
* | | | Do not store Merkle branches in the wallet.Pieter Wuille2015-09-221-14/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Assume that when a wallet transaction has a valid block hash and transaction position in it, the transaction is actually there. We're already trusting wallet data in a much more fundamental way anyway. To prevent backward compatibility issues, a new record is used for storing the block locator in the wallet. Old wallets will see a wallet file synchronized up to the genesis block, and rescan automatically.
* | | Merge pull request #6415Wladimir J. van der Laan2015-08-141-2/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d042854 SQUASH "Implement watchonly support in fundrawtransaction" (Matt Corallo) 428a898 SQUASH "Add have-pubkey distinction to ISMINE flags" (Matt Corallo) 6bdb474 Implement watchonly support in fundrawtransaction (Matt Corallo) f5813bd Add logic to track pubkeys as watch-only, not just scripts (Matt Corallo) d3354c5 Add have-pubkey distinction to ISMINE flags (Matt Corallo) 5c17059 Update importaddress help to push its use to script-only (Matt Corallo) a1d7df3 Add importpubkey method to import a watch-only pubkey (Matt Corallo) 907a425 Add p2sh option to importaddress to import redeemScripts (Matt Corallo) 983d2d9 Split up importaddress into helper functions (Matt Corallo) cfc3dd3 Also remove pay-2-pubkey from watch when adding a priv key (Matt Corallo)
| * | | SQUASH "Implement watchonly support in fundrawtransaction"Matt Corallo2015-08-081-1/+1
| | | |
| * | | Implement watchonly support in fundrawtransactionMatt Corallo2015-07-201-2/+5
| | | | | | | | | | | | | | | | | | | | Some code and test cases stolen from Bryan Bishop <[email protected]> (pull #5524).
| * | | Also remove pay-2-pubkey from watch when adding a priv keyMatt Corallo2015-07-201-0/+3
| | | |
* | | | Make sure LogPrintf strings are line-terminatedWladimir J. van der Laan2015-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the cases where LogPrint[f] was accidentally called without line terminator, which resulted in concatenated log lines. (see e.g. #6492)
* | | | Includes: Cleanup around net main and walletJorge Timón2015-07-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
* | | | TRIVIAL: Missing includesJorge Timón2015-07-231-0/+2
|/ / /
* | | Merge pull request #6365Wladimir J. van der Laan2015-07-061-0/+9
|\ \ \ | | | | | | | | | | | | 5a7304b Move recently introduced CTransAction::IsEquivalentTo to CWalletTx (Wladimir J. van der Laan)
| * | | Move recently introduced CTransAction::IsEquivalentTo to CWalletTxWladimir J. van der Laan2015-07-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | CTransAction::IsEquivalentTo was introduced in #5881. This functionality is only useful to the wallet, and should never have been added to the primitive transaction type.
* | | | Merge pull request #6335Wladimir J. van der Laan2015-07-061-0/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | 9238ecb Policy: MOVEONLY: 3 functions to policy.o: (Luke Dashjr) 627b9de Policy: MOVEONLY: Create policy/policy.h with some constants (Jorge Timón)
| * | | Policy: MOVEONLY: Create policy/policy.h with some constantsJorge Timón2015-06-261-0/+1
| | | |
* | | | Merge pull request #5881Wladimir J. van der Laan2015-07-021-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | 5d34e16 Add txn_clone.py test (Tom Harding) defd2d5 Better txn_doublespend.py test (Tom Harding) b2b3619 Implement CTransaction::IsEquivalentTo(...) (Tom Harding)
| * | | | Implement CTransaction::IsEquivalentTo(...)Tom Harding2015-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define CTransaction::IsEquivalentTo(const CTransaction& tx) True if only scriptSigs are different. In other words, true if the two transactions are malleability clones. In other words, true if the two transactions have the same effect on the outside universe. In the wallet, only SyncMetaData for equivalent transactions.
* | | | | add CReserveScript to allow modular script keeping/returningJonas Schnelli2015-07-011-5/+6
| | | | | | | | | | | | | | | | | | | | - use one CReserveScript per mining thread
* | | | | fix GetScriptForMining() CReserveKey::keepKey() issueJonas Schnelli2015-06-301-2/+1
| | | | |
* | | | | detach wallet from minerJonas Schnelli2015-06-301-0/+11
| |/ / / |/| | |
* | | | Add FundTransaction method to walletMatt Corallo2015-06-111-11/+114
| |_|/ |/| | | | | | | | Some code stolen from Jonas Schnelli <[email protected]>
* | | Merge pull request #6152Wladimir J. van der Laan2015-06-051-12/+0
|\ \ \ | | | | | | | | | | | | 08d9373 Remove unused code from wallet and validation interface (Michael Ford)
| * | | Remove unused code from wallet and validation interfaceMichael Ford2015-05-181-12/+0
| | | | | | | | | | | | | | | | Fixes #6109
* | | | use const references where appropriatePhilip Kaufmann2015-06-041-1/+1
| | | |
* | | | Merge pull request #6183Wladimir J. van der Laan2015-06-011-5/+5
|\ \ \ \ | | | | | | | | | | | | | | | 28bf062 Fix off-by-one error w/ nLockTime in the wallet (Peter Todd)
| * | | | Fix off-by-one error w/ nLockTime in the walletPeter Todd2015-05-271-5/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously due to an off-by-one error the wallet ignored nLockTime-by-height transactions that would be valid in the next block even though they are accepted into the mempool. The transactions wouldn't show up until confirmed, nor would they be included in the unconfirmed balance. Similar to the mempool behavior fix in 665bdd3b, the wallet code was calling IsFinalTx() directly without taking into account the fact that doing so tells you if the transaction could have been mined in the *current* block, rather than the next block. To fix this we strip IsFinalTx() of non-consensus-critical functionality, removing the default arguments, and add CheckFinalTx() to check if a transaction will be final in the next block.
* | | | Merge pull request #5669Wladimir J. van der Laan2015-05-271-0/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | da29ecb Consensus: MOVEONLY: Move CValidationState from main consensus/validation (jtimon) 27afcd8 Consensus: Refactor: Decouple CValidationState from main::AbortNode() (Cory Fields)
| * | | Consensus: MOVEONLY: Move CValidationState from main consensus/validationjtimon2015-05-151-0/+1
| | | |