Commit graph

693 commits

Author SHA1 Message Date
Russell Yanofsky 1b6602fbe6 Fix bumpfee rpc "errors" return value 2017-05-24 16:15:26 -04:00
Wladimir J. van der Laan ce8176d038
Merge #10295: [qt] Move some WalletModel functions into CWallet
108f04f Add missing LOCK2 in CWallet::GetAvailableBalance (Russell Yanofsky)
429aa9e [test] Move some tests from qt -> wallet (Russell Yanofsky)
d944bd7 [qt] Move some WalletModel functions into CWallet (Russell Yanofsky)
ef8ca17 [test] Add tests for some walletmodel functions (Russell Yanofsky)

Tree-SHA512: f6384d9f2ff3f7fb173d414588c3e7dc8c311b8ed2ce2b0979fb824a0ed83a7302890ccd3d83197f07f6fdcb6b1ca151584d90ea1961d88dfe8956c87087cde8
2017-05-23 19:32:52 +02:00
Wladimir J. van der Laan e76a3927c3
Merge #10410: Fix importwallet edge case rescan bug
2a8e35a Fix importwallet edge case rescan bug (Russell Yanofsky)

Tree-SHA512: 59522c962290f9ef64436349d11183dd1fd829e515d1f5ec802b63dd813d04303e28d4f3ba38df77a6c151ee4c14f3ca5d3d82204c57456ac94054de62ae4bc7
2017-05-23 16:39:19 +02:00
Wladimir J. van der Laan e4775167cb
Merge #10390: [wallet] remove minimum total fee option
091a9ae remove minimum total fee option (Gregory Sanders)

Tree-SHA512: 9be4df3dab0219f30917211408f47b242f7c96dd7663b06ab1cf3cc63027f14956dc680883be6c58673b6452d0f339cf893694e4f21d0d248e70760614d5a344
2017-05-22 20:01:20 +02:00
Wladimir J. van der Laan ea6fde3f1d
Merge #8329: Consensus: MOVEONLY: Move functions for tx verification
618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón)

Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
2017-05-18 21:01:49 +02:00
Jonas Schnelli 962cd3f058
Merge #9697: [Qt] simple fee bumper with user verification
a38783747 Make sure we re-check the conditions of a feebump during commit (Jonas Schnelli)
9b9ca538c Only update the transactionrecord if the fee bump has been commited (Jonas Schnelli)
6ed4368f1 Make sure we use nTxConfirmTarget during Qt fee bumps (Jonas Schnelli)
be08fc39d Make sure we always update the table row after a bumpfee call (Jonas Schnelli)
2678d3dc6 Show old-fee, increase a new-fee in Qt fee bumper confirmation dialog (Jonas Schnelli)
2ec911f60 Add cs_wallet lock assertion to SignTransaction() (Jonas Schnelli)
fbf385cc8 [Qt] simple fee bumper with user verification (Jonas Schnelli)

