Jonas Schnelli
ed79e4f497
Optimize GetOldestKeyPoolTime(), return as soon as we have both oldest keys
2017-03-24 10:54:48 +01:00
Jonas Schnelli
771a304ffe
Make sure we set the wallets min version to FEATURE_HD_SPLIT at the very first point
2017-03-24 10:53:35 +01:00
Jonas Schnelli
003e197498
Remove FEATURE_HD_SPLIT bump TODO
2017-03-24 10:28:40 +01:00
Jonas Schnelli
d9638e5aa4
Overhaul the internal/external key derive switch
2017-03-24 10:28:40 +01:00
Jonas Schnelli
1090502c3e
Fix superfluous cast and code style nits in RPC wallet-hd.py test
2017-03-24 10:28:40 +01:00
Jonas Schnelli
58e148333e
CKeyPool avoid "catch (...)" in SerializationOp
2017-03-24 10:28:40 +01:00
Jonas Schnelli
e138876f0a
Only show keypoolsize_hd_internal if HD split is enabled
2017-03-24 10:28:40 +01:00
Jonas Schnelli
add38d9b83
GetOldestKeyPoolTime: if HD & HD Chain Split is enabled, response max(oldest-internal-key, oldest-external-key)
2017-03-24 10:28:39 +01:00
Jonas Schnelli
dd526c2a2d
Don't switch to HD-chain-split during wallet encryption of non HD-chain-split wallets
2017-03-24 10:28:39 +01:00
Jonas Schnelli
79df9df348
Switch to 100% for the HD internal keypool size
2017-03-24 10:28:39 +01:00
Jonas Schnelli
bcafca1077
Make sure we always generate one keypool key at minimum
2017-03-24 10:28:39 +01:00
Jonas Schnelli
d0a627a53a
Fix issue where CDataStream->nVersion was taken a CKeyPool record version
2017-03-24 10:28:39 +01:00
Jonas Schnelli
9af8f00a75
Make sure we hand out keypool keys if HD_SPLIT is not enabled
2017-03-24 10:28:38 +01:00
Jonas Schnelli
469a47b760
Make sure ReserveKeyFromKeyPool only hands out internal keys if HD_SPLIT is supported
2017-03-24 10:28:38 +01:00
Jonas Schnelli
05a9b493eb
Fix wrong keypool internal size in RPC getwalletinfo help
2017-03-24 10:28:38 +01:00
Jonas Schnelli
01de822c8d
Removed redundant IsLocked() check in NewKeyPool()
2017-03-24 10:28:38 +01:00
Jonas Schnelli
d59531ddfc
Immediately return setKeyPool's size if HD or HD_SPLIT is disabled or not supported
2017-03-24 10:28:37 +01:00
Jonas Schnelli
02592f4c5e
[Wallet] split the keypool in an internal and external part
2017-03-24 10:28:37 +01:00
Pavel Janík
d7f80b6dcb
Rename first iterator to prevent shadowing.
2017-03-18 07:59:51 +01:00
Wladimir J. van der Laan
3d857f307b
Merge #9818 : Save watch only key timestamps when reimporting keys
...
7759aa2
Save watch only key timestamps when reimporting keys (Russell Yanofsky)
Tree-SHA512: 433b5a78e5626fb2f3166e6c84c22eabd5239d451dc82694da95af237e034612a24f1a8bc959b7d2f2e576ce0b679be1fa4af929ebfae758c7e832056ab67061
2017-03-17 21:52:14 +01:00
Jonas Schnelli
9c7b7cf0bb
Merge #9592 : [Qt] Add checkbox in the GUI to opt-in to RBF when creating a transaction
...
c4e4792
[Qt] Change RBF checkbox to reflect -walletrbf setting (Russell Yanofsky)
838a58e
[Qt] Add simple optin-RBF checkbox and confirmation info (Jonas Schnelli)
568c05a
Allow to opt-into RBF when creating a transaction (Jonas Schnelli)
Tree-SHA512: 3d52dcd4e44da8aed4d631748074afef78d38c860f2a8b95323f4801a989d6599a3498a753fc10daba4098c527ef5a0eb942e5b3f1bfd656e1a6bd272b8e6c57
2017-03-17 15:31:52 +01:00
Patrick Strateman
fb6f90a4ce
Initialize nRelockTime
2017-03-14 15:48:08 -07:00
NicolasDorier
dcf2112de6
Add safe flag to listunspent result
2017-03-10 05:11:10 +00:00
Russell Yanofsky
af61d9f78b
Add COutput::fSafe member for safe handling of unconfirmed outputs
...
This exposes a value computed in CWallet::AvailableCoins so it can used for
other things, like inclusion in listunspent output.
2017-03-10 05:11:10 +00:00
Wladimir J. van der Laan
c71f0ca5f8
Merge #9960 : Trivial: Add const modifier to GetHDChain and IsHDEnabled
...
3cef950
Trivial: Add const modifier to GetHDChain and IsHDEnabled (NicolasDorier)
Tree-SHA512: 73126689e179d70e6823950b51aae4da0a1e348436bc72338814f3afeec27868bb479d9e8261f86e4fe851e84492778a30c5f1fe76c9d7dd91796d0e38baeaf0
2017-03-09 10:27:31 +01:00
Wladimir J. van der Laan
02bd6e9bc6
Merge #9853 : Fix error codes from various RPCs
...
adaa281
Update release notes to include RPC error code changes. (John Newbery)
338bf06
Add commenting around JSON error codes (John Newbery)
dab804c
Return correct error codes in fundrawtransaction(). (John Newbery)
a012087
Return correct error codes in setban(). (John Newbery)
960bc7f
Return correct error codes in removeprunedfunds(). (John Newbery)
c119096
Return correct error codes in blockchain.cpp. (John Newbery)
6d07c62
Return correct error codes in bumpfee(). (John Newbery)
Tree-SHA512: 4bb39ad221cd8c83d98ac5d7ad642f3a8c265522720dc86b2eebc70e74439a85b06d6ddcd6a874e879d986511de3ab0878bb7fe58b50cb0546b78913632ea809
2017-03-09 10:02:17 +01:00
NicolasDorier
3cef95058c
Trivial: Add const modifier to GetHDChain and IsHDEnabled
2017-03-09 11:32:02 +09:00
Karl-Johan Alm
8a5228197c
Refactor: Remove using namespace <xxx> from wallet/
2017-03-08 08:46:59 -08:00
MarcoFalke
8bfa13b15b
Merge #9936 : [trivial] Fix three typos introduced into walletdb.h in commit 7184e25
...
fdab309
[trivial] Fix typos introduced in 7184e25c80
(practicalswift)
Tree-SHA512: 091666f996267fc5d9f911e6ff25051df5c198851a9c2a6cae73692ffacc64f4275932260487aa48a224ca7f80c58f79933065c72d42aeccae540293c67bcee9
2017-03-08 14:15:47 +01:00
John Newbery
dab804c18a
Return correct error codes in fundrawtransaction().
...
The fundrawtransaction() RPC was returning misleading or incorrect error
codes (for example RPC_INTERNAL_ERROR when funding the transaction
failed). This commit fixes those error codes:
- RPC_INTERNAL_ERROR should not be returned for application-level
errors, only for genuine internal errors such as corrupted data.
That error code has been replaced with RPC_WALLET_ERROR.
This commit also updates the test cases to explicitly test the error code.
2017-03-07 16:45:09 -05:00
John Newbery
960bc7f778
Return correct error codes in removeprunedfunds().
...
The removeprunedfunds() RPC was returning misleading or incorrect error
codes (for example RPC_INTERNAL_ERROR when the transaction was
not found in the wallet). This commit fixes those error codes:
- RPC_INTERNAL_ERROR should not be returned for application-level
errors, only for genuine internal errors such as corrupted data.
This error code has been replaced with RPC_WALLET_ERROR.
This commit also updates the test cases to explicitly test the error code.
2017-03-07 16:45:09 -05:00
John Newbery
6d07c62322
Return correct error codes in bumpfee().
...
The bumpfee() RPC was returning misleading or incorrect error codes
(for example RPC_INVALID_ADDRESS_OR_KEY when the transaction was not
BIP125 replacable). This commit fixes those error codes:
- RPC_INVALID_ADDRESS_OR_KEY if an invalid address was provided:
- Invalid change address given
- RPC_INVALID_PARAMETER if a single (non-address/key) parameter is incorrect
- confTarget and totalFee options should not both be set.
- Invalid confTarget
- Insufficient totalFee (cannot be less than required fee)
- RPC_WALLET_ERROR for any other error
- Transaction has descendants in the wallet
- Transaction has descendants in the mempool
- Transaction has been mined, or is conflicted with a mined transaction
- Transaction is not BIP 125 replaceable
- Transaction has already been bumped
- Transaction contains inputs that don't belong to the wallet
- Transaction has multiple change outputs
- Transaction does not have a change output
- Fee is higher than maxTxFee
- New fee rate is less than the minimum fee rate
- Change output is too small.
This commit also updates the test cases to explicitly test the error code.
2017-03-07 16:45:09 -05:00
Wladimir J. van der Laan
30ff3a2fc9
Merge #9602 : Remove coin age priority and free transactions - implementation
...
b421e6d
Update example bitcoin.conf (Alex Morcos)
7d4e950
Allow setting minrelaytxfee to 0 (Alex Morcos)
359e8a0
[cleanup] Remove coin age priority completely. (Alex Morcos)
f9b9371
[rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos)
49be7e1
[rpc] Remove priority information from mempool RPC calls (Alex Morcos)
0315888
[test] Remove priority from tests (Alex Morcos)
f838005
No longer allow "free" transactions (Alex Morcos)
ad727f4
[rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos)
fe282ac
[cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos)
400b151
[debug] Change -printpriority option (Alex Morcos)
272b25a
[mining] Remove -blockprioritysize. (Alex Morcos)
12839cd
[rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos)
ddf58c7
wallet: Remove sendfree (MarcoFalke)
Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
2017-03-07 19:30:23 +01:00
Wladimir J. van der Laan
3178b2c740
Merge #9369 : Factor out CWallet::nTimeSmart computation into a method.
...
630fc54
Clean up braces in CWallet::ComputeTimeSmart (Russell Yanofsky)
6c996c2
Add documentation describing CWallet::nTimeSmart. (Russell Yanofsky)
1f98abe
Factor out CWallet::nTimeSmart computation into a method. (Russell Yanofsky)
c6b82d1
Add tests for CWalletTx::nTimeSmart (Russell Yanofsky)
Tree-SHA512: 457a30251e572cf20dac0198af1a94128d269b1e0ce6605a213d56fc14d85c84a0a494e3dcbb18c201c4f39e6f7b000bd9cb6f283930d8452e4bb93ba406f8d4
2017-03-07 17:11:59 +01:00
practicalswift
fdab309670
[trivial] Fix typos introduced in 7184e25c80
2017-03-07 09:16:46 +01:00
Matt Corallo
0235be1e7a
Rename FlushWalletDB -> CompactWalletDB, add function description
2017-03-06 18:35:20 -05:00
Matt Corallo
735d9b5362
Use CScheduler for wallet flushing, remove ThreadFlushWalletDB
2017-03-06 18:35:19 -05:00
Wladimir J. van der Laan
72fb5158b1
Merge #9906 : Disallow copy constructor CReserveKeys
...
188f89c
Disallow copy of CReserveKeys (Gregory Sanders)
Tree-SHA512: e55ce10bf7f2dc91de9797e60ab7767fb51f25255995d62ddf358c52b7aaa23c26fbfb522e1610ff950b86804ddbc38dc0d7708bfab2c4d33ad99a275d8c77db
2017-03-06 18:33:24 +01:00
Gregory Sanders
188f89c3bb
Disallow copy of CReserveKeys
2017-03-06 09:26:10 -05:00
Jonas Schnelli
7184e25c80
[Wallet] refactor CWallet/CWalletDB/CDB
...
Try to hide CDB/bitdb behinde CWalletDB.
Prepare for full wallet database abstraction.
2017-03-06 11:30:24 +01:00
Wladimir J. van der Laan
fa625b078b
Merge #9333 : Document CWalletTx::mapValue entries and remove erase of nonexistent "version" entry.
...
87ed396
[trivial] Add comment documenting bumpfee mapValues (Russell Yanofsky)
a1fe944
Remove reference to nonexistent "version" wallet transaction mapvalue field (Russell Yanofsky)
654e044
[trivial] Add comment documenting CWalletTx::mapValue (Russell Yanofsky)
Tree-SHA512: 1fd1860e345c59b13634db2007fff4ba30aaf1f177fdd765f47bf9257fac117cdcd5d491424416da304c08e85effbb27f3424f072f7c9587ef39cb98531b932a
2017-03-06 10:18:19 +01:00
Wladimir J. van der Laan
5a6af31722
Merge #9908 : Define 7200 second timestamp window constant
...
e57a1fd
Define 7200 second timestamp window constant (Russell Yanofsky)
Tree-SHA512: 449d20e4fd23905cd96be36f717c55a0a2360aba1002aaf55a3699cce4a41f6e94acc2fbe511a93c5cbe8f8e68386995a76cad67620ebb66ba9283e6080ab567
2017-03-06 10:02:05 +01:00
Wladimir J. van der Laan
56ab672b59
Merge #9576 : [wallet] Remove redundant initialization
...
343ba8f
[wallet] Remove redundant initialization (practicalswift)
Tree-SHA512: 54b94d7703b1735cb1ae0bd7eba61ca9d2f18e20b70e46c94aa3b0653495dce4fdea00cf953ec08215b96b5792eabb8b38c3f9b3cd36e52b82fcb2f1fd8a3540
2017-03-06 09:40:06 +01:00
Alex Morcos
359e8a03d1
[cleanup] Remove coin age priority completely.
...
Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
2017-03-03 16:50:20 -05:00
Alex Morcos
f838005444
No longer allow "free" transactions
...
Remove -limitfreerelay and always enforce minRelayTxFee in the mempool (except from disconnected blocks)
Remove -relaypriority, the option was only used for the ability to allow free transactions to be relayed regardless of their priority. Both notions no longer apply.
2017-03-03 16:50:19 -05:00
Russell Yanofsky
e57a1fd899
Define 7200 second timestamp window constant
2017-03-03 13:51:41 -05:00
Russell Yanofsky
7759aa23d1
Save watch only key timestamps when reimporting keys
...
Previously if an existing watch only key was reimported with a new timestamp,
the new timestamp would not be saved in the key metadata, and would not be used
to update the wallet nTimeFirstKey value (which could cause rescanning to start
at the wrong point and miss transactions).
Issue was pointed out by Jonas Schnelli <dev@jonasschnelli.ch> in
https://github.com/bitcoin/bitcoin/pull/9108#issuecomment-279715550
2017-03-03 11:22:44 -05:00
Russell Yanofsky
630fc549e2
Clean up braces in CWallet::ComputeTimeSmart
2017-03-03 11:22:44 -05:00
Russell Yanofsky
6c996c2df7
Add documentation describing CWallet::nTimeSmart.
...
Most of the text comes from the 2012 Luke Dashjr <luke-jr+git@utopios.org>
c3f95ef
commit message.
2017-03-03 11:22:44 -05:00
Russell Yanofsky
1f98abe47b
Factor out CWallet::nTimeSmart computation into a method.
...
No change in behavior, this change just pulls some code out of
CWallet::AddToWallet that was making it very long into a separate method.
2017-03-03 11:22:44 -05:00