mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 22:58:13 +01:00
Merge #14934: Descriptor expansion cache clarifications
2e68ffaf20[doc] descriptor: explain GetPubKey() usage with cached public key (Sjors Provoost)2290269759scripted-diff: rename DescriptorImpl m_script_arg to m_subdescriptor_arg (Sjors Provoost) Pull request description: I found the name `m_script_arg` to be confusing while reviewing https://github.com/bitcoin/bitcoin/pull/14646#discussion_r240677238. @sipa let me know if `m_subdescriptor_arg` is completely wrong. I also added an explanation of why we call `GetPubKey` when we don't ask it for a public key. ACKs for top commit: laanwj: ACK2e68ffaf20Tree-SHA512: 06698e9a91cdda93c043a82732793f0ad3cd91daa2513565953e9fa048d5573322fb534e9d0ea9ab736e6366be5921e2b8699c4f4b3693edab48039aaae06f78
This commit is contained in:
@@ -47,9 +47,9 @@ struct Descriptor {
|
||||
*
|
||||
* pos: the position at which to expand the descriptor. If IsRange() is false, this is ignored.
|
||||
* provider: the provider to query for private keys in case of hardened derivation.
|
||||
* output_script: the expanded scriptPubKeys will be put here.
|
||||
* output_scripts: the expanded scriptPubKeys will be put here.
|
||||
* out: scripts and public keys necessary for solving the expanded scriptPubKeys will be put here (may be equal to provider).
|
||||
* cache: vector which will be overwritten with cache data necessary to-evaluate the descriptor at this point without access to private keys.
|
||||
* cache: vector which will be overwritten with cache data necessary to evaluate the descriptor at this point without access to private keys.
|
||||
*/
|
||||
virtual bool Expand(int pos, const SigningProvider& provider, std::vector<CScript>& output_scripts, FlatSigningProvider& out, std::vector<unsigned char>* cache = nullptr) const = 0;
|
||||
|
||||
@@ -57,7 +57,7 @@ struct Descriptor {
|
||||
*
|
||||
* pos: the position at which to expand the descriptor. If IsRange() is false, this is ignored.
|
||||
* cache: vector from which cached expansion data will be read.
|
||||
* output_script: the expanded scriptPubKeys will be put here.
|
||||
* output_scripts: the expanded scriptPubKeys will be put here.
|
||||
* out: scripts and public keys necessary for solving the expanded scriptPubKeys will be put here (may be equal to provider).
|
||||
*/
|
||||
virtual bool ExpandFromCache(int pos, const std::vector<unsigned char>& cache, std::vector<CScript>& output_scripts, FlatSigningProvider& out) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user