aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey.cpp')
-rw-r--r--src/pubkey.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pubkey.cpp b/src/pubkey.cpp
index fc1624af25..334acb454e 100644
--- a/src/pubkey.cpp
+++ b/src/pubkey.cpp
@@ -5,9 +5,16 @@
#include <pubkey.h>
+#include <hash.h>
#include <secp256k1.h>
+#include <secp256k1_extrakeys.h>
#include <secp256k1_recovery.h>
#include <secp256k1_schnorrsig.h>
+#include <span.h>
+#include <uint256.h>
+
+#include <algorithm>
+#include <cassert>
namespace
{
@@ -293,7 +300,7 @@ void CExtPubKey::Decode(const unsigned char code[BIP32_EXTKEY_SIZE]) {
bool CExtPubKey::Derive(CExtPubKey &out, unsigned int _nChild) const {
out.nDepth = nDepth + 1;
CKeyID id = pubkey.GetID();
- memcpy(&out.vchFingerprint[0], &id, 4);
+ memcpy(out.vchFingerprint, &id, 4);
out.nChild = _nChild;
return pubkey.Derive(out.pubkey, out.chaincode, _nChild, chaincode);
}