aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
diff options
context:
space:
mode:
authorAntoine Poinsot <darosior@protonmail.com>2022-08-04 11:28:57 +0200
committerAntoine Poinsot <darosior@protonmail.com>2022-08-04 11:32:25 +0200
commit50cfc9e7613d6cf6b534df6e551238b80678c70d (patch)
treec7f6ee123fab8b4ac98f2ccc3d5a2a7a861402f3 /src/key.h
parent0ca258a5ace798c4e54308aa8a09b1ab3302cd7e (diff)
downloadbitcoin-50cfc9e7613d6cf6b534df6e551238b80678c70d.tar.xz
(pubk)key: mark Derive() as nodiscard
Diffstat (limited to 'src/key.h')
-rw-r--r--src/key.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/key.h b/src/key.h
index 12d03778a0..e9b78ebd44 100644
--- a/src/key.h
+++ b/src/key.h
@@ -146,7 +146,7 @@ public:
bool SignSchnorr(const uint256& hash, Span<unsigned char> sig, const uint256* merkle_root, const uint256& aux) const;
//! Derive BIP32 child key.
- bool Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const;
+ [[nodiscard]] bool Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const;
/**
* Verify thoroughly whether a private key and a public key match.
@@ -176,7 +176,7 @@ struct CExtKey {
void Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const;
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
- bool Derive(CExtKey& out, unsigned int nChild) const;
+ [[nodiscard]] bool Derive(CExtKey& out, unsigned int nChild) const;
CExtPubKey Neuter() const;
void SetSeed(Span<const std::byte> seed);
};