Wladimir J. van der Laan
3097ea40d7
Merge #9316 : [wallet] Disable free transactions when relay is disabled
...
faf4ca8
[wallet] Disable free transactions when relay is disabled (MarcoFalke)
2016-12-20 11:29:59 +01:00
Wladimir J. van der Laan
a336d13a58
Merge #9311 : Flush wallet after abandontransaction
...
0632939
Flush wallet after abandontransaction (Alex Morcos)
2016-12-19 09:43:54 +01:00
Wladimir J. van der Laan
5113474a91
wallet: Use CDataStream.data()
2016-12-15 17:34:59 +01:00
Pieter Wuille
57e337d40e
Merge #9290 : Make RelayWalletTransaction attempt to AcceptToMemoryPool.
...
f692fce
Make RelayWalletTransaction attempt to AcceptToMemoryPool. (Gregory Maxwell)
2016-12-14 01:28:09 -08:00
Chris Moore
453bda63dd
Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'.
2016-12-13 13:36:23 -08:00
Gregory Sanders
5882c099d9
CreateTransaction: Don't return success with too-many-ancestor txn
2016-12-13 09:41:07 -05:00
Gregory Sanders
0b2294a980
SelectCoinsMinConf: Prefer coins with fewer ancestors
2016-12-13 09:41:04 -05:00
Wladimir J. van der Laan
26fe5c98ab
Merge #9326 : Update for OpenSSL 1.1 API.
...
b05b1af
Fix qt/paymentrequestplus.cpp for OpenSSL 1.1 API. (Gregory Maxwell)
bae1eef
Fix wallet/test/crypto_tests.cpp for OpenSSL 1.1 API. (Gregory Maxwell)
2016-12-13 12:22:30 +01:00
Wladimir J. van der Laan
b6abdc77d3
Merge #9302 : Return txid even if ATMP fails for new transaction
...
b3a7410
Return txid even if ATMP fails for new transaction (Pieter Wuille)
2016-12-13 12:15:27 +01:00
Gregory Maxwell
bae1eef752
Fix wallet/test/crypto_tests.cpp for OpenSSL 1.1 API.
...
This avoids a compile failure on newly installed debian stretch systems.
2016-12-12 08:10:27 +00:00
MarcoFalke
faf4ca84e4
[wallet] Disable free transactions when relay is disabled
2016-12-10 17:45:23 +01:00
Alex Morcos
06329393c7
Flush wallet after abandontransaction
2016-12-09 13:36:42 -05:00
Pieter Wuille
b3a74100b8
Return txid even if ATMP fails for new transaction
2016-12-08 11:55:32 -08:00
Jonas Schnelli
c24a4f5981
[Wallet] Bugfix: FRT: don't terminate when keypool is empty
2016-12-06 13:45:56 +01:00
Gregory Maxwell
f692fce8a4
Make RelayWalletTransaction attempt to AcceptToMemoryPool.
...
This resolves an issue where a wallet transaction which failed to
relay previously because it couldn't make it into the mempool
will not try again until restart, even though mempool conditions
may have changed.
Abandoned and known-conflicted transactions are skipped.
Some concern was expressed that there may be users with many
unknown conflicts would waste a lot of CPU time trying to
add them to their memory pools over and over again. But I am
doubtful these users exist in any number, if they do exist
they have worse problems, and they can mitigate any performance
issue this might have by abandoning the transactions in question.
2016-12-06 08:01:27 +00:00
Gregory Sanders
bc7ff8db99
Add option to return non-segwit serialization via rpc
2016-12-05 07:43:22 -05:00
Wladimir J. van der Laan
c01f16aaa0
Merge #9165 : SendMoney: use already-calculated balance
...
ea83d00
SendMoney: use already-calculated balance (instagibbs)
2016-12-05 12:47:31 +01:00
Pieter Wuille
f6fb7acda4
Move CTxInWitness inside CTxIn
2016-12-04 23:47:12 -08:00
Pieter Wuille
42fd8dee30
Make DecodeHexTx return a CMutableTransaction
2016-12-02 18:28:22 -08:00
Pieter Wuille
c3f5673a63
Make CWalletTx store a CTransactionRef instead of inheriting
2016-12-02 18:28:22 -08:00
Matt Corallo
76faa3cdfe
Rename the remaining main.{h,cpp} to validation.{h,cpp}
2016-12-02 09:42:51 -08:00
Wladimir J. van der Laan
74ced54b7e
Merge #9204 : Clarify CreateTransaction error messages
...
918b126
fix CreateTransaction error messages (instagibbs)
2016-11-23 08:42:06 +01:00
Wladimir J. van der Laan
5ea5e0401c
Merge #9141 : Remove unnecessary calls to CheckFinalTx
...
4512550
Remove unnecessary calls to CheckFinalTx (Jonas Schnelli)
2016-11-23 07:24:43 +01:00
Wladimir J. van der Laan
40022fe5f2
Merge #9142 : Move -salvagewallet, -zap(wtx) to where they belong
...
2e44893
Move -salvagewallet, -zap(wtx) to where they belong (Jonas Schnelli)
2016-11-23 07:18:24 +01:00
instagibbs
918b126901
fix CreateTransaction error messages
2016-11-22 13:40:57 -05:00
Pieter Wuille
1662b437b3
Make CBlock::vtx a vector of shared_ptr<CTransaction>
2016-11-19 17:51:09 -08:00
MarcoFalke
cb2ed300a8
Merge #9155 : [trivial] update comments for tx weight
...
07ede5d
update comments for tx weight (Brian Deery)
2016-11-16 11:05:40 +01:00
Pieter Wuille
6eeac6e30d
Merge #9164 : [trivial] credit values are CAmount
...
20c3215
credit values are CAmount (Gregory Sanders)
2016-11-15 09:44:07 -08:00
instagibbs
ea83d0098a
SendMoney: use already-calculated balance
2016-11-15 11:56:45 -05:00
Gregory Sanders
20c3215a90
credit values are CAmount
2016-11-15 09:19:23 -05:00
Brian Deery
07ede5d711
update comments for tx weight
2016-11-14 00:38:07 -06:00
Jonas Schnelli
4512550fa0
Remove unnecessary calls to CheckFinalTx
2016-11-12 13:50:39 +01:00
Jonas Schnelli
2e44893081
Move -salvagewallet, -zap(wtx) to where they belong
2016-11-12 10:25:34 +01:00
Jonas Schnelli
f7345050e9
Make strWalletFile const
2016-11-11 14:32:38 +01:00
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
Pavel Janík
bdcba6d933
Initialize variable to prevent compiler warning
2016-11-10 08:11:51 +01: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
0b2322b144
Merge #8981 : Wshadow: Do not shadow argument with a local variable
...
ff6639b
Do not shadow local variable (Pavel Janík)
2016-11-07 13:44:00 +01: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
a4fd8dff68
Merge #8828 : Move CWalletDB::ReorderTransactions to CWallet
...
86029e7
Move CWalletDB::ReorderTransactions to CWallet (Patrick Strateman)
2016-11-02 15:37:42 +01:00
Wladimir J. van der Laan
f8723d2318
Merge #8753 : Locked memory manager
...
444c673
bench: Add benchmark for lockedpool allocation/deallocation (Wladimir J. van der Laan)
6567999
rpc: Add `getmemoryinfo` call (Wladimir J. van der Laan)
4536148
support: Add LockedPool (Wladimir J. van der Laan)
f4d1fc2
wallet: Get rid of LockObject and UnlockObject calls in key.h (Wladimir J. van der Laan)
999e4c9
wallet: Change CCrypter to use vectors with secure allocator (Wladimir J. van der Laan)
2016-11-02 11:16:29 +01:00
matthias
7f61b49de8
Change all instance of 'GMT epoch' to 'Unix epoch'
2016-10-31 01:11:46 +01:00
Patrick Strateman
86029e72c9
Move CWalletDB::ReorderTransactions to CWallet
2016-10-30 02:15:49 -07: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
Wladimir J. van der Laan
d2143dc937
Merge #8989 : [Qt] overhaul smart-fee slider, adjust default confirmation target
...
cfe77ef
[Qt] overhaul smart-fee slider, adjust default confirmation target (Jonas Schnelli)
6f02899
[Qt] Hide nTxConfirmTarget behind WalletModel (Jonas Schnelli)
004168d
CoinControl: add option for custom confirmation target (Jonas Schnelli)
2016-10-28 14:14:55 +02:00
Wladimir J. van der Laan
0dcb888266
Merge #9016 : Return useful error message on ATMP failure
...
169bdab
Return useful error message on ATMP failure (instagibbs)
2016-10-28 13:49:15 +02:00
Jonas Schnelli
004168dcb7
CoinControl: add option for custom confirmation target
2016-10-28 10:44:30 +02:00
instagibbs
169bdabe14
Return useful error message on ATMP failure
2016-10-26 15:59:33 -04:00
Wladimir J. van der Laan
04c1c15544
rpc: Remove invalid explanation from wallet fee message
2016-10-26 11:57:27 +02:00
Wladimir J. van der Laan
1ae5839ff0
moveonly: move coincontrol
to src/wallet
2016-10-21 11:48:18 +02:00
Pavel Janík
ff6639b0f5
Do not shadow local variable
2016-10-20 12:31:05 +02:00
Luke Dashjr
7942d31d5f
RPC: importmulti: Avoid using boost::variant::operator!=, which is only in newer boost versions
2016-10-20 10:18:05 +00: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
f2d705629b
Merge #7551 : Add importmulti RPC call
...
215caba
Add consistency check to RPC call importmulti (Pedro Branco)
cb08fdb
Add importmulti rpc call (Pedro Branco)
2016-10-20 09:04:32 +02:00
Wladimir J. van der Laan
c587577356
Merge #8928 : Fix init segfault where InitLoadWallet() calls ATMP before genesis
...
37aefff
Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
2016-10-19 18:11:15 +02:00
Pedro Branco
215caba4ed
Add consistency check to RPC call importmulti
2016-10-19 15:17:42 +01:00
Wladimir J. van der Laan
999e4c91c2
wallet: Change CCrypter to use vectors with secure allocator
...
Change CCrypter to use vectors with secure allocator instead of buffers
on in the object itself which will end up on the stack. This avoids
having to call LockedPageManager to lock stack memory pages to prevent the
memory from being swapped to disk. This is wasteful.
2016-10-19 16:17:33 +02:00
Pedro Branco
cb08fdbf78
Add importmulti rpc call
2016-10-19 15:17:13 +01:00
Jonas Schnelli
69d1c25768
[RPC] Give RPC commands more information about the RPC request
2016-10-19 14:42:08 +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
Wladimir J. van der Laan
cdfb7755a6
Merge #8914 : Kill insecure_random and associated global state
...
5eaaa83
Kill insecure_random and associated global state (Wladimir J. van der Laan)
2016-10-18 15:44:57 +02:00
Wladimir J. van der Laan
5eaaa83ac1
Kill insecure_random and associated global state
...
There are only a few uses of `insecure_random` outside the tests.
This PR replaces uses of insecure_random (and its accompanying global
state) in the core code with an FastRandomContext that is automatically
seeded on creation.
This is meant to be used for inner loops. The FastRandomContext
can be in the outer scope, or the class itself, then rand32() is used
inside the loop. Useful e.g. for pushing addresses in CNode or the fee
rounding, or randomization for coin selection.
As a context is created per purpose, thus it gets rid of
cross-thread unprotected shared usage of a single set of globals, this
should also get rid of the potential race conditions.
- I'd say TxMempool::check is not called enough to warrant using a special
fast random context, this is switched to GetRand() (open for
discussion...)
- The use of `insecure_rand` in ConnectThroughProxy has been replaced by
an atomic integer counter. The only goal here is to have a different
credentials pair for each connection to go on a different Tor circuit,
it does not need to be random nor unpredictable.
- To avoid having a FastRandomContext on every CNode, the context is
passed into PushAddress as appropriate.
There remains an insecure_random for test usage in `test_random.h`.
2016-10-17 13:08:35 +02:00
Pieter Wuille
248f3a76a8
Fix ismine and addwitnessaddress: no uncompressed keys in segwit
2016-10-17 00:34:37 +08:00
Matt Corallo
37aefff5fc
Fix init segfault where InitLoadWallet() calls ATMP before genesis
2016-10-15 13:19:16 -04: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
Wladimir J. van der Laan
14b7b3fb9f
Merge #8814 : [wallet, policy] ParameterInteraction: Don't allow 0 fee
...
fa4bfb4
[wallet, policy] ParameterInteraction: Don't allow 0 fee (MarcoFalke)
2016-09-28 08:09:42 +02:00
Pavel Janík
4731cab8fb
Do not shadow variables
2016-09-27 09:25:15 +02:00
MarcoFalke
fa4bfb4819
[wallet, policy] ParameterInteraction: Don't allow 0 fee
2016-09-26 14:44:24 +02:00
MarcoFalke
faef293cf3
[wallet] Add high transaction fee warnings
2016-09-26 01:11:27 +02:00
Wladimir J. van der Laan
886e8c9b72
Merge #8768 : init: Get rid of fDisableWallet
...
fa58edb
[wallet] Introduce DEFAULT_DISABLE_WALLET (MarcoFalke)
fab9107
init: Get rid of fDisableWallet (MarcoFalke)
2016-09-21 12:27:56 +02:00
MarcoFalke
fa58edbffe
[wallet] Introduce DEFAULT_DISABLE_WALLET
2016-09-21 12:06:58 +02:00
MarcoFalke
fab91070d3
init: Get rid of fDisableWallet
2016-09-20 17:32:05 +02:00
Jonas Schnelli
c6f5ca822f
[Wallet] remove "unused" ThreadFlushWalletDB from removeprunedfunds
2016-09-20 16:18:24 +02:00
Wladimir J. van der Laan
a1f8d3ed95
Merge #8696 : [Wallet] Remove last external reference to CWalletDB
...
2ca6b9d
Remove last reference to CWalletDB from accounting_tests.cpp (Patrick Strateman)
02e2a81
Remove pwalletdb parameter from CWallet::AddAccountingEntry (Patrick Strateman)
d2e678d
Add CWallet::ReorderTransactions and use in accounting_tests.cpp (Patrick Strateman)
59adc86
Add CWallet::ListAccountCreditDebit (Patrick Strateman)
2016-09-20 12:47:31 +02:00
MarcoFalke
faddd62518
init: Get rid of some ENABLE_WALLET
2016-09-19 16:14:18 +02:00
Patrick Strateman
2ca6b9df1d
Remove last reference to CWalletDB from accounting_tests.cpp
2016-09-15 13:51:04 -07: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
fa7caf6d91
Merge #8693 : add witness address to address book
...
62ffbbd
add witness address to address book (instagibbs)
2016-09-13 17:10:28 +02: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
instagibbs
62ffbbdec3
add witness address to address book
2016-09-09 12:15:08 -04:00
Pavel Janík
64d9507ea5
[WIP] Remove unused statement in serialization
2016-09-09 13:59:34 +02:00
Wladimir J. van der Laan
2abfe5956e
Merge #8664 : Fix segwit-related wallet bug
...
c40b034
Clear witness with vin/vout in CWallet::CreateTransaction() (Suhas Daftuar)
2016-09-09 12:24:39 +02:00
Jeremy Rubin
d1a2295f0d
Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting
2016-09-08 13:06:05 -04:00
Cory Fields
53347f0cb9
net: create generic functor accessors and move vNodes to CConnman
2016-09-08 12:24:06 -04:00
Cory Fields
5b446dd5b1
net: Pass CConnection to wallet rather than using the global
2016-09-08 12:04:35 -04:00
Suhas Daftuar
c40b034327
Clear witness with vin/vout in CWallet::CreateTransaction()
2016-09-04 20:09:13 -04:00
Wladimir J. van der Laan
6f939c9080
Merge #8629 : C++11: s/boost::scoped_ptr/std::unique_ptr/
...
cdd79eb
C++11: s/boost::scoped_ptr/std::unique_ptr/ (Jorge Timón)
2016-09-02 09:56:33 +02:00
Jorge Timón
cdd79eb70f
C++11: s/boost::scoped_ptr/std::unique_ptr/
2016-09-01 19:05:07 +02:00
Pavel Janík
b175cb755b
Do not shadow variables.
2016-08-31 16:16:05 +02:00
Wladimir J. van der Laan
0c8875d23b
Merge #8163 : Do not shadow global RPC table variable (tableRPC)
...
de1bbe3
Do not shadow global RPC table variable (tableRPC) (Pavel Janík)
2016-08-31 16:07:58 +02:00
Alexey Vesnin
323a5fe06a
Berkeley DB v6 compatibility fix
...
Fixes building error looking like this:
CXX wallet/libbitcoin_wallet_a-db.o
wallet/db.cpp: In member function ‘void CDBEnv::EnvShutdown()’:
wallet/db.cpp:46:16: error: call of overloaded ‘DbEnv(int)’ is ambiguous
DbEnv(0).remove(strPath.c_str(), 0);
^
wallet/db.cpp:46:16: note: candidates are:
In file included from wallet/db.h:21:0,
from wallet/db.cpp:6:
/usr/include/db_cxx.h:916:2: note: DbEnv::DbEnv(const DbEnv&)
DbEnv(const DbEnv &);
^
/usr/include/db_cxx.h:518:2: note: DbEnv::DbEnv(DB_ENV)
DbEnv(DB_ENV *dbenv);
^
/usr/include/db_cxx.h:516:2: note: DbEnv::DbEnv(u_int32_t)
DbEnv(u_int32_t flags);
^
Makefile:5780: recipe for target 'wallet/libbitcoin_wallet_a-db.o' failed
make[2]: ** [wallet/libbitcoin_wallet_a-db.o] Error 1
2016-08-30 09:00:55 +03:00