(pubk)key: mark Derive() as nodiscard
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -146,7 +146,7 @@ public:
|
|||||||
bool SignSchnorr(const uint256& hash, Span<unsigned char> sig, const uint256* merkle_root, const uint256& aux) const;
|
bool SignSchnorr(const uint256& hash, Span<unsigned char> sig, const uint256* merkle_root, const uint256& aux) const;
|
||||||
|
|
||||||
//! Derive BIP32 child key.
|
//! 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.
|
* 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 Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const;
|
||||||
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
|
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;
|
CExtPubKey Neuter() const;
|
||||||
void SetSeed(Span<const std::byte> seed);
|
void SetSeed(Span<const std::byte> seed);
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-2
@@ -218,7 +218,7 @@ public:
|
|||||||
bool Decompress();
|
bool Decompress();
|
||||||
|
|
||||||
//! Derive BIP32 child pubkey.
|
//! Derive BIP32 child pubkey.
|
||||||
bool Derive(CPubKey& pubkeyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const;
|
[[nodiscard]] bool Derive(CPubKey& pubkeyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class XOnlyPubKey
|
class XOnlyPubKey
|
||||||
@@ -327,7 +327,7 @@ struct CExtPubKey {
|
|||||||
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
|
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
|
||||||
void EncodeWithVersion(unsigned char code[BIP32_EXTKEY_WITH_VERSION_SIZE]) const;
|
void EncodeWithVersion(unsigned char code[BIP32_EXTKEY_WITH_VERSION_SIZE]) const;
|
||||||
void DecodeWithVersion(const unsigned char code[BIP32_EXTKEY_WITH_VERSION_SIZE]);
|
void DecodeWithVersion(const unsigned char code[BIP32_EXTKEY_WITH_VERSION_SIZE]);
|
||||||
bool Derive(CExtPubKey& out, unsigned int nChild) const;
|
[[nodiscard]] bool Derive(CExtPubKey& out, unsigned int nChild) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Users of this module must hold an ECCVerifyHandle. The constructor and
|
/** Users of this module must hold an ECCVerifyHandle. The constructor and
|
||||||
|
|||||||
Reference in new issue
Block a user