File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,10 @@ class CScriptNum
195195 m_value = n;
196196 }
197197
198- explicit CScriptNum (const std::vector<unsigned char >& vch, bool fRequireMinimal )
198+ static const size_t nDefaultMaxNumSize = 4 ;
199+
200+ explicit CScriptNum (const std::vector<unsigned char >& vch, bool fRequireMinimal ,
201+ const size_t nMaxNumSize = nDefaultMaxNumSize)
199202 {
200203 if (vch.size () > nMaxNumSize) {
201204 throw scriptnum_error (" script number overflow" );
@@ -318,8 +321,6 @@ class CScriptNum
318321 return result;
319322 }
320323
321- static const size_t nMaxNumSize = 4 ;
322-
323324private:
324325 static int64_t set_vch (const std::vector<unsigned char >& vch)
325326 {
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ static void RunCreate(const int64_t& num)
145145{
146146 CheckCreateInt (num);
147147 CScriptNum scriptnum (num);
148- if (scriptnum.getvch ().size () <= CScriptNum::nMaxNumSize )
148+ if (scriptnum.getvch ().size () <= CScriptNum::nDefaultMaxNumSize )
149149 CheckCreateVch (num);
150150 else
151151 {
You can’t perform that action at this time.
0 commit comments