mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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-
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include <test/fuzz/fuzz.h>
|
||||
|
||||
#include <node/psbt.h>
|
||||
#include <optional.h>
|
||||
#include <optional>
|
||||
#include <psbt.h>
|
||||
#include <pubkey.h>
|
||||
#include <script/script.h>
|
||||
@@ -39,7 +39,7 @@ FUZZ_TARGET_INIT(psbt, initialize_psbt)
|
||||
|
||||
(void)psbt.IsNull();
|
||||
|
||||
Optional<CMutableTransaction> tx = psbt.tx;
|
||||
std::optional<CMutableTransaction> tx = psbt.tx;
|
||||
if (tx) {
|
||||
const CMutableTransaction& mtx = *tx;
|
||||
const PartiallySignedTransaction psbt_from_tx{mtx};
|
||||
|
||||
Reference in New Issue
Block a user