Skip to content

Commit c49d246

Browse files
committed
Merge bitcoin/bitcoin#21745: refactor: Add missing includes in pubkey.cpp/pubkey.h
71c824e cleaned up and added missing "include" statements for pubkey.cpp and pubkey.h (William Bright) Pull request description: #### Problem: Many symbols in the files were undefined and causing issues when I was working on building independent sections of the codebase. The hidden imports from the "secp256k1" library was a particular pain point. The other standard and missing includes are following best practices and will help with refactoring, build process and others. #### Changes: Clean up and declared imports/include for `pubkey.cpp` and `pubkey.h` ACKs for top commit: jnewbery: utACK 71c824e laanwj: Code review ACK 71c824e Tree-SHA512: bce605cfde24d8e3be82a596cabab7a8577fec0aef7c5e6f7a56603357046d8e8dea11ac8e3dbe79600550291be7784e35c7a55ebf40b46525b8949e4bedae96
2 parents f8176b7 + 71c824e commit c49d246

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/pubkey.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55

66
#include <pubkey.h>
77

8+
#include <hash.h>
89
#include <secp256k1.h>
10+
#include <secp256k1_extrakeys.h>
911
#include <secp256k1_recovery.h>
1012
#include <secp256k1_schnorrsig.h>
13+
#include <span.h>
14+
#include <uint256.h>
15+
16+
#include <algorithm>
17+
#include <cassert>
1118

1219
namespace
1320
{

src/pubkey.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <span.h>
1313
#include <uint256.h>
1414

15-
#include <stdexcept>
15+
#include <cstring>
1616
#include <vector>
1717

1818
const unsigned int BIP32_EXTKEY_SIZE = 74;

0 commit comments

Comments
 (0)