Tree-SHA512: a3ce626201abf64cee496dd1d83870de51ba633de40c48eb0219c3eba5085c038af34c284512130d2544de20c1bff9fea1b78f92e3574c21dd4e96c11b8e7d76
2017-05-18 11:18:23 +02:00
Russell Yanofsky 108f04f2d9 Add missing LOCK2 in CWallet::GetAvailableBalance 2017-05-17 05:18:25 -04:00
Russell Yanofsky 429aa9eb51 [test] Move some tests from qt -> wallet
After previous refactoring, the tests make more sense here.
2017-05-17 05:18:25 -04:00
Russell Yanofsky d944bd7a27 [qt] Move some WalletModel functions into CWallet
Motivation for moving these is to make supporting IPC simpler (#10102), so
these lookups can be one-shot IPC requests, instead of back-and-forth
interactions over the IPC channel.

Also these functions are potentially useful outside of the bitcoin GUI (e.g.
for RPCs).
2017-05-17 05:18:25 -04:00
Wladimir J. van der Laan 08ac35a7e3
Merge #10413: Fix docs (there's no rpc command setpaytxfee)
0f1b26a Fix docs (there's no rpc command setpaytxfee) (Ryan Havar)

Tree-SHA512: 5b9e1f16e172e712452873f82faa35f3ac949cd1df6e2ee7e2282fc8fad4eaf4548ebf05407426547ad859360ae837172e6343d66f8d302c7f5b097f39bb3994
2017-05-17 10:46:24 +02:00
Pedro Branco bc63d0ed3b Add query options to listunspent rpc call 2017-05-17 08:37:34 +02:00
Ryan Havar 0f1b26a5aa Fix docs (there's no rpc command setpaytxfee) 2017-05-16 21:13:40 -05:00
Russell Yanofsky 2a8e35a11d Fix importwallet edge case rescan bug
Start importwallet rescans at the first block with timestamp greater or equal
to the wallet birthday instead of the last block with timestamp less or equal.
This fixes an edge case bug where importwallet could fail to start the rescan
early enough if there are blocks with decreasing timestamps or multiple blocks
with the same timestamp.
2017-05-16 11:34:28 -04:00
Gregory Sanders 091a9ae21c remove minimum total fee option 2017-05-11 22:28:46 -04:00
Wladimir J. van der Laan 94e52273f3
Merge #10308: [wallet] Securely erase potentially sensitive keys/values
6c914ac [wallet] Securely erase potentially sensitive keys/values (Thomas Snider)

Tree-SHA512: 071d88c4093108d4e4eced35a6ffcebe3f499798194f5b1be661ffa5b78b5f55311667f6d2a72758d85290f61f958381ee95d380b9045ca18e9e1875f0e686c8
2017-05-11 19:57:33 +02:00
Wladimir J. van der Laan 18c9debe60
Merge #10341: rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str
a637734 rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str (Luke Dashjr)

Tree-SHA512: 8f03f1d301f714f700bf64e259a1c986136fd1ac532f091aa97198a39c131290c320094f4fc38c774c8db4469a75437596b1d933300e4f04037abc158a252bad
2017-05-11 19:19:30 +02:00
Jonas Schnelli a38783747b
Make sure we re-check the conditions of a feebump during commit 2017-05-11 15:27:06 +02:00
Jonas Schnelli 2ec911f60d
Add cs_wallet lock assertion to SignTransaction() 2017-05-11 15:27:05 +02:00
Luke Dashjr a637734ba2 rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str 2017-05-05 00:21:00 +00:00
Thomas Snider 6c914ac176 [wallet] Securely erase potentially sensitive keys/values 2017-05-03 11:35:51 -07:00
Jorge Timón 381a46e38f
Consensus: Policy: MOVEONLY: Move CFeeRate out of the consensus module
...from amount.o to policy/feerate.o

Policy, because it moves policy code to the policy directory (common module)
2017-05-03 18:00:13 +02:00
Jorge Timón 330bb5a456
Consensus: Minimal way to move dust out of consensus 2017-05-03 17:55:52 +02:00
Wladimir J. van der Laan d3dce0eb67
Merge #10115: Avoid reading the old hd master key during wallet encryption
185c7f0 Avoid reading the old hd master key during wallet encryption (Matt Corallo)

Tree-SHA512: b744e8490c0e948355bb77b2695902bb99f89a68af46aa2be9120bd2ccf3c340eb8a56340fec117f9a935192298028945c9b18120ee6b8b23e7da8ffdb635745
2017-05-03 09:11:45 +02:00
Wladimir J. van der Laan e7b90f78f5
Merge #10180: [trivial] Fix typos (tempoarily → temporarily, inadvertantly → inadvertently)
66082e0 [trivial] Fix typos (tempoarily → temporarily, inadvertantly → inadvertently) (practicalswift)

Tree-SHA512: f377c379c9b6702894289c96fa50e64da01fa4e9353f8507ec5f1f58b0f3047fffdc473dffca61774f57793b82cf9e1c9b5f3d9a04fb864ccc1f44fc2a711f32
2017-05-02 14:49:04 +02:00
Gregory Sanders 7c588637d4 [Wallet] unset change position when there is no change on exact match 2017-05-01 08:07:09 -04:00
Wladimir J. van der Laan 4c924011f5
Merge #10075: Remove unused C++ code not covered by unit tests
b51aaf1 Remove unused C++ code not covered by unit tests (practicalswift)

Tree-SHA512: 267bbd87df01a296bf23e82a8b6ee968e13e23a6aaecc535d803890a3e3e9f6208c7fc4c1f97afd98ed3e498b12fe1ada7e3cb2977ad12359a813f57336c74e5
2017-04-27 20:25:15 +02:00
Alex Morcos 3edbd79a65 cleanup: reduce to one GetMinimumFee call signature 2017-04-26 15:54:23 -04:00
practicalswift b51aaf1c42 Remove unused C++ code not covered by unit tests 2017-04-26 21:20:02 +02:00
Russell Yanofsky 02d9f50d5f [wallet] Remove unneeded legacy getbalance code 2017-04-26 06:36:38 -04:00
Russell Yanofsky 82b7dc373a [wallet] Add GetLegacyBalance method to simplify getbalance RPC
This adds a simpler new implementation of getbalance logic along with asserts
to confirm it behaves identically to the old logic. The old logic is removed in
the next commit.
2017-04-26 06:36:38 -04:00
Wladimir J. van der Laan c29a0d4812
Merge #10265: [wallet] [moveonly] Check non-null pindex before potentially referencing
c36ea69 [wallet] Make sure pindex is non-null before possibly referencing in LogPrintf call. (Karl-Johan Alm)

Tree-SHA512: a14c9f3e1228bca91977bea821c56a377d80889b41d250050c9be67aa93e460319a7cf1d4b63ee40f23b5a34159590f0e3fe15dc88698dc694c0c8098bd2db4d
2017-04-25 16:04:23 +02:00
Karl-Johan Alm c36ea693ee
[wallet] Make sure pindex is non-null before possibly referencing in LogPrintf call. 2017-04-25 16:18:52 +09:00
Wladimir J. van der Laan fa1ac2881f
Merge #9951: Wallet database handling abstractions/simplifications
911a480 wallet: Add comment describing the various classes in walletdb.h (Wladimir J. van der Laan)
69d2e9b wallet: Make IsDummy private in CWalletDBWrapper (Wladimir J. van der Laan)
3323281 wallet: CWalletDB CDB composition not inheritance (Wladimir J. van der Laan)
be9e1a9 wallet: Reduce references to global bitdb environment (Wladimir J. van der Laan)
071c955 wallet: Get rid of fFileBacked (Wladimir J. van der Laan)
71afe3c wallet: Introduce database handle wrapper (Wladimir J. van der Laan)

Tree-SHA512: e4e72953c61a2f6995d609a32f8ed8e18cab9a92bc9e193d46a1d1f06d9daa5c6da6fce2867d4e3ba4fc0439141901a3d35f246486f0fa8f59587786379dfcbd
2017-04-24 16:31:34 +02:00
Wladimir J. van der Laan 342b9bc390
Merge #9792: FastRandomContext improvements and switch to ChaCha20
4fd2d2f Add a FastRandomContext::randrange and use it (Pieter Wuille)
1632922 Switch FastRandomContext to ChaCha20 (Pieter Wuille)
e04326f Add ChaCha20 (Pieter Wuille)
663fbae FastRandom benchmark (Pieter Wuille)
c21cbe6 Introduce FastRandomContext::randbool() (Pieter Wuille)

Tree-SHA512: 7fff61e3f6d6dc6ac846ca643d877b377db609646dd401a0e8f50b052c6b9bcd2f5fc34de6bbf28f04afd1724f6279ee163ead5f37d724fb782a00239f35db1d
2017-04-24 14:28:49 +02:00
Wladimir J. van der Laan 911a4808fb wallet: Add comment describing the various classes in walletdb.h 2017-04-21 16:04:26 +02:00
Wladimir J. van der Laan 86ea3c2ff2
Merge #10181: Include cleanup
1c897fc Missing includes (Jorge Timón)
a1fd450 Trivial: Remove unneeded includes from .h: (Jorge Timón)

Tree-SHA512: ada3e62cc2435e58172a88b380be371b717a05725956c15e5493b6e19fe2903e5e6e43fd22dc24699333a0e8a0c7b42eb1ae61b41cb4ba82495be18e2d4ef3c6
2017-04-20 23:24:00 +02:00
Wladimir J. van der Laan 14c948987f
Merge #9942: Refactor CBlockPolicyEstimator
68af651 MOVEONLY: move TxConfirmStats to cpp (Alex Morcos)
2332f19 Initialize TxConfirmStats in constructor (Alex Morcos)
5ba81e5 Read and Write fee estimate file directly from CBlockPolicyEstimator (Alex Morcos)
14e10aa Call estimate(Smart)Fee directly from CBlockPolicyEstimator (Alex Morcos)
dbb9e36 Give CBlockPolicyEstimator it's own lock (Alex Morcos)
f6187d6 Make processBlockTx private. (Alex Morcos)
ae7327b Make feeEstimator its own global instance of CBlockPolicyEstimator (Alex Morcos)

Tree-SHA512: dbf3bd2b30822e609a35f3da519b62d23f8a50e564750695ddebd08553b4c01874ae3e07d792c6cc78cc377d2db33b951ffedc46ac7edaf5793f9ebb931713af
2017-04-20 21:17:17 +02:00
Wladimir J. van der Laan 69d2e9ba67 wallet: Make IsDummy private in CWalletDBWrapper
This is only for use in the low-level functions, and CDB is already
a friend class.
2017-04-20 17:55:01 +02:00
Wladimir J. van der Laan 33232810dc wallet: CWalletDB CDB composition not inheritance
CWalletDB now contains a CDB instead of inheriting from it.

This makes it easier to replace the internal transaction with a different
database, without leaking through internals.
2017-04-20 17:55:01 +02:00
Wladimir J. van der Laan be9e1a968d wallet: Reduce references to global bitdb environment 2017-04-20 17:15:31 +02:00
Wladimir J. van der Laan 071c95570b wallet: Get rid of fFileBacked
Instead, CWalletDB() with a dummy handle will just give you a no-op
database in which writes always succeeds and reads always fail. CDB
already had functionality for this, so just use that.
2017-04-20 17:15:31 +02:00
Wladimir J. van der Laan 71afe3c099 wallet: Introduce database handle wrapper
Abstract database handle from explicit strFilename into
CWalletDBWrapper.

Also move CWallet::Backup to db.cpp - as it deals with representation
details this is a database specific operation.
2017-04-20 17:15:30 +02:00
Wladimir J. van der Laan c91ca0ace9
Merge #9827: Improve ScanForWalletTransactions return value
30abce7 Improve ScanForWalletTransactions return value (Russell Yanofsky)

Tree-SHA512: 195028553b103052a842b6a37e67410118a20c32475b80f7fd22d6d8622f92eca1c2d84f291d1092bef2161d3187d91052799b533e1e265b7613d51955490b8d
2017-04-19 12:30:02 +02:00
Jonas Schnelli e96486cbeb
Merge #10221: Stop treating coinbase outputs differently in GUI: show them at 1conf
608bbcc [qt] Stop treating coinbase outputs differently: show them at 1conf (Matt Corallo)

Tree-SHA512: 62ba10520da8b83cf8e97c86dec3ccdcca8b7bfae0174d1a4099d33aa5d11933cc7c248394bf67c2b105211cf7931955816c741957832e703211030c7f4f002f
2017-04-19 11:15:06 +02:00
Wladimir J. van der Laan 64c45aada7
Merge #10226: wallet: Use boost to more portably ensure -wallet specifies only a filename
a4186dd wallet: Use boost to more portably ensure -wallet specifies only a filename (Luke Dashjr)

Tree-SHA512: 6dfde31fa599638e5ec76489363e2fed97403be3e5762e4560dfc6ac261ce169a92b5a1b92bb34a893cc898e6073c81f74f49528e8df07e86273ddb37dd1ce80
2017-04-19 10:55:13 +02:00
Luke Dashjr a4186dd239 wallet: Use boost to more portably ensure -wallet specifies only a filename 2017-04-18 15:39:16 +00:00
Wladimir J. van der Laan 393160cf6c
Merge #10208: [wallet] Rescan abortability
9141622 [rpc] Add abortrescan command to RPC interface. (Kalle Alm)
75a08e7 [wallet] Add support for aborting wallet transaction rescans. (Kalle Alm)

Tree-SHA512: 18545a1dc48c6dc112993f971f3adc7c0341fa621186c6d70bef1052e1d127ca116c5769595d721a209d502ca2019f2ad33876fe35d2b17216393404607a6c76
2017-04-18 08:05:24 +02:00
Kalle Alm 9141622a0f
[rpc] Add abortrescan command to RPC interface. 2017-04-18 11:41:46 +09:00
MarcoFalke 50a1cc0f0a
Merge #10207: Clarify importprivkey help text ... example of blank label without rescan
c9e31c3 Clarify importprivkey help text with example of blank label without rescan Occasionally I waste a lot of time not remembering that the second parameter to importprivkey must be blank if you intend to stop rescan with "false" as the third parameter. (Warren Togami)

Tree-SHA512: 23781e1d6fd59a9d06d6e12ad10e8ed6641947b3e4a1f66c8fdb5d44cbd8f291e8f2a5e686aa9f9ba5e4bab8ca688caa17244e837f651546055ddf7cc8e7df8f
2017-04-17 22:11:03 +02:00
Kalle Alm 75a08e7d17
[wallet] Add support for aborting wallet transaction rescans. 2017-04-17 23:35:53 +09:00