Skip to content

Commit b194386

Browse files
committed
[Refactor] Rename CCSV opcode to OP_CHECKCOLDSTAKEVERIFY_LOF
Last Output Free
1 parent 44ddf8a commit b194386

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/script/interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
960960
}
961961
break;
962962

963-
case OP_CHECKCOLDSTAKEVERIFY:
963+
case OP_CHECKCOLDSTAKEVERIFY_LOF:
964964
{
965965
if (g_IsV6Active) {
966966
// the stack can contain only <sig> <pk> <pkh> at this point

src/script/script.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const char* GetOpName(opcodetype opcode)
148148
case OP_ZEROCOINPUBLICSPEND : return "OP_ZEROCOINPUBLICSPEND";
149149

150150
// cold staking
151-
case OP_CHECKCOLDSTAKEVERIFY : return "OP_CHECKCOLDSTAKEVERIFY";
151+
case OP_CHECKCOLDSTAKEVERIFY_LOF : return "OP_CHECKCOLDSTAKEVERIFY_LOF";
152152

153153
case OP_INVALIDOPCODE : return "OP_INVALIDOPCODE";
154154

@@ -236,7 +236,7 @@ bool CScript::IsPayToColdStaking() const
236236
(!g_IsV6Active || (*this)[1] == OP_HASH160) &&
237237
(*this)[2] == OP_ROT &&
238238
(!g_IsV6Active || (*this)[3] == OP_IF) &&
239-
(*this)[4] == OP_CHECKCOLDSTAKEVERIFY &&
239+
(*this)[4] == OP_CHECKCOLDSTAKEVERIFY_LOF &&
240240
(*this)[5] == 0x14 &&
241241
(!g_IsV6Active || (*this)[26] == OP_ELSE) &&
242242
(*this)[27] == 0x14 &&

src/script/script.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ enum opcodetype
184184
OP_ZEROCOINPUBLICSPEND = 0xc3,
185185

186186
// cold staking
187-
OP_CHECKCOLDSTAKEVERIFY = 0xd1,
187+
OP_CHECKCOLDSTAKEVERIFY_LOF = 0xd1, // last output free for masternode/budget payments
188188

189189
OP_INVALIDOPCODE = 0xff,
190190
};

src/script/standard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ CScript GetScriptForStakeDelegation(const CKeyID& stakingKey, const CKeyID& spen
299299
{
300300
CScript script;
301301
script << OP_DUP << OP_HASH160 << OP_ROT <<
302-
OP_IF << OP_CHECKCOLDSTAKEVERIFY << ToByteVector(stakingKey) <<
302+
OP_IF << OP_CHECKCOLDSTAKEVERIFY_LOF << ToByteVector(stakingKey) <<
303303
OP_ELSE << ToByteVector(spendingKey) << OP_ENDIF <<
304304
OP_EQUALVERIFY << OP_CHECKSIG;
305305
return script;

src/test/script_P2CS_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static CScript GetFakeLockingScript(const CKeyID staker, const CKeyID& owner)
206206
{
207207
CScript script;
208208
script << opcodetype(0x2F) << opcodetype(0x01) << OP_ROT <<
209-
OP_IF << OP_CHECKCOLDSTAKEVERIFY << ToByteVector(staker) <<
209+
OP_IF << OP_CHECKCOLDSTAKEVERIFY_LOF << ToByteVector(staker) <<
210210
OP_ELSE << ToByteVector(owner) << OP_DROP <<
211211
OP_EQUALVERIFY << OP_CHECKSIG;
212212

0 commit comments

Comments
 (0)