Changeset View
Changeset View
Standalone View
Standalone View
src/script/sign.cpp
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | static std::vector<valtype> CombineMultisig( | ||||
for (const valtype &sig : allsigs) { | for (const valtype &sig : allsigs) { | ||||
for (unsigned int i = 0; i < nPubKeys; i++) { | for (unsigned int i = 0; i < nPubKeys; i++) { | ||||
const valtype &pubkey = vSolutions[i + 1]; | const valtype &pubkey = vSolutions[i + 1]; | ||||
// Already got a sig for this pubkey | // Already got a sig for this pubkey | ||||
if (sigs.count(pubkey)) { | if (sigs.count(pubkey)) { | ||||
continue; | continue; | ||||
} | } | ||||
if (checker.CheckSig(sig, pubkey, scriptPubKey, | if (checker.CheckSig(false, sig, pubkey, scriptPubKey, | ||||
STANDARD_SCRIPT_VERIFY_FLAGS)) { | STANDARD_SCRIPT_VERIFY_FLAGS)) { | ||||
sigs[pubkey] = sig; | sigs[pubkey] = sig; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// Now build a merged CScript: | // Now build a merged CScript: | ||||
unsigned int nSigsHave = 0; | unsigned int nSigsHave = 0; | ||||
▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
namespace { | namespace { | ||||
/** Dummy signature checker which accepts all signatures. */ | /** Dummy signature checker which accepts all signatures. */ | ||||
class DummySignatureChecker : public BaseSignatureChecker { | class DummySignatureChecker : public BaseSignatureChecker { | ||||
public: | public: | ||||
DummySignatureChecker() {} | DummySignatureChecker() {} | ||||
bool CheckSig(const std::vector<uint8_t> &scriptSig, | bool CheckSig(bool isSchnorr, | ||||
const std::vector<uint8_t> &scriptSig, | |||||
const std::vector<uint8_t> &vchPubKey, | const std::vector<uint8_t> &vchPubKey, | ||||
const CScript &scriptCode, uint32_t flags) const override { | const CScript &scriptCode, uint32_t flags) const override { | ||||
return true; | return true; | ||||
} | } | ||||
}; | }; | ||||
const DummySignatureChecker dummyChecker; | const DummySignatureChecker dummyChecker; | ||||
} // namespace | } // namespace | ||||
Show All 20 Lines |