Skip to content

Commit

Permalink
Fix IWYU for the script_flags fuzz target
Browse files Browse the repository at this point in the history
Also, export script_error.h from interpreter.h, because there should
rarely be a case where script_error.h is included without interpreter.h
  • Loading branch information
MarcoFalke committed Nov 23, 2023
1 parent fa71285 commit faf1fb2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
16 changes: 9 additions & 7 deletions src/script/interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@
#ifndef BITCOIN_SCRIPT_INTERPRETER_H
#define BITCOIN_SCRIPT_INTERPRETER_H

#include <consensus/amount.h>
#include <hash.h>
#include <script/script_error.h>
#include <span.h>
#include <primitives/transaction.h>
#include <script/script_error.h> // IWYU pragma: export
#include <span.h>
#include <uint256.h>

#include <cstddef>
#include <cstdint>
#include <optional>
#include <vector>
#include <stdint.h>

class CPubKey;
class XOnlyPubKey;
class CScript;
class CTransaction;
class CTxOut;
class uint256;
class CScriptNum;
class XOnlyPubKey;
struct CScriptWitness;

/** Signature hash types/flags */
enum
Expand Down
9 changes: 7 additions & 2 deletions src/test/fuzz/script_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <consensus/amount.h>
#include <pubkey.h>
#include <primitives/transaction.h>
#include <script/interpreter.h>
#include <serialize.h>
#include <streams.h>
#include <test/fuzz/fuzz.h>
#include <test/util/script.h>

#include <test/fuzz/fuzz.h>
#include <cassert>
#include <ios>
#include <utility>
#include <vector>

FUZZ_TARGET(script_flags)
{
Expand Down

0 comments on commit faf1fb2

Please sign in to comment.