MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-12-31 09:45:41 +01:00
Hennadii Stepanov
9cc6eb3c9e
Get rid of -Wthread-safety-precise warnings
2020-05-28 09:55:39 +03:00
MarcoFalke
aaaaad6ac9
scripted-diff: Bump copyright of files changed in 2019
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2019-12-30 10:42:20 +13:00
John Newbery
a27a2957ed
[validation] Add CValidationState subclasses
...
Split CValidationState into TxValidationState and BlockValidationState
to store validation results for transactions and blocks respectively.
2019-10-29 15:46:45 -04:00
Matt Corallo
9ab2a0412e
CorruptionPossible -> BLOCK_MUTATED
...
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02 15:14:12 -04:00
Jim Posen
4fb789e9b2
Extract CSipHasher to it's own file in crypto/ directory.
...
This is a move-only commit with the exception of changes to includes.
2018-11-05 09:25:15 -08:00
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-
2018-11-04 22:46:07 -08:00
Ben Woosley
da74db0940
Drop unused GetType() from CSizeComputer
2018-09-11 00:58:05 -04:00
DrahtBot
eb7daf4d60
Update copyright headers to 2018
2018-07-27 07:15:02 -04:00
Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
2018-01-03 02:26:56 +09:00
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-
2017-11-16 08:23:01 +13:00
practicalswift
0189d8ed19
Fix typos
2017-07-15 14:28:40 +02:00
Gregory Maxwell
3babbcb487
Remove confusing MAX_BLOCK_BASE_SIZE.
...
Some people keep thinking that MAX_BLOCK_BASE_SIZE is a separate
size limit from the weight limit when it fact it is superfluous,
and used in early tests before the witness data has been
validated or just to compute worst case sizes. The size checks
that use it would not behave any differently consensus wise
if they were eliminated completely.
Its correct value is not independently settable but is a function
of the weight limit and weight formula.
This patch just eliminates it and uses the scale factor as
required to compute the worse case constants.
It also moves the weight factor out of primitives into consensus,
which is a more logical place for it.
2017-07-14 19:24:17 +00:00
practicalswift
67ca816849
Simplify "bool x = y ? true : false" to "bool x = y"
2017-06-11 15:44:01 +02:00
Gregory Maxwell
6b3bb3d9ba
Change LogAcceptCategory to use uint32_t rather than sets of strings.
...
This changes the logging categories to boolean flags instead of strings.
This simplifies the acceptance testing by avoiding accessing a scoped
static thread local pointer to a thread local set of strings. It
eliminates the only use of boost::thread_specific_ptr outside of
lockorder debugging.
This change allows log entries to be directed to multiple categories
and makes it easy to change the logging flags at runtime (e.g. via
an RPC, though that isn't done by this commit.)
It also eliminates the fDebug global.
Configuration of unknown logging categories now produces a warning.
2017-04-01 18:53:29 +00:00
practicalswift
dbf30ff10f
[trivial] Fix typos in comments
2017-03-21 19:49:08 +01:00
Matt Corallo
1ccfe9b1c9
Clarify comment about mempool/extra conflicts
2017-01-16 22:58:06 -05:00
Matt Corallo
fac4c78028
Make PartiallyDownloadedBlock::InitData's second param const
2017-01-12 12:20:11 -08:00
Matt Corallo
b55b416346
Add extra_count lower bound to compact reconstruction debug print
2017-01-12 12:19:14 -08:00
Matt Corallo
93380c5247
Use replaced transactions in compact block reconstruction
2017-01-10 14:48:42 -05:00
Pieter Wuille
6713f0f142
Make FillBlock consume txn_available to avoid shared_ptr copies
2016-12-21 18:18:28 -08:00
Matt Corallo
76faa3cdfe
Rename the remaining main.{h,cpp} to validation.{h,cpp}
2016-12-02 09:42:51 -08:00
fsb4000
15fa95d7e5
Fix some typos
2016-11-28 16:16:37 +07:00
Pieter Wuille
b4e4ba475a
Introduce convenience type CTransactionRef
2016-11-19 17:53:23 -08:00
Pieter Wuille
1662b437b3
Make CBlock::vtx a vector of shared_ptr<CTransaction>
2016-11-19 17:51:09 -08:00
Wladimir J. van der Laan
e81df49644
Merge #9039 : Various serialization simplifcations and optimizations
...
d59a518
Use fixed preallocation instead of costly GetSerializeSize (Pieter Wuille)
25a211a
Add optimized CSizeComputer serializers (Pieter Wuille)
a2929a2
Make CSerAction's ForRead() constexpr (Pieter Wuille)
a603925
Avoid -Wshadow errors (Pieter Wuille)
5284721
Get rid of nType and nVersion (Pieter Wuille)
657e05a
Make GetSerializeSize a wrapper on top of CSizeComputer (Pieter Wuille)
fad9b66
Make nType and nVersion private and sometimes const (Pieter Wuille)
c2c5d42
Make streams' read and write return void (Pieter Wuille)
50e8a9c
Remove unused ReadVersion and WriteVersion (Pieter Wuille)
2016-11-09 13:52:04 +01:00
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.
2016-11-07 13:56:22 -08:00
Suhas Daftuar
88c35491ab
Fix compact block handling to not ban if block is invalid
2016-11-03 13:07:12 -04:00
Pieter Wuille
6aa28abf53
Use cmpctblock type 2 for segwit-enabled transfer
...
Contains version negotiation logic by Matt Corallo and bugfixes by
Suhas Daftuar.
2016-10-04 19:10:41 +02:00
leijurv
1aacfc2da5
various typos
2016-08-14 07:57:11 -06:00
Pieter Wuille
2b1f6f9ccf
BIP141: Other consensus critical limits, and BIP145
...
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22 15:43:00 +02:00
Pieter Wuille
ccd06b94f6
Elaborate bucket size math
2016-06-19 23:06:55 -07:00
Matt Corallo
0d4cb48ef1
Use vTxHashes to optimize InitData significantly
2016-06-19 23:06:55 -07:00
Matt Corallo
56ba516727
Add reconstruction debug logging
2016-06-19 23:06:55 -07:00
Matt Corallo
85ad31ede7
Add partial-block block encodings API
2016-06-19 01:34:57 -07:00