MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
4 years ago
Hennadii Stepanov
4b5ac25881
Drop unused CDBWrapper methods
4 years ago
MarcoFalke
aaaaad6ac9
scripted-diff: Bump copyright of files changed in 2019
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
5 years ago
practicalswift
084e17cebd
Remove unused includes
5 years ago
Jim Posen
2068f089c8
scripted-diff: Move util files to separate directory.
...
-BEGIN VERIFY SCRIPT-
mkdir -p src/util
git mv src/util.h src/util/system.h
git mv src/util.cpp src/util/system.cpp
git mv src/utilmemory.h src/util/memory.h
git mv src/utilmoneystr.h src/util/moneystr.h
git mv src/utilmoneystr.cpp src/util/moneystr.cpp
git mv src/utilstrencodings.h src/util/strencodings.h
git mv src/utilstrencodings.cpp src/util/strencodings.cpp
git mv src/utiltime.h src/util/time.h
git mv src/utiltime.cpp src/util/time.cpp
sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h
sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h
sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h
sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h
sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h
sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am
sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am
sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am
sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am
sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am
sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh
sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh
sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh
sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh
sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
-END VERIFY SCRIPT-
6 years ago
DrahtBot
eb7daf4d60
Update copyright headers to 2018
6 years ago
Jim Posen
0cb8303241
[db] Create separate database for txindex.
...
The new TxIndexDB class will be used by a future commit in this
change set.
7 years ago
Evan Klitzke
741f0177c5
Add DynamicMemoryUsage() to LevelDB
...
This adds a DynamicMemoryUsage() method similar to the existing methods
of the same name, and adds logging of memory usage to
CDBWrapper::WriteBatch.
7 years ago
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
MarcoFalke
b6a48914c5
Merge #9964 : Add const to methods that do not modify the object for which it is called
...
6e8c48dc5
Add const to methods that do not modify the object for which it is called (practicalswift)
Pull request description:
Tree-SHA512: a6888111ba16fb796e320e60806e1a77d36f545989b5405dc7319992291800109eab0b8e8c286b784778f41f1ff5289e7cb6b4afd7aec77f385fbcafc02cffc1
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-
7 years ago
Pieter Wuille
efeb273305
Force on-the-fly compaction during pertxout upgrade
7 years ago
practicalswift
6e8c48dc59
Add const to methods that do not modify the object for which it is called
7 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
Pieter Wuille
07fd147b9f
Merge #9353 : Add data() method to CDataStream (and use it)
...
5113474
wallet: Use CDataStream.data() (Wladimir J. van der Laan)
e2300ff
bench: Use CDataStream.data() (Wladimir J. van der Laan)
adff950
dbwrapper: Use new .data() method of CDataStream (Wladimir J. van der Laan)
a2141e4
streams: Remove special cases for ancient MSVC (Wladimir J. van der Laan)
af4c44c
streams: Add data() method to CDataStream (Wladimir J. van der Laan)
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
8 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