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.
8 years ago
Pedro Branco
cb08fdbf78
Add importmulti rpc call
8 years ago
Jonas Schnelli
69d1c25768
[RPC] Give RPC commands more information about the RPC request
8 years ago
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`.
8 years ago
Pieter Wuille
248f3a76a8
Fix ismine and addwitnessaddress: no uncompressed keys in segwit
8 years ago
Matt Corallo
37aefff5fc
Fix init segfault where InitLoadWallet() calls ATMP before genesis
8 years ago
Patrick Strateman
e198c521d3
Move key derivation logic from GenerateNewKey to DeriveNewChildKey
8 years ago
Pavel Janík
4731cab8fb
Do not shadow variables
8 years ago
MarcoFalke
fa4bfb4819
[wallet, policy] ParameterInteraction: Don't allow 0 fee
8 years ago
MarcoFalke
faef293cf3
[wallet] Add high transaction fee warnings
8 years ago
MarcoFalke
fa58edbffe
[wallet] Introduce DEFAULT_DISABLE_WALLET
8 years ago
MarcoFalke
fab91070d3
init: Get rid of fDisableWallet
8 years ago
Jonas Schnelli
c6f5ca822f
[Wallet] remove "unused" ThreadFlushWalletDB from removeprunedfunds
8 years ago
MarcoFalke
faddd62518
init: Get rid of some ENABLE_WALLET
8 years ago
Patrick Strateman
2ca6b9df1d
Remove last reference to CWalletDB from accounting_tests.cpp
8 years ago
Patrick Strateman
02e2a81536
Remove pwalletdb parameter from CWallet::AddAccountingEntry
8 years ago
Patrick Strateman
d2e678d7d2
Add CWallet::ReorderTransactions and use in accounting_tests.cpp
8 years ago
Patrick Strateman
59adc86680
Add CWallet::ListAccountCreditDebit
...
Simple pass through for CWalletDB::ListAccountCreditDebit
8 years ago
Spencer Lievens
a56037805c
[WALLET] Addition of ImmatureCreditCached to MarkDirty()
...
To protect against possible invalidation and to bring conformity to the code.
8 years ago
Wladimir J. van der Laan
86726d8680
Rename `-optintofullrbf` option to `-walletrbf`
...
This makes it clear that this is a wallet option.
8 years ago
instagibbs
62ffbbdec3
add witness address to address book
8 years ago
Pavel Janík
64d9507ea5
[WIP] Remove unused statement in serialization
8 years ago
Jeremy Rubin
d1a2295f0d
Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting
8 years ago
Cory Fields
53347f0cb9
net: create generic functor accessors and move vNodes to CConnman
8 years ago
Cory Fields
5b446dd5b1
net: Pass CConnection to wallet rather than using the global
8 years ago
Suhas Daftuar
c40b034327
Clear witness with vin/vout in CWallet::CreateTransaction()
8 years ago
Jorge Timón
cdd79eb70f
C++11: s/boost::scoped_ptr/std::unique_ptr/
8 years ago
Pavel Janík
b175cb755b
Do not shadow variables.
8 years ago
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
8 years ago
Wladimir J. van der Laan
05fa823bf6
wallet: Add BIP125 comment for MAXINT-1/-2 behavior
8 years ago
Peter Todd
152f45ba58
Add option to opt into full-RBF when sending funds
8 years ago
MarcoFalke
fa28bfa341
[wallet] Set fLimitFree = true
8 years ago
Pavel Janík
de1bbe3b78
Do not shadow global RPC table variable (tableRPC)
8 years ago
MarcoFalke
fa6dc9f0e5
Remove unused variables
8 years ago
MarcoFalke
fab5ecb771
[wallet] rpc: Drop misleading option
8 years ago
Jonas Schnelli
beef966e36
[Wallet] remove unused code/conditions in ReadAtCursor
8 years ago
Wladimir J. van der Laan
653bb3d640
Add copyright header to wallet_text_fixture.cpp
...
I created the file but forgot to add this header.
8 years ago
Patrick Strateman
8680d3aa80
Move wallet initialization logic from AppInit2 to CWallet::InitLoadWallet
8 years ago
Daniel Kraft
4207630f5a
trivial: remove unused variable
...
Remove the unused variable "blockTmp" in CMerkleTx::SetMerkleBranch. It
was previously used to read the block from disk if not provided as
argument, but is no longer needed.
8 years ago
MarcoFalke
fa785d1211
Use __func__ to get function name for output printing
8 years ago
Jonas Schnelli
7e5d94df1f
[Wallet] Trivial cleanup of HD wallet changes
8 years ago
Jonas Schnelli
914154f0cc
[Qt] add HD enabled/disabled icon to the status bar
8 years ago
crowning-
fab2e26d20
CDB: fix debug output
...
It doesn't really help to clear a variable before printing it to the debug log.
8 years ago
Patrick Strateman
e86eb71604
Move CWallet::setKeyPool to private section of CWallet
8 years ago
leijurv
1aacfc2da5
various typos
8 years ago
Jonas Schnelli
b3b3c2a562
Reduce cs_main locks during ConnectTip/SyncWithWallets
8 years ago
Patrick Strateman
9578333ec4
Remove rpc_wallet_tests.cpp
8 years ago
Cory Fields
21ba407a73
net: narrow include scope after moving to netaddress
...
Net functionality is no longer needed for CAddress/CAddrman/etc. now that
CNetAddr/CService/CSubNet are dumb storage classes.
8 years ago
Patrick Strateman
29c2d99bc9
Make CWallet::fFileBacked private.
8 years ago
Patrick Strateman
5723bb44ce
Remove unused pwalletdb from CWallet::AddToWallet
8 years ago