Skip to content

Commit

Permalink
Merge pull request #5210
Browse files Browse the repository at this point in the history
1f84793 Avoid a bunch of copying/conversion in script/sign (Pieter Wuille)
  • Loading branch information
sipa committed Nov 8, 2014
2 parents 9ea87f9 + 1f84793 commit 7b7c866
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/script/sign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ static CScript PushAll(const vector<valtype>& values)
return result;
}

static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction& txTo, unsigned int nIn,
static CScript CombineMultisig(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
const vector<valtype>& vSolutions,
vector<valtype>& sigs1, vector<valtype>& sigs2)
const vector<valtype>& sigs1, const vector<valtype>& sigs2)
{
// Combine all the signatures we've got:
set<valtype> allsigs;
Expand Down Expand Up @@ -199,7 +199,7 @@ static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction&
return result;
}

static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
static CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
const txnouttype txType, const vector<valtype>& vSolutions,
vector<valtype>& sigs1, vector<valtype>& sigs2)
{
Expand Down Expand Up @@ -244,7 +244,7 @@ static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo,
return CScript();
}

CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
const CScript& scriptSig1, const CScript& scriptSig2)
{
txnouttype txType;
Expand Down
2 changes: 1 addition & 1 deletion src/script/sign.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutab

// Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
// combine them intelligently and return the result.
CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);

#endif // BITCOIN_SCRIPT_SIGN_H

0 comments on commit 7b7c866

Please sign in to comment.