Gregory Maxwell
18873373bd
Add a comment explaining the use of MAX_BLOCK_BASE_SIZE.
8 years ago
Alex Morcos
e9cd7786da
Pass in smart fee slider value to coin control dialog
...
Since cfe77ef41
the global nTxConfirmTarget wasn't being updated by the smart
fee slider and thus the coin control dialog and labels were not being updated.
8 years ago
Pieter Wuille
cb24c8539d
Use rdrand as entropy source on supported platforms
8 years ago
Marko Bencun
1d1ea9f096
Turn TryCreateDirectory() into TryCreateDirectories()
...
Use case: TryCreateDirectory(GetDataDir() / "blocks" / "index") would
fail if the blocks directory was not explicitly created before.
The line that did so was in a weird location and could be removed as a
result.
8 years ago
Alex Morcos
1bebfc8d3a
Output Fee Estimation Calculations in CreateTransaction
8 years ago
Alex Morcos
8e69adc665
Add missing include for atomic in db.h
8 years ago
practicalswift
4087d9ea7c
Remove unnecessary forward class declarations in header files
8 years ago
practicalswift
67ca816849
Simplify "bool x = y ? true : false" to "bool x = y"
8 years ago
MarcoFalke
3ee3d04374
Add extra LevelDB source to Makefile
8 years ago
Cory Fields
2424989e4f
leveldb: enable runtime-detected crc32 instructions
8 years ago
Andrew Chow
c45cbaf69f
Fix stopatheight
...
Moves stopatheight check into the ActivateBestChain loop so that the block height is actually checked and stopped at the appropriate time.
8 years ago
Pieter Wuille
e241a63c23
Clarify prevector::erase and avoid swap-to-clear
8 years ago
practicalswift
e53a0fa12a
Remove duplicate includes
8 years ago
practicalswift
dce82397c1
Comment out unused constant REJECT_DUST
8 years ago
practicalswift
49de096c2a
Remove unused Boost includes
8 years ago
Gregory Maxwell
bf376eaccc
Return early in IsBanned.
...
I am not aware of any reason that we'd try to stop a ban-list timing
side-channel and the prior code wouldn't be enough if we were.
8 years ago
practicalswift
3289ef4fe1
Remove unused constant MEMPOOL_GD_VERSION
8 years ago
Russell Yanofsky
3ff1fa8c4a
Use override keyword on CCoinsView overrides
8 years ago
practicalswift
30c2d9db48
[tests] Remove unused function InsecureRandBytes(size_t len)
8 years ago
John Newbery
6294f3283a
gettxoutproof() should return consistent result
...
We can call gettxoutproof() with a list of transactions. Currently, if
the first transaction is unspent (and all other transactions are in the
same block), then the call will succeed. If the first transaction has
been spent, then the call will fail. The means that the following two
calls will return different results:
gettxoutproof(unspent_tx1, spent_tx1)
gettxoutproof(spent_tx1, unspent_tx1)
This commit makes behaviour independent of transaction ordering by looping
through all transactions provided and trying to find which block they're in.
This commit also increases the test coverage and tests more failure
cases for gettxoutproof()
8 years ago
Andrew Chow
ac4e438229
Sanity check transaction scripts in DecodeHexTx
...
Make sure that the scripts of decoded transactions are valid scripts.
8 years ago
Andrew Chow
5b75c47784
Add a valid opcode sanity check to CScript
...
Added a function in CScript that checks if the script contains valid opcodes.
Add a test for that function
8 years ago
Pieter Wuille
e945848582
scripted-diff: Use new naming style for insecure_rand* functions
...
-BEGIN VERIFY SCRIPT-
sed -i 's/\<insecure_randbits(/InsecureRandBits(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randbool(/InsecureRandBool(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randrange(/InsecureRandRange(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randbytes(/InsecureRandBytes(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_rand256(/InsecureRand256(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_rand(/InsecureRand32(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<seed_insecure_rand(/SeedInsecureRand(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
-END VERIFY SCRIPT-
8 years ago
practicalswift
0abc58890c
[tests] Remove printf(...)
8 years ago
practicalswift
227ae9b34d
[tests] Use FastRandomContext instead of boost::random::{mt19937,uniform_int_distribution}
8 years ago
Pieter Wuille
2fcd9cc86b
scripted-diff: Use randbits/bool instead of randrange where possible
...
-BEGIN VERIFY SCRIPT-
sed -i 's/insecure_randbits(1)/insecure_randbool()/g' src/test/*_tests.cpp
sed -i 's/insecure_randrange(2)/insecure_randbool()/g' src/test/*_tests.cpp
sed -i 's/insecure_randrange(4)/insecure_randbits(2)/g' src/test/*_tests.cpp
sed -i 's/insecure_randrange(32)/insecure_randbits(5)/g' src/test/*_tests.cpp
sed -i 's/insecure_randrange(256)/insecure_randbits(8)/g' src/test/*_tests.cpp
-END VERIFY SCRIPT-
8 years ago
Pieter Wuille
2ada678521
Use randbits instead of ad-hoc emulation in prevector tests
8 years ago
Pieter Wuille
5f0b04eedc
Replace rand() & ((1 << N) - 1) with randbits(N)
8 years ago
Pieter Wuille
3ecabae363
Replace more rand() % NUM by randranges
8 years ago
Russell Yanofsky
24e44c354d
Don't return stale data from CCoinsViewCache::Cursor()
...
CCoinsViewCache doesn't actually support cursor iteration returning the
current contents of the cache, so raise an error when the cursor method is
called instead of returning a cursor that iterates over stale data.
Also update the gettxoutsetinfo RPC which was relying on the old behavior to be
explicit about which view it is returning data about.
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
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