| 235 | } |
| 236 | |
| 237 | static bool GetPubKey(const SigningProvider& provider, const SignatureData& sigdata, const CKeyID& address, CPubKey& pubkey) |
| 238 | { |
| 239 | // Look for pubkey in all partial sigs |
| 240 | const auto it = sigdata.signatures.find(address); |
| 241 | if (it != sigdata.signatures.end()) { |
| 242 | pubkey = it->second.first; |
| 243 | return true; |
| 244 | } |
| 245 | // Look for pubkey in pubkey lists |
| 246 | const auto& pk_it = sigdata.misc_pubkeys.find(address); |
| 247 | if (pk_it != sigdata.misc_pubkeys.end()) { |
| 248 | pubkey = pk_it->second.first; |
| 249 | return true; |
| 250 | } |
| 251 | const auto& tap_pk_it = sigdata.tap_pubkeys.find(address); |
| 252 | if (tap_pk_it != sigdata.tap_pubkeys.end()) { |
| 253 | pubkey = tap_pk_it->second.GetEvenCorrespondingCPubKey(); |
| 254 | return true; |
| 255 | } |
| 256 | // Query the underlying provider |
| 257 | return provider.GetPubKey(address, pubkey); |
| 258 | } |
| 259 | |
| 260 | static bool CreateSig(const BaseSignatureCreator& creator, SignatureData& sigdata, const SigningProvider& provider, std::vector<unsigned char>& sig_out, const CPubKey& pubkey, const CScript& scriptcode, SigVersion sigversion) |
| 261 | { |
no test coverage detected