diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-11-08 07:59:49 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-11-08 08:01:47 -0800 |
commit | 7b7c86616006a5047ae07085e26c40e3606f60c5 (patch) | |
tree | b0e8f6a3796e3cf70707138ad44cad708282750a /src | |
parent | 9ea87f9e187da41964c3cafdadf54b2f767c3450 (diff) | |
parent | 1f847936c9622f53fca25a1174961a799174b7fd (diff) |
Merge pull request #5210
1f84793 Avoid a bunch of copying/conversion in script/sign (Pieter Wuille)
Diffstat (limited to 'src')
-rw-r--r-- | src/script/sign.cpp | 8 | ||||
-rw-r--r-- | src/script/sign.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 0eab0626e5..9dfd640dfb 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -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; @@ -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) { @@ -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; diff --git a/src/script/sign.h b/src/script/sign.h index c84d3f9a94..99d5516adb 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -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 |