* Apply the visitor to each destination in a script, recursively to the redeemscript * in the case of p2sh destinations. * @param[in] script The CScript from which destinations are extracted. * @post Any CKeyIDs that script and keystore have in common are appended to the visitor's vKeys. */
| 124 | * @post Any CKeyIDs that script and keystore have in common are appended to the visitor's vKeys. |
| 125 | */ |
| 126 | void Process(const CScript &script) { |
| 127 | txnouttype type; |
| 128 | std::vector<CTxDestination> vDest; |
| 129 | int nRequired; |
| 130 | if (ExtractDestinations(script, type, vDest, nRequired)) { |
| 131 | for (const CTxDestination &dest : vDest) |
| 132 | boost::apply_visitor(*this, dest); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | void operator()(const CKeyID &keyId) { |
| 137 | if (keystore.HaveKey(keyId)) |
no test coverage detected