Changeset View
Changeset View
Standalone View
Standalone View
src/script/sign.cpp
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | static CScript PushAll(const std::vector<valtype> &values) { | ||||
} | } | ||||
return result; | return result; | ||||
} | } | ||||
bool ProduceSignature(const BaseSignatureCreator &creator, | bool ProduceSignature(const BaseSignatureCreator &creator, | ||||
const CScript &fromPubKey, SignatureData &sigdata) { | const CScript &fromPubKey, SignatureData &sigdata) { | ||||
CScript script = fromPubKey; | CScript script = fromPubKey; | ||||
bool solved = true; | |||||
std::vector<valtype> result; | std::vector<valtype> result; | ||||
txnouttype whichType; | txnouttype whichType; | ||||
solved = SignStep(creator, script, result, whichType); | bool solved = SignStep(creator, script, result, whichType); | ||||
CScript subscript; | CScript subscript; | ||||
if (solved && whichType == TX_SCRIPTHASH) { | if (solved && whichType == TX_SCRIPTHASH) { | ||||
// Solver returns the subscript that needs to be evaluated; the final | // Solver returns the subscript that needs to be evaluated; the final | ||||
// scriptSig is the signatures from that and then the serialized | // scriptSig is the signatures from that and then the serialized | ||||
// subscript: | // subscript: | ||||
script = subscript = CScript(result[0].begin(), result[0].end()); | script = subscript = CScript(result[0].begin(), result[0].end()); | ||||
solved = solved && SignStep(creator, script, result, whichType) && | solved = solved && SignStep(creator, script, result, whichType) && | ||||
▲ Show 20 Lines • Show All 233 Lines • Show Last 20 Lines |