Infer a descriptor for the given output script. */
| 110 | |
| 111 | /** Infer a descriptor for the given output script. */ |
| 112 | static std::unique_ptr<Descriptor> GetDescriptor(const CWallet* wallet, const CCoinControl* coin_control, |
| 113 | const CScript script_pubkey) |
| 114 | { |
| 115 | MultiSigningProvider providers; |
| 116 | for (const auto spkman: wallet->GetScriptPubKeyMans(script_pubkey)) { |
| 117 | providers.AddProvider(spkman->GetSolvingProvider(script_pubkey)); |
| 118 | } |
| 119 | if (coin_control) { |
| 120 | providers.AddProvider(std::make_unique<FlatSigningProvider>(coin_control->m_external_provider)); |
| 121 | } |
| 122 | return InferDescriptor(script_pubkey, providers); |
| 123 | } |
| 124 | |
| 125 | /** Infer the maximum size of this input after it will be signed. */ |
| 126 | static std::optional<int64_t> GetSignedTxinWeight(const CWallet* wallet, const CCoinControl* coin_control, |
no test coverage detected