MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / SignN

Function SignN

src/script/sign.cpp:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44static bool SignN(const vector<valtype>& multisigdata, const BaseSignatureCreator& creator, const CScript& scriptCode, CScript& scriptSigRet)
45{
46 int nSigned = 0;
47 int nRequired = multisigdata.front()[0];
48 for (unsigned int i = 1; i < multisigdata.size()-1 && nSigned < nRequired; i++)
49 {
50 const valtype& pubkey = multisigdata[i];
51 CKeyID keyID = CPubKey(pubkey).GetID();
52 if (Sign1(keyID, creator, scriptCode, scriptSigRet))
53 ++nSigned;
54 }
55 return nSigned==nRequired;
56}
57
58/**
59 * Sign scriptPubKey using signature made with creator.

Callers 1

SignStepFunction · 0.85

Calls 4

Sign1Function · 0.85
GetIDMethod · 0.80
CPubKeyClass · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected