Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
7 years ago
MeshCollider
1a445343f6
scripted-diff: Replace #include "" with #include <> (ryanofsky)
...
-BEGIN VERIFY SCRIPT-
for f in \
src/*.cpp \
src/*.h \
src/bench/*.cpp \
src/bench/*.h \
src/compat/*.cpp \
src/compat/*.h \
src/consensus/*.cpp \
src/consensus/*.h \
src/crypto/*.cpp \
src/crypto/*.h \
src/crypto/ctaes/*.h \
src/policy/*.cpp \
src/policy/*.h \
src/primitives/*.cpp \
src/primitives/*.h \
src/qt/*.cpp \
src/qt/*.h \
src/qt/test/*.cpp \
src/qt/test/*.h \
src/rpc/*.cpp \
src/rpc/*.h \
src/script/*.cpp \
src/script/*.h \
src/support/*.cpp \
src/support/*.h \
src/support/allocators/*.h \
src/test/*.cpp \
src/test/*.h \
src/wallet/*.cpp \
src/wallet/*.h \
src/wallet/test/*.cpp \
src/wallet/test/*.h \
src/zmq/*.cpp \
src/zmq/*.h
do
base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
7 years ago
practicalswift
64fb0ac016
Declare single-argument (non-converting) constructors "explicit"
...
In order to avoid unintended implicit conversions.
7 years ago
practicalswift
90d4d89230
scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL
...
-BEGIN VERIFY SCRIPT-
sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h
sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp
sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp
sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp
sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp
sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp
-END VERIFY SCRIPT-
8 years ago
Pieter Wuille
efeb273305
Force on-the-fly compaction during pertxout upgrade
8 years ago
practicalswift
6e8c48dc59
Add const to methods that do not modify the object for which it is called
8 years ago
Pieter Wuille
c3aa0c1194
Report on-disk size in gettxoutsetinfo
8 years ago
Pieter Wuille
e66dbde6d1
Add SizeEstimate to CDBBatch
...
This allows estimating the in-memory size of a LevelDB batch.
8 years ago
Wladimir J. van der Laan
bac5c9cf64
Replace uses of boost::filesystem with fs
...
Step two in abstracting away boost::filesystem.
To repeat this, simply run:
```
git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g'
```
8 years ago
Wladimir J. van der Laan
7d5172d354
Replace includes of boost/filesystem.h with fs.h
...
This is step one in abstracting the use of boost::filesystem.
8 years ago
practicalswift
8dc957ae06
Remove unused code
8 years ago
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
8 years ago
Wladimir J. van der Laan
adff950fae
dbwrapper: Use new .data() method of CDataStream
8 years ago
Pieter Wuille
ed5896976a
Batch construct batches
...
Reuse the serialization buffers used for constructing the LevelDB
write batch. This avoids 2 allocations per utxo write.
8 years ago
Pieter Wuille
d59a518466
Use fixed preallocation instead of costly GetSerializeSize
...
Dbwrapper used GetSerializeSize() to compute the size of the buffer
to preallocate. For some cases (specifically: CCoins) this requires
a costly compression call. Avoid this by just using fixed size
preallocations instead.
8 years ago
Pieter Wuille
657e05ab2e
Make GetSerializeSize a wrapper on top of CSizeComputer
...
Given that in default GetSerializeSize implementations created by
ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid
of the specialized GetSerializeSize methods everywhere, and just use
CSizeComputer. This removes a lot of code which isn't actually used
anywhere.
For CCompactSize and CVarInt this actually removes a more efficient
size computing algorithm, which is brought back in a later commit.
8 years ago
Pavel Janík
4a35e0f34c
Do not shadow members in dbwrapper
9 years ago
Wladimir J. van der Laan
869cf1234a
dbwrapper: Move `HandleError` to `dbwrapper_private`
...
HandleError is implementation-specific.
9 years ago
Wladimir J. van der Laan
b69836d6ff
dbwrapper: Pass parent CDBWrapper into CDBBatch and CDBIterator
...
Pass parent wrapper directly instead of obfuscation key. This
makes it possible for other databases which re-use this code
to use other properties from the database.
Add a namespace dbwrapper_private for private functions to be used
only in dbwrapper.h/cpp and dbwrapper_tests.
9 years ago
Wladimir J. van der Laan
878bf480a3
dbwrapper: Remove CDBWrapper::GetObfuscateKeyHex
...
It is an unnecessary method as it is used only two times
and only internally, and the whole implementation is
HexStr(obfuscate_key).
9 years ago
Wladimir J. van der Laan
74f7b1273c
dbwrapper: Remove throw keywords in function signatures
...
Using throw() specifications in function signatures is not only
not required in C++, it is considered deprecated for
[various reasons](https://stackoverflow.com/questions/1055387/throw-keyword-in-functions-signature ).
It is not implemented by any of the common C++ compilers. The usage is
also inconsistent with the rest of the source code.
9 years ago
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
9 years ago
Philip Kaufmann
ad5aae15b4
constify missing catch cases
...
- ensure all missing catch cases are constant where possible
9 years ago
Jeff Garzik
3795e8152b
leveldbwrapper file rename to dbwrapper.*
9 years ago
Jeff Garzik
8587b23038
leveldbwrapper symbol rename: Remove "Level" from class, etc. names
9 years ago
Jeff Garzik
6ec4b7eb20
leveldbwrapper: Remove unused .Prev(), .SeekToLast() methods
...
Also, trim trailing whitespace.
9 years ago
James O'Beirne
dcd8e27c65
Refer to obfuscate_key via pointer in peripheral CLevelDB classes
...
cc @sipa
9 years ago
James O'Beirne
0fdf8c80ee
Handle obfuscation in CLevelDBIterator
9 years ago
Pieter Wuille
3499ce1e1a
Encapsulate CLevelDB iterators cleanly
...
Conflicts:
src/leveldb.cpp
src/leveldb.h
src/txdb.cpp
9 years ago
James O'Beirne
42cb388167
Add chainstate obfuscation to avoid spurious antivirus detection
...
Adds an `obfuscate` parameter to `CLevelDBWrapper` and makes use of it
for all new chainstate stores built via `CCoinsViewDB`. Also adds an
`Xor` method to `CDataStream`.
Thanks to @sipa @laanwj @pstratem @dexX7 @KyrosKrane @gmaxwell .
9 years ago
sandakersmann
f914f1a746
Added "Core" to copyright headers
...
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
10 years ago
Michael Ford
fa94b9d562
Convert remaining comments in /src to doxygen format
...
- Update comments in checkpoints to be doxygen compatible
- Update comments in checkqueue to be doxygen compatible
- Update coins to be doxygen compatible
- Fix comment typo in crypter.h
- Update licenses/copyright dates
Closes #5325 #5184 #5183 #5182
10 years ago
Cory Fields
71697f97d3
Separate protocol versioning from clientversion
10 years ago
Cory Fields
fa7361907a
boost: split stream classes out of serialize.h
...
serialization now has no dependencies.
10 years ago
Pieter Wuille
20e01b1a03
Apply clang-format on some infrequently-updated files
10 years ago
ENikS
ec91092df8
Fixing compiler warning C4101
...
Github-Pull: #4856
10 years ago
Philip Kaufmann
611116d4e3
header include cleanup
...
- ensures alphabetical ordering for includes etc. in source file headers
10 years ago
Daniel Kraft
ffb4c210bc
Mark LevelDB "Read" and "Exists" functions as const.
...
Mark the "Read" and "Exists" functions in CLevelDBWrapper as "const".
They do not change anything in the DB, by definition.
11 years ago
R E Broadley
79d06dc6e0
Remove redundant c_str
11 years ago
Brandon Dahler
51ed9ec971
Cleanup code using forward declarations.
...
Use misc methods of avoiding unnecesary header includes.
Replace int typedefs with int##_t from stdint.h.
Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h.
Normalize QT_VERSION ifs where possible.
Resolve some indirect dependencies as direct ones.
Remove extern declarations from .cpp files.
11 years ago
Brandon Dahler
b64187d05f
Rename leveldb.{h,cpp} to leveldbwrapper.{h,cpp}.
11 years ago
Gavin Andresen
881a85a22d
Replace printf with LogPrintf / LogPrint
11 years ago
Pieter Wuille
421218d304
Deal with LevelDB errors
12 years ago
Pieter Wuille
7fea484674
Add -reindex, to perform in-place reindexing of block chain files
...
Flushes the blktree/ and coins/ databases, and reindexes the
block chain files, as if their contents was loaded via -loadblock.
Based on earlier work by Jeff Garzik.
12 years ago
Pieter Wuille
1c83b0a377
Cache size optimizations
12 years ago
Pieter Wuille
e1bfbab802
Add LevelDB MemEnv support
...
Support LevelDB memory-backed environments, and use them in unit tests.
12 years ago
Pieter Wuille
43b7905e98
LevelDB glue
...
Database-independent glue for supporting LevelDB databases.
Based on code from earlier commits by Mike Hearn in his leveldb
branch.
12 years ago