diff --git a/depend/zcash/src/pubkey.cpp b/depend/zcash/src/pubkey.cpp index 366dc44c0..55f862685 100644 --- a/depend/zcash/src/pubkey.cpp +++ b/depend/zcash/src/pubkey.cpp @@ -41,6 +41,8 @@ bool CPubKey::Verify(const uint256 &hash, const std::vector& vchS return secp256k1_ecdsa_verify(secp256k1_context_static, &sig, hash.begin(), &pubkey); } +#if 0 + bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector& vchSig) { if (vchSig.size() != COMPACT_SIGNATURE_SIZE) return false; @@ -138,6 +140,7 @@ bool CExtPubKey::Derive(CExtPubKey &out, unsigned int _nChild) const { out.nChild = _nChild; return pubkey.Derive(out.pubkey, out.chaincode, _nChild, chaincode); } +#endif /* static */ bool CPubKey::CheckLowS(const std::vector& vchSig) { secp256k1_ecdsa_signature sig; @@ -149,6 +152,7 @@ bool CExtPubKey::Derive(CExtPubKey &out, unsigned int _nChild) const { return (!secp256k1_ecdsa_signature_normalize(secp256k1_context_static, NULL, &sig)); } +#if 0 /* static */ std::optional CChainablePubKey::FromParts(ChainCode chaincode, CPubKey pubkey) { if (pubkey.IsCompressed()) { return CChainablePubKey(chaincode, pubkey); @@ -156,3 +160,5 @@ bool CExtPubKey::Derive(CExtPubKey &out, unsigned int _nChild) const { return std::nullopt; } } + +#endif \ No newline at end of file diff --git a/depend/zcash/src/pubkey.h b/depend/zcash/src/pubkey.h index 5a0e391bd..f6948f742 100644 --- a/depend/zcash/src/pubkey.h +++ b/depend/zcash/src/pubkey.h @@ -173,8 +173,10 @@ class CPubKey return size() > 0; } +#if 0 //! fully validate whether this is a valid public key (more expensive than IsValid()) bool IsFullyValid() const; +#endif //! Check whether this is a compressed public key. bool IsCompressed() const @@ -193,6 +195,7 @@ class CPubKey */ static bool CheckLowS(const std::vector& vchSig); +#if 0 //! Recover a public key from a compact signature. bool RecoverCompact(const uint256& hash, const std::vector& vchSig); @@ -201,8 +204,10 @@ class CPubKey //! Derive BIP32 child pubkey. bool Derive(CPubKey& pubkeyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const; +#endif }; +#if 0 class CChainablePubKey { private: ChainCode chaincode; @@ -303,5 +308,6 @@ struct CExtPubKey { Decode(code); } }; +#endif #endif // BITCOIN_PUBKEY_H diff --git a/depend/zcash/src/script/interpreter.cpp b/depend/zcash/src/script/interpreter.cpp index edc16a637..099042a17 100644 --- a/depend/zcash/src/script/interpreter.cpp +++ b/depend/zcash/src/script/interpreter.cpp @@ -985,7 +985,7 @@ bool CallbackTransactionSignatureChecker::CheckSig( try { std::array sighashArray; auto scriptBase = static_cast(scriptCode); - this->sighash(sighashArray.begin(), sighashArray.size(), this->tx, &scriptBase[0], scriptBase.size(), nHashType); + this->sighash(sighashArray.data(), sighashArray.size(), this->tx, &scriptBase[0], scriptBase.size(), nHashType); sighash = uint256::FromRawBytes(sighashArray); } catch (logic_error ex) { return false;