Commit graph

15 commits

Author SHA1 Message Date
Matt Corallo
cf82a9e704 Do not allow users to get keys from keypool without reserving them
fundrawtransaction allows users to add a change output and then
not have it removed from keypool. While it would be nice to have
users follow the normal CreateTransaction/CommitTransaction process
we use internally, there isnt much benefit in exposing this option,
especially with HD wallets, while there is ample room for users to
misunderstand or misuse this option.

This could be particularly nasty in some use-cases (especially
pre-HD-split) - eg a user might fundrawtransaction, then call
getnewaddress, hand out the address for someone to pay them, then
sendrawtransaction. This may result in the user thinking they have
received payment, even though it was really just their own change!

This could obviously result in needless key-reuse.
2017-07-18 11:20:47 -04:00
John Newbery
cad967a892 [tests] Move stop_node and start_node methods to BitcoinTestFramework
This commit moves functions start_node, start_nodes, stop_node and
stop_nodes functions into the BitcoinTestFramework class. It also moves
the bitcoind_processes dict and coverage variables into BitcoinTestFramework.
2017-06-29 11:55:19 +01:00
MarcoFalke
fa62dadabe [qa] fundrawtx: Fix shutdown race 2017-06-06 01:23:01 +02:00
John Newbery
53f6775fe1 fixup: fix nits 2017-06-01 10:08:24 -04:00
John Newbery
d8c218f9c2 [tests] Functional tests call self.start_node(s) and self.stop_node(s)
This commit changes the individual test scripts to call the
start_node(s) and stop_node(s) methods in BitcoinTestFramework.
2017-05-31 16:59:38 -04:00
John Newbery
c9cc76dcaa [tests] Remove is_network_split from funtional test cases 2017-05-02 13:31:54 -04: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
f34cdcbd80
Merge #9294: Use internal HD chain for change outputs (hd split)
4115af7 Fix rebase issue where pwalletMain was used instead of pwallet Ser./Deser. nInternalChainCounter as last element (Jonas Schnelli)
9382f04 Do not break backward compatibility during wallet encryption (Jonas Schnelli)
1df08d1 Add assertion for CanSupportFeature(FEATURE_HD_SPLIT) (Jonas Schnelli)
cd468d0 Define CWallet::DeriveNewChildKey() as private (Jonas Schnelli)
ed79e4f Optimize GetOldestKeyPoolTime(), return as soon as we have both oldest keys (Jonas Schnelli)
771a304 Make sure we set the wallets min version to FEATURE_HD_SPLIT at the very first point (Jonas Schnelli)
1b3b5c6 Slightly modify fundrawtransaction.py test (change getnewaddress() into getrawchangeaddress()) (Jonas Schnelli)
003e197 Remove FEATURE_HD_SPLIT bump TODO (Jonas Schnelli)
d9638e5 Overhaul the internal/external key derive switch (Jonas Schnelli)
1090502 Fix superfluous cast and code style nits in RPC wallet-hd.py test (Jonas Schnelli)
58e1483 CKeyPool avoid "catch (...)" in SerializationOp (Jonas Schnelli)
e138876 Only show keypoolsize_hd_internal if HD split is enabled (Jonas Schnelli)
add38d9 GetOldestKeyPoolTime: if HD & HD Chain Split is enabled, response max(oldest-internal-key, oldest-external-key) (Jonas Schnelli)
dd526c2 Don't switch to HD-chain-split during wallet encryption of non HD-chain-split wallets (Jonas Schnelli)
79df9df Switch to 100% for the HD internal keypool size (Jonas Schnelli)
bcafca1 Make sure we always generate one keypool key at minimum (Jonas Schnelli)
d0a627a Fix issue where CDataStream->nVersion was taken a CKeyPool record version (Jonas Schnelli)
9af8f00 Make sure we hand out keypool keys if HD_SPLIT is not enabled (Jonas Schnelli)
469a47b Make sure ReserveKeyFromKeyPool only hands out internal keys if HD_SPLIT is supported (Jonas Schnelli)
05a9b49 Fix wrong keypool internal size in RPC getwalletinfo help (Jonas Schnelli)
01de822 Removed redundant IsLocked() check in NewKeyPool() (Jonas Schnelli)
d59531d Immediately return setKeyPool's size if HD or HD_SPLIT is disabled or not supported (Jonas Schnelli)
02592f4 [Wallet] split the keypool in an internal and external part (Jonas Schnelli)

Tree-SHA512: 80d355d5e844b48c3163b56c788ab8b5b5285db0ceeb19858a3ef517d5a702afeca21dbae526d7b8fb4101c2a745af1d92bf557c40cf516780f17992bf678c1a
2017-03-29 12:51:06 +02:00
NicolasDorier
dd5be2c7b3 [QA] Renaming rawTx into rawtx 2017-03-26 05:47:27 +00:00
Nicolas Dorier
803e6a3503 [QA] Fix typo in fundrawtransaction test
Ping @jnewbery introduced on dab804c18a
2017-03-24 19:10:09 +09:00
Jonas Schnelli
1b3b5c6f8f
Slightly modify fundrawtransaction.py test (change getnewaddress() into getrawchangeaddress()) 2017-03-24 10:28:41 +01:00
Jonas Schnelli
79df9df348
Switch to 100% for the HD internal keypool size 2017-03-24 10:28:39 +01:00
Jonas Schnelli
02592f4c5e
[Wallet] split the keypool in an internal and external part 2017-03-24 10:28:37 +01:00
practicalswift
389745901a [tests] Remove unused variables 2017-03-22 17:50:03 +01:00
John Newbery
c28ee91db0 Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
Renamed from test/rpc-tests/fundrawtransaction.py (Browse further)