Luke Dashjr
5394b3940d
Wallet: Split main logic from InitLoadWallet into CreateWalletFromFile
2016-11-11 11:35:49 +00:00
Luke Dashjr
fb0c934d1b
Wallet: Let the interval-flushing thread figure out the filename
2016-11-11 11:35:49 +00:00
Pieter Wuille
528472111b
Get rid of nType and nVersion
...
Remove the nType and nVersion as parameters to all serialization methods
and functions. There is only one place where it's read and has an impact
(in CAddress), and even there it does not impact any of the recursively
invoked serializers.
Instead, the few places that need nType or nVersion are changed to read
it directly from the stream object, through GetType() and GetVersion()
methods which are added to all stream classes.
2016-11-07 13:56:27 -08:00
Wladimir J. van der Laan
d1871da7fe
Merge #9071 : Declare wallet.h functions inline
...
2ca882a
Declare wallet.h functions inline (Pieter Wuille)
2016-11-03 10:22:11 +01:00
Pieter Wuille
ed0cc50afe
Merge #9036 : wallet: Change default confirm target from 2 to 6
...
0fdf810
wallet: Change default confirm target from 2 to 6 (Wladimir J. van der Laan)
2016-11-02 23:36:27 -07:00
Pieter Wuille
2ca882ad41
Declare wallet.h functions inline
2016-11-02 17:29:16 -07:00
Wladimir J. van der Laan
6a1343f73b
Merge #8977 : [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread)
...
cab1da7
[Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) (Jonas Schnelli)
2016-11-02 21:37:43 +01:00
Wladimir J. van der Laan
0fdf810d26
wallet: Change default confirm target from 2 to 6
...
Recent discussion (in IRC meetings, and e.g. #8989 ) has shown a
preference for the default confirm target for smartfees to be 6 instead
of 2, to avoid overpaying fees for questionable gain.
6 is also a compromise between the GUI's pre-#8989 value of 25 and the
bitcoind `-txconfirmtarget` default of 2. These were unified in #8989 ,
but this has made the (overly expensive) default of 2 as GUI default.
2016-10-28 14:15:46 +02:00
instagibbs
169bdabe14
Return useful error message on ATMP failure
2016-10-26 15:59:33 -04:00
Jonas Schnelli
cab1da745b
[Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread)
2016-10-20 09:22:13 +02:00
Wladimir J. van der Laan
e10af96cf4
Merge #8287 : [wallet] Set fLimitFree = true
...
fa8b02d
[rpc] rawtx: Prepare fLimitFree to make it an option (MarcoFalke)
fa28bfa
[wallet] Set fLimitFree = true (MarcoFalke)
2016-10-18 21:05:07 +02:00
Patrick Strateman
e198c521d3
Move key derivation logic from GenerateNewKey to DeriveNewChildKey
2016-09-30 19:11:00 +02:00
Wladimir J. van der Laan
9b94cca41f
Merge #8658 : Remove unused statements in serialization
...
64d9507
[WIP] Remove unused statement in serialization (Pavel Janík)
2016-09-29 15:00:22 +02:00
MarcoFalke
fa58edbffe
[wallet] Introduce DEFAULT_DISABLE_WALLET
2016-09-21 12:06:58 +02:00
Patrick Strateman
02e2a81536
Remove pwalletdb parameter from CWallet::AddAccountingEntry
2016-09-15 13:50:59 -07:00
Patrick Strateman
d2e678d7d2
Add CWallet::ReorderTransactions and use in accounting_tests.cpp
2016-09-15 06:52:15 -07:00
Patrick Strateman
59adc86680
Add CWallet::ListAccountCreditDebit
...
Simple pass through for CWalletDB::ListAccountCreditDebit
2016-09-15 06:52:15 -07:00
Spencer Lievens
a56037805c
[WALLET] Addition of ImmatureCreditCached to MarkDirty()
...
To protect against possible invalidation and to bring conformity to the code.
2016-09-13 23:30:32 +01:00
Wladimir J. van der Laan
37ac67816a
Merge #8601 : Add option to opt into full-RBF when sending funds (rebase, original by petertodd)
...
86726d8
Rename `-optintofullrbf` option to `-walletrbf` (Wladimir J. van der Laan)
05fa823
wallet: Add BIP125 comment for MAXINT-1/-2 behavior (Wladimir J. van der Laan)
152f45b
Add option to opt into full-RBF when sending funds (Peter Todd)
2016-09-13 11:35:26 +02:00
Wladimir J. van der Laan
86726d8680
Rename -optintofullrbf
option to -walletrbf
...
This makes it clear that this is a wallet option.
2016-09-13 11:32:29 +02:00
Pavel Janík
64d9507ea5
[WIP] Remove unused statement in serialization
2016-09-09 13:59:34 +02:00
Cory Fields
5b446dd5b1
net: Pass CConnection to wallet rather than using the global
2016-09-08 12:04:35 -04:00
Peter Todd
152f45ba58
Add option to opt into full-RBF when sending funds
2016-08-26 12:10:42 +02:00
MarcoFalke
fa28bfa341
[wallet] Set fLimitFree = true
2016-08-25 15:27:48 +02:00
Wladimir J. van der Laan
f9167003d9
Merge #8445 : Move CWallet::setKeyPool to private section of CWallet.
...
8680d3a
Move wallet initialization logic from AppInit2 to CWallet::InitLoadWallet (Patrick Strateman)
e86eb71
Move CWallet::setKeyPool to private section of CWallet (Patrick Strateman)
2016-08-24 10:33:16 +02:00
Jonas Schnelli
914154f0cc
[Qt] add HD enabled/disabled icon to the status bar
2016-08-19 09:21:04 +02:00
Patrick Strateman
e86eb71604
Move CWallet::setKeyPool to private section of CWallet
2016-08-17 15:24:57 -07:00
Jonas Schnelli
b3b3c2a562
Reduce cs_main locks during ConnectTip/SyncWithWallets
2016-08-12 14:53:10 +02:00
Pieter Wuille
c7e05b35ab
Merge #8432 : Make CWallet::fFileBacked private.
...
29c2d99
Make CWallet::fFileBacked private. (Patrick Strateman)
2016-08-01 02:12:47 +02:00
Patrick Strateman
29c2d99bc9
Make CWallet::fFileBacked private.
2016-07-30 11:27:48 -07:00
Patrick Strateman
867f842f1e
Remove CWalletDB* parameter from CWallet::AddToWallet
2016-07-29 17:04:14 -07:00
Patrick Strateman
00f09c920c
Split CWallet::AddToWallet into AddToWallet and LoadToWallet.
...
This removes the fFromLoadWallet flag in AddToWallet. These were already
effectively two methods.
2016-07-29 17:04:14 -07:00
Jonas Schnelli
2266b43e33
Port from 0.13: Create a new HD seed after encrypting the wallet
...
Forward-ports two commits from 0.13:
- [0.13] Create a new HD seed after encrypting the wallet
- [Wallet] Add CKeyMetadata record for HDMasterKey(s), factor out HD key generation
Github-Pull: #8389
Rebased-From: f142c11ac634df487cc4bc65a5f1c9a3e3563dd9 de45c065f0648c4c41b57cb492420ceeed29dd11
2016-07-28 13:22:33 +02:00
Jonas Schnelli
77c912d21c
[Wallet] add HD xpriv to dumpwallet
2016-07-27 15:19:23 +02:00
Jonas Schnelli
a4f137f367
[Wallet] Ensure <0.13 clients can't open HD wallets
2016-07-18 22:56:45 +02:00
Jonas Schnelli
7945088d41
[Wallet] comsetic non-code changes for the HD feature
2016-07-15 10:34:08 +02:00
Jonas Schnelli
986c223214
[Wallet] print hd masterkeyid in getwalletinfo
2016-07-09 12:12:36 +02:00
Wladimir J. van der Laan
b67a4726df
Merge #8035 : [Wallet] Add simplest BIP32/deterministic key generation implementation
...
afcd77e
Detect -usehd mismatches when wallet.dat already exists (Jonas Schnelli)
17c0131
[Docs] Add release notes and bip update for Bip32/HD wallets (Jonas Schnelli)
c022e5b
[Wallet] use constant for bip32 hardened key limit (Jonas Schnelli)
f190251
[Wallet] Add simplest BIP32/deterministic key generation implementation (Jonas Schnelli)
2016-06-14 11:44:22 +02:00
Patrick Strateman
152ab236ea
Improve CWallet API with new GetAccountPubkey function.
...
Remove one more caller that is passing CWalletDB.
2016-06-06 07:02:05 -07:00
Wladimir J. van der Laan
243ac0c75b
Merge #8137 : Improve CWallet API with new AccountMove function.
...
9dfaa1c
Improve CWallet API with new AccountMove function. (Patrick Strateman)
2016-06-06 14:59:10 +02:00
Wladimir J. van der Laan
8c1e49ba13
Merge #7967 : [RPC] add feerate option to fundrawtransaction
...
04eaa90
Add more clear interface for CoinControl.h regarding individual feerate (Jonas Schnelli)
3b35e48
[RPC] add feerate option to fundrawtransaction (Jonas Schnelli)
2016-06-03 15:47:48 +02:00
Patrick Strateman
9dfaa1cb70
Improve CWallet API with new AccountMove function.
2016-06-02 06:00:59 -07:00
Jonas Schnelli
f19025106d
[Wallet] Add simplest BIP32/deterministic key generation implementation
2016-05-31 14:47:00 +02:00
Patrick Strateman
380498aba4
Move BackupWallet to CWallet::BackupWallet
2016-05-16 17:48:25 -07:00
Patrick Strateman
ecb9741ec3
Move GetAccountBalance from rpcwallet.cpp into CWallet::GetAccountBalance
2016-05-16 17:48:25 -07:00
Patrick Strateman
0fd599767d
Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk
2016-05-09 00:20:17 -07:00
Jonas Schnelli
04eaa90958
Add more clear interface for CoinControl.h regarding individual feerate
2016-05-06 11:01:50 +02:00
Jonas Schnelli
3b35e4896b
[RPC] add feerate option to fundrawtransaction
2016-04-28 22:04:07 +02:00
Wladimir J. van der Laan
46880ed2fd
Merge #7688 : List solvability in listunspent output and improve help
...
c3932b3
List solvability in listunspent output and improve help (Pieter Wuille)
2016-04-25 14:46:29 +02:00
Wladimir J. van der Laan
a25a4f5b04
wallet_ismine.h → script/ismine.h
...
Removes conditional dependency of `src/test` on wallet.
Makes multisig and P2SH tests complete without wallet built-in.
2016-04-18 15:14:36 +02:00
João Barbosa
f2d0944eb3
Add lockUnspents option to fundrawtransaction
2016-04-15 15:36:05 +02:00
João Barbosa
af4fe7fd12
Add change options to fundrawtransaction
2016-04-15 15:36:05 +02:00
MarcoFalke
fada0c422c
[doc] Fix doxygen comments for members
2016-04-03 11:58:01 +02:00
Wladimir J. van der Laan
30c2dd8d05
Merge #7691 : [Wallet] refactor wallet/init interaction
...
25340b7
[Wallet] refactor wallet/init interaction (Jonas Schnelli)
2016-04-02 11:07:39 +02:00
instagibbs
f1bb13c93d
Added companion removeprunedfunds call.
2016-03-23 10:40:38 -04:00
João Barbosa
bb16c8894b
Prevent multiple calls to CWallet::AvailableCoins
2016-03-22 08:43:37 +00:00
Jonas Schnelli
25340b7cd5
[Wallet] refactor wallet/init interaction
2016-03-22 08:20:59 +01:00
Pieter Wuille
c3932b3270
List solvability in listunspent output and improve help
2016-03-14 19:22:11 +01:00
Jonas Schnelli
fc7c60d699
[Wallet] move "load wallet phase" to CWallet
2016-03-11 14:31:06 +01:00
Jonas Schnelli
72c2651581
[Wallet] move wallet help string creation to CWallet
2016-03-05 13:27:04 -05:00
Wladimir J. van der Laan
d2228384de
Merge #6480 : include the chaintip blockindex in the SyncTransaction signal, add signal UpdateTip()
...
7d0bf0b
include the chaintip *blockIndex in the SyncTransaction signal (Jonas Schnelli)
2016-02-04 17:03:09 +01:00
MarcoFalke
fad6244879
ATMP: make nAbsurdFee const
2016-02-03 13:14:23 +01:00
MarcoFalke
fa762d0f00
[wallet.h] Remove main.h include
2016-02-03 12:44:43 +01:00
MarcoFalke
fa79db2641
Move maxTxFee out of mempool
...
Also, remove default values in CMerkleTx::AcceptToMemoryPool()
2016-02-02 20:08:51 +01:00
MarcoFalke
fa331db68b
mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee
2016-01-30 11:29:22 +01:00
Jonas Schnelli
dd2dc400ee
[RPC, Wallet] Move RPC dispatch table registration to wallet/ code
...
Allow extending the rpc dispatch table by appending commands when server is not running.
2016-01-20 15:03:25 +01:00
Wladimir J. van der Laan
be6d5a617d
Merge pull request #7312
...
d11fc16
[Wallet] Call notification signal when a transaction is abandoned (Jonas Schnelli)
df0e222
Add RPC test for abandoned and conflicted transactions. (Alex Morcos)
01e06d1
Add new rpc call: abandontransaction (Alex Morcos)
9e69717
Make wallet descendant searching more efficient (Alex Morcos)
2016-01-13 15:47:45 +01:00
Alex Morcos
01e06d1fa3
Add new rpc call: abandontransaction
...
Unconfirmed transactions that are not in your mempool either due to eviction or other means may be unlikely to be mined. abandontransaction gives the wallet a way to no longer consider as spent the coins that are inputs to such a transaction. All dependent transactions in the wallet will also be marked as abandoned.
2016-01-13 08:42:04 -05:00
Wladimir J. van der Laan
c49551886a
Merge pull request #7296
...
bebe58b
SQUASHME: Fix rpc tests that assumed fallback to minRelayTxFee (Alex Morcos)
e420a1b
Add sane fallback for fee estimation (Alex Morcos)
995b9f3
Always respect GetRequiredFee for wallet txs (Alex Morcos)
2016-01-13 11:04:31 +01:00
Cory Fields
57d2f62c99
c++11: CAccountingEntry must be defined before use in a list
...
c++11ism. This fixes builds against libc++.
2016-01-05 17:17:29 -05:00
Alex Morcos
e420a1b15e
Add sane fallback for fee estimation
...
Add new commandline option "-fallbackfee" to use when fee estimation does not have sufficient data.
2016-01-05 13:13:23 -05:00
Wladimir J. van der Laan
605c17844e
Merge pull request #7205
...
fa71669
[devtools] Use git pretty-format for year parsing (MarcoFalke)
fa24439
Bump copyright headers to 2015 (MarcoFalke)
fa6ad85
[devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
2016-01-05 14:11:40 +01:00
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
2015-12-13 18:08:39 +01:00
Jonas Schnelli
7d0bf0bb46
include the chaintip *blockIndex in the SyncTransaction signal
...
- allows reducing of calls to main.cpp for getting the chaintip during transaction syncing
- potentially allows reducing of cs_main locks
2015-12-04 09:18:53 +01:00
Jonas Schnelli
a3c3ddbd7b
[Qt] add InMempool() info to transaction details
2015-12-02 08:38:31 +01:00
Wladimir J. van der Laan
9490bd71bd
Merge pull request #7096
...
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)
2015-12-01 09:59:03 +01:00
Pieter Wuille
ecc7c82361
Move fPayAtLeastCustomFee function to CC
2015-11-30 14:09:04 +01:00
Pieter Wuille
9ac63d6d30
Keep track of explicit wallet conflicts instead of using mempool
2015-11-29 13:24:02 +01:00
MarcoFalke
faf93f37fe
[trivial] Reuse translation and cleanup DEFAULT_* values
...
* DEFAULT_DISABLE_SAFEMODE = false
* Use DEFAULT_* constants for extern bools
2015-11-28 19:01:11 +01:00
Luke Dashjr
b966aa836a
Constrain constant values to a single location in code
2015-11-28 18:47:29 +01:00
Luke Dashjr
3e7c89196c
Optimisation: Store transaction list order in memory rather than compute it every need
...
Huge performance improvement (450%) for zapwallettxes
2015-11-21 01:48:25 +00:00
Wladimir J. van der Laan
3694b74fa9
Merge pull request #6887
...
53238ff
Clarify what minrelaytxfee does (MarcoFalke)
abd8b76
[qt] Properly display required fee instead of minTxFee (MarcoFalke)
2015-11-05 12:11:11 +01:00
Wladimir J. van der Laan
8a95a18562
Merge pull request #6669
...
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)
2015-11-04 12:30:50 +01:00
MarcoFalke
abd8b768ee
[qt] Properly display required fee instead of minTxFee
2015-11-03 08:53:37 +01:00
MarcoFalke
a9c73a130e
[wallet] Add comments for doxygen
2015-10-28 11:15:48 +01:00
MarcoFalke
6b0e622c25
[wallet] Refactor to use new MIN_CHANGE
...
* 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
2015-10-28 10:52:46 +01:00
Pieter Wuille
391dff16fe
Do not store Merkle branches in the wallet.
...
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.
2015-09-22 18:51:07 +02:00
Wladimir J. van der Laan
ddd8d80c63
Merge pull request #6415
...
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)
2015-08-14 16:28:37 +02:00
Jorge Timón
60c8bac77c
Includes: Cleanup around net main and wallet
...
-Move from .h to .cpp: in main, net and wallet
-Remove unnecessary #include "main.h"
-Cleanup some wallet files includes
2015-07-23 21:10:26 +02:00
Jorge Timón
9dd793f499
TRIVIAL: Missing includes
2015-07-23 21:10:22 +02:00
Matt Corallo
6bdb474dc9
Implement watchonly support in fundrawtransaction
...
Some code and test cases stolen from
Bryan Bishop <bryan@ledgerx.com> (pull #5524 ).
2015-07-20 16:01:38 -07:00
Wladimir J. van der Laan
5a7304b69d
Move recently introduced CTransAction::IsEquivalentTo to CWalletTx
...
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.
2015-07-02 20:57:39 +02:00
Jonas Schnelli
a7b9623d18
miner: rename UpdateRequestCount signal to ResetRequestCount
2015-07-01 16:09:58 +02:00
Jonas Schnelli
5496253966
add CReserveScript to allow modular script keeping/returning
...
- use one CReserveScript per mining thread
2015-07-01 16:06:14 +02:00
Jonas Schnelli
d0fc10a844
detach wallet from miner
2015-06-30 21:45:46 +02:00
Matt Corallo
1e0d1a2ff0
Add FundTransaction method to wallet
...
Some code stolen from Jonas Schnelli <jonas.schnelli@include7.ch>
2015-06-11 01:03:23 -07:00
Wladimir J. van der Laan
12cdbabc26
Merge pull request #6152
...
08d9373
Remove unused code from wallet and validation interface (Michael Ford)
2015-06-05 21:24:15 +02:00
Philip Kaufmann
a9ac95c1bc
use const references where appropriate
2015-06-04 19:34:18 +02:00
Michael Ford
08d9373e2f
Remove unused code from wallet and validation interface
...
Fixes #6109
2015-05-18 17:11:06 +08:00
Alex Morcos
2457dc43ac
Change default nTxConfirmTarget to 2
2015-05-18 09:01:30 +02:00