Matt Corallo
6d22b2b17b
Pull script verify flags calculation out of ConnectBlock
8 years ago
practicalswift
246a02fb14
Use std::unordered_{map,set} (C++11) instead of boost::unordered_{map,set}
8 years ago
Luke Dashjr
c237bd750e
wallet: Update formatting
8 years ago
Luke Dashjr
9cbe8c80ba
wallet: Forbid -salvagewallet, -zapwallettxes, and -upgradewallet with multiple wallets
8 years ago
Luke Dashjr
a2a5f3f0f0
wallet: Base backup filenames on original wallet filename
8 years ago
Luke Dashjr
b823a4c9f6
wallet: Include actual backup filename in recovery warning message
8 years ago
Luke Dashjr
84dcb45017
Bugfix: wallet: Fix warningStr, errorStr argument order
8 years ago
Luke Dashjr
008c360083
Wallet: Move multiwallet sanity checks to CWallet::Verify, and do other checks on all wallets
8 years ago
Luke Dashjr
0f08575be2
Wallet: Support loading multiple wallets if -wallet used more than once
8 years ago
Luke Dashjr
b124cf04ea
Wallet: Replace pwalletMain with a vector of wallet pointers
8 years ago
practicalswift
3fb81a8480
Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of
8 years ago
Matt Corallo
40796e1a9d
Remove references to priority that snuck back in in 870824e9
.
...
The "priority" field should be appropriately marked as a "dummy"
value and noted that it is deprecated and will likely be removed.
8 years ago
Mario Dian
24980a3e40
Make functions in validation.cpp static and pass chainparams
...
Fix bugs as per PR comment
Change bool static to static bool
8 years ago
practicalswift
b083db617a
[trivial] Fix typo: "occurrences" (misspelled as "occurrances")
...
Typo introduced in 000391132608343c66488d62625c714814959bc9:
$ git blame src/coins.cpp | grep occurrances
00039113
(2017-04-25 11:29:29 -0700 89) // deal with the pre-BIP30 occurrances of duplicate coinbase transactions.
8 years ago
Matt Corallo
ec1271f2be
Remove useless mapNextTx lookup in CTxMemPool::TrimToSize.
...
Prior to per-utxo CCoins, we checked that no other in-mempool tx
spent any of the given transaction's outputs, as we don't want to
uncache that entire tx in such a case. However, we now are checking
only that there exists no other mempool spends of the same output,
which should clearly be impossible after we removed the transaction
which was spending said output (barring massive mempool
inconsistency).
Thanks to @sdaftuar for the suggestion.
8 years ago
Luke Dashjr
9a5a1d7d45
RPC/rawtransaction: createrawtransaction: Check opt_into_rbf when provided with either value
8 years ago
Luke Dashjr
23b0fe34f5
bitcoin-tx: rbfoptin: Avoid touching nSequence if the value is already opting in
8 years ago
Luke Dashjr
b005bf21a7
Introduce MAX_BIP125_RBF_SEQUENCE constant
8 years ago
Jonas Schnelli
575cde4605
[bitcoin-tx] add rbfoptin command
8 years ago
Luke Dashjr
36bcab2356
RPC/Wallet: Add RBF support for fundrawtransaction
8 years ago
Luke Dashjr
891c5eeec2
Wallet: Refactor FundTransaction to accept parameters via CCoinControl
8 years ago
Luke Dashjr
578ec80d4f
RPC: rawtransaction: Add RBF support for createrawtransaction
8 years ago
Luke Dashjr
19b3648bb5
CWalletDB: Store the update counter per wallet
8 years ago
Luke Dashjr
74e8738961
Bugfix: ForceSetArg should replace entr(ies) in mapMultiArgs, not append
8 years ago
Luke Dashjr
23fb9adaea
wallet: Move nAccountingEntryNumber from static/global to CWallet
8 years ago
Luke Dashjr
9d15d5548d
Bugfix: wallet: Increment "update counter" when modifying account stuff
8 years ago
Luke Dashjr
f28eb8020e
Bugfix: wallet: Increment "update counter" only after actually making the applicable db changes to avoid potential races
...
Also does all "update counter" access via IncrementUpdateCounter
8 years ago
Suhas Daftuar
76f74811c4
Add timeout for headers sync
...
At startup, we choose one peer to serve us the headers chain, until
our best header is close to caught up. Disconnect this peer if more
than 15 minutes + 1ms/expected_header passes and our best header
is still more than 1 day away from current time.
8 years ago
Pieter Wuille
efee1db21a
scripted-diff: use insecure_rand256/randrange more
...
-BEGIN VERIFY SCRIPT-
sed -i "s/\<GetRandHash(/insecure_rand256(/" src/test/*_tests.cpp
sed -i "s/\<GetRand(/insecure_randrange(/" src/test/*_tests.cpp src/test/test_bitcoin.cpp
sed -i 's/\<insecure_rand() % \([0-9]\+\)/insecure_randrange(\1)/g' src/test/*_tests.cpp
-END VERIFY SCRIPT-
8 years ago
Pieter Wuille
1119927df0
Add various insecure_rand wrappers for tests
8 years ago
Pieter Wuille
124d13a58c
Merge test_random.h into test_bitcoin.h
8 years ago
Pieter Wuille
90620d66c9
scripted-diff: Rename cuckoo tests' local rand context
...
-BEGIN VERIFY SCRIPT-
sed -i 's/insecure_rand/local_rand_ctx/g' src/test/cuckoocache_tests.cpp
-END VERIFY SCRIPT-
8 years ago
Pieter Wuille
37e864eb9f
Add FastRandomContext::rand256() and ::randbytes()
...
FastRandomContext now provides all functionality that the real Rand* functions
provide.
8 years ago
Pieter Wuille
8b22af3ee5
Replace bytes_serialized with bogosize
8 years ago
Jorge Timón
1238f13cf6
scripted-diff: Remove PAIRTYPE
...
-BEGIN VERIFY SCRIPT-
sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
sed -i ':a;N;$!ba;s/#define std::pair<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ;
-END VERIFY SCRIPT-
8 years ago
Jorge Timón
18dc3c3962
scripted-diff: Remove Q_FOREACH
...
-BEGIN VERIFY SCRIPT-
sed -i 's/Q_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
8 years ago
Jorge Timón
7c00c26726
scripted-diff: Fully remove BOOST_FOREACH
...
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
8 years ago
Jorge Timón
a5410ac5ec
Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal
8 years ago
Russell Yanofsky
9bb66ab660
Add RescanFromTime method and use from rpcdump
...
No change in behavior.
8 years ago
Russell Yanofsky
ccf84bb9c1
Move birthday optimization out of ScanForWalletTransactions
...
This change has no effect on wallet behavior.
On wallet startup, the transaction scan avoids reading any blocks with
timestamps older than the wallet birthday (less than nTimeFirstKey -
TIMESTAMP_WINDOW). This block skipping code currently resides in
CWallet::ScanForWalletTransactions but it doesn't really belong there because
it makes the implementation unnecessarily fragile and hard to understand, and
it never has any effect except at startup (because all other callers do their
rescans based on timestamps other than, but always greater or equal to,
nTimeFirstKey).
8 years ago
Wladimir J. van der Laan
a7e3c2814c
rpc: Add listen address to incoming connections in `getpeerinfo`
...
This adds the listening address on which incoming connections were received to the
CNode and CNodeStats structures.
The address is reported in `getpeerinfo`.
This can be useful for distinguishing connections received on different listening ports
(e.g. when using a different listening port for Tor hidden service connections)
or different networks.
8 years ago
practicalswift
90593ed92c
Limit variable scope
8 years ago
practicalswift
656dbd871a
Perform member initialization in initialization lists where possible
8 years ago
practicalswift
a8c09affce
Remove unused variables
8 years ago
Pieter Wuille
9aa215bff9
Bugfixes: missing == 0 after randrange
8 years ago
Pieter Wuille
d9bec888f1
Use REJECT_DUPLICATE for already known and conflicted txn
8 years ago
Pieter Wuille
cf68a488a4
Deduplicate addrdb.cpp and use CHashWriter/Verifier
8 years ago
Pieter Wuille
589827975f
scripted-diff: various renames for per-utxo consistency
...
Thanks to John Newberry for pointing these out.
-BEGIN VERIFY SCRIPT-
sed -i 's/\<GetCoins\>/GetCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<HaveCoins\>/HaveCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<HaveCoinsInCache\>/HaveCoinInCache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<IsPruned\>/IsSpent/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<FetchCoins\>/FetchCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<CoinsEntry\>/CoinEntry/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<vHashTxnToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<vHashTxToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<fHadTxInCache\>/had_coin_in_cache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<coinbaseids\>/coinbase_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<disconnectedids\>/disconnected_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<duplicateids\>/duplicate_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<oldcoins\>/old_coin/g' src/test/coins_tests.cpp
sed -i 's/\<origcoins\>/orig_coin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
-END VERIFY SCRIPT-
8 years ago
Pieter Wuille
73de2c1ff3
Rename CCoinsCacheEntry::coins to coin
8 years ago
Pieter Wuille
119e552f7c
Merge CCoinsViewCache's GetOutputFor and AccessCoin
...
They're doing the same thing now.
8 years ago