MarcoFalke
fad943821e
scripted-diff: Rename touched member variables
...
-BEGIN VERIFY SCRIPT-
ren() { sed -i "s/\<$1\>/$2/g" $( git grep -l "$1" ./src/ ) ; }
ren nLastBlockTime m_last_block_time
ren nLastTXTime m_last_tx_time
ren nTimeConnected m_connected
-END VERIFY SCRIPT-
2021-12-13 13:32:08 +01:00
MarcoFalke
fad7ead146
refactor: Use type-safe std::chrono in net
2021-12-13 12:32:09 +01:00
MarcoFalke
fa00447442
scripted-diff: Use clang-tidy syntax for C++ named arguments
...
-BEGIN VERIFY SCRIPT-
perl -0777 -pi -e 's:((\(|\{|,)(\n| )*)\/\* ?([^=* ]+) ?\*\/ ?:\1/*\4=*/:g' $( git ls-files ./src/test ./src/wallet/test )
-END VERIFY SCRIPT-
2021-11-19 12:41:47 +01:00
Andrew Poelstra
214d9055ac
fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop
...
Blindly chose a cap of 10000 iterations for every loop, except for
the two in script_ops.cpp and scriptnum_ops.cpp which appeared to
(sometimes) be deserializing individual bytes; capped those to one
million to ensure that sometimes we try working with massive scripts.
There was also one fuzzer-controlled loop in timedata.cpp which was
already capped, so I left that alone.
git grep 'while (fuzz' should now run clean except for timedata.cpp
2021-11-12 19:51:55 +00:00
Jon Atack
045cb40192
p2p: remove unused m_is_onion member from NodeEvictionCandidate struct
2021-06-14 13:58:05 +02:00
Jon Atack
4ee7aec47e
p2p: add m_network to NodeEvictionCandidate struct
2021-06-13 20:15:47 +02:00
Jon Atack
8b1e156143
Add m_inbound_onion to AttemptToEvictConnection()
...
and an `m_is_onion` struct member to NodeEvictionCandidate and tests.
We'll use these in the peer eviction logic to protect inbound onion peers
in addition to the existing protection of localhost peers.
2021-03-19 20:11:45 +01:00
fanquake
57e980d13c
scripted-diff: remove Optional & nullopt
...
-BEGIN VERIFY SCRIPT-
git rm src/optional.h
sed -i -e 's/Optional</std::optional</g' $(git grep -l 'Optional<' src)
sed -i -e 's/{nullopt}/{std::nullopt}/g' $(git grep -l 'nullopt' src)
sed -i -e 's/ nullopt;/ std::nullopt;/g' $(git grep -l 'nullopt' src)
sed -i -e 's/ nullopt)/ std::nullopt)/g' $(git grep -l 'nullopt' src)
sed -i -e 's/(nullopt)/(std::nullopt)/g' $(git grep -l 'nullopt' src)
sed -i -e 's/ nullopt,/ std::nullopt,/g' $(git grep -l 'nullopt' src)
sed -i -e 's/? nullopt :/? std::nullopt :/g' $(git grep -l 'nullopt' src)
sed -i -e 's/: nullopt}/: std::nullopt}/g' $(git grep -l 'nullopt' src)
sed -i -e '/optional.h \\/d' src/Makefile.am
sed -i -e '/#include <optional.h>/d' src/test/fuzz/autofile.cpp src/test/fuzz/buffered_file.cpp src/test/fuzz/node_eviction.cpp
sed -i -e 's/#include <optional.h>/#include <optional>/g' $(git grep -l '#include <optional.h>' src)
-END VERIFY SCRIPT-
2021-03-15 10:41:30 +08:00
Pieter Wuille
4d98b401fb
Change all ping times to std::chrono types
2021-03-03 09:48:07 -08:00
practicalswift
5a9ee0869b
tests: Add fuzzing harness for node eviction logic
2020-12-16 13:00:47 +00:00