Skip to content

Commit faf1fb2

Browse files
author
MarcoFalke
committed
Fix IWYU for the script_flags fuzz target
Also, export script_error.h from interpreter.h, because there should rarely be a case where script_error.h is included without interpreter.h
1 parent fa71285 commit faf1fb2

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/script/interpreter.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@
66
#ifndef BITCOIN_SCRIPT_INTERPRETER_H
77
#define BITCOIN_SCRIPT_INTERPRETER_H
88

9+
#include <consensus/amount.h>
910
#include <hash.h>
10-
#include <script/script_error.h>
11-
#include <span.h>
1211
#include <primitives/transaction.h>
12+
#include <script/script_error.h> // IWYU pragma: export
13+
#include <span.h>
14+
#include <uint256.h>
1315

16+
#include <cstddef>
17+
#include <cstdint>
1418
#include <optional>
1519
#include <vector>
16-
#include <stdint.h>
1720

1821
class CPubKey;
19-
class XOnlyPubKey;
2022
class CScript;
21-
class CTransaction;
22-
class CTxOut;
23-
class uint256;
23+
class CScriptNum;
24+
class XOnlyPubKey;
25+
struct CScriptWitness;
2426

2527
/** Signature hash types/flags */
2628
enum

src/test/fuzz/script_flags.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <consensus/amount.h>
6-
#include <pubkey.h>
6+
#include <primitives/transaction.h>
77
#include <script/interpreter.h>
8+
#include <serialize.h>
89
#include <streams.h>
10+
#include <test/fuzz/fuzz.h>
911
#include <test/util/script.h>
1012

11-
#include <test/fuzz/fuzz.h>
13+
#include <cassert>
14+
#include <ios>
15+
#include <utility>
16+
#include <vector>
1217

1318
FUZZ_TARGET(script_flags)
1419
{

0 commit comments

Comments
 (0)