Skip to content

Commit fa5ccc4

Browse files
author
MarcoFalke
committed
iwyu: Export prevector.h from script.h
This should cut some include bloat and seems fine to do, because prevector exists primarily to represent scripts. Also, add missing includes to script.h and addresstype.h
1 parent d53400e commit fa5ccc4

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

src/addresstype.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
#ifndef BITCOIN_ADDRESSTYPE_H
66
#define BITCOIN_ADDRESSTYPE_H
77

8+
#include <attributes.h>
89
#include <pubkey.h>
910
#include <script/script.h>
1011
#include <uint256.h>
1112
#include <util/hash_type.h>
1213

13-
#include <variant>
1414
#include <algorithm>
15+
#include <variant>
16+
#include <vector>
1517

1618
class CNoDestination {
1719
private:

src/script/script.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
// Copyright (c) 2009-2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2021 The Bitcoin Core developers
2+
// Copyright (c) 2009-present The Bitcoin Core developers
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#include <script/script.h>
77

8+
#include <crypto/common.h>
89
#include <hash.h>
10+
#include <uint256.h>
11+
#include <util/hash_type.h>
912
#include <util/strencodings.h>
1013

1114
#include <string>

src/script/script.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2009-2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2022 The Bitcoin Core developers
2+
// Copyright (c) 2009-present The Bitcoin Core developers
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -8,18 +8,19 @@
88

99
#include <attributes.h>
1010
#include <crypto/common.h>
11-
#include <prevector.h>
11+
#include <prevector.h> // IWYU pragma: export
1212
#include <serialize.h>
1313
#include <uint256.h>
1414
#include <util/hash_type.h>
1515

16-
#include <assert.h>
17-
#include <climits>
16+
#include <cassert>
17+
#include <cstdint>
18+
#include <cstring>
1819
#include <limits>
1920
#include <stdexcept>
20-
#include <stdint.h>
21-
#include <string.h>
2221
#include <string>
22+
#include <type_traits>
23+
#include <utility>
2324
#include <vector>
2425

2526
// Maximum number of bytes pushable to the stack

0 commit comments

Comments
 (0)