aboutsummaryrefslogtreecommitdiff
path: root/src/compressor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compressor.cpp')
-rw-r--r--src/compressor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compressor.cpp b/src/compressor.cpp
index a70306d320..a161c42866 100644
--- a/src/compressor.cpp
+++ b/src/compressor.cpp
@@ -52,7 +52,7 @@ static bool IsToPubKey(const CScript& script, CPubKey &pubkey)
return false;
}
-bool CompressScript(const CScript& script, std::vector<unsigned char> &out)
+bool CompressScript(const CScript& script, CompressedScript& out)
{
CKeyID keyID;
if (IsToKeyID(script, keyID)) {
@@ -92,7 +92,7 @@ unsigned int GetSpecialScriptSize(unsigned int nSize)
return 0;
}
-bool DecompressScript(CScript& script, unsigned int nSize, const std::vector<unsigned char> &in)
+bool DecompressScript(CScript& script, unsigned int nSize, const CompressedScript& in)
{
switch(nSize) {
case 0x00:
@@ -124,7 +124,7 @@ bool DecompressScript(CScript& script, unsigned int nSize, const std::vector<uns
unsigned char vch[33] = {};
vch[0] = nSize - 2;
memcpy(&vch[1], in.data(), 32);
- CPubKey pubkey(&vch[0], &vch[33]);
+ CPubKey pubkey{vch};
if (!pubkey.Decompress())
return false;
assert(pubkey.size() == 65);