File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 154154OP_INVALIDOPCODE = 0xff
155155
156156VALID_OPCODES = {
157- OP_1NEGATE : True ,
158- OP_RESERVED : True ,
159- OP_1 : True ,
160- OP_2 : True ,
161- OP_3 : True ,
162- OP_4 : True ,
163- OP_5 : True ,
164- OP_6 : True ,
165- OP_7 : True ,
166- OP_8 : True ,
167- OP_9 : True ,
168- OP_10 : True ,
169- OP_11 : True ,
170- OP_12 : True ,
171- OP_13 : True ,
172- OP_14 : True ,
173- OP_15 : True ,
174- OP_16 : True ,
175-
176- OP_NOP : True ,
177- OP_VER : True ,
178- OP_IF : True ,
179- OP_NOTIF : True ,
180- OP_VERIF : True ,
181- OP_VERNOTIF : True ,
182- OP_ELSE : True ,
183- OP_ENDIF : True ,
184- OP_VERIFY : True ,
185- OP_RETURN : True ,
186-
187- OP_TOALTSTACK : True ,
188- OP_FROMALTSTACK : True ,
189- OP_2DROP : True ,
190- OP_2DUP : True ,
191- OP_3DUP : True ,
192- OP_2OVER : True ,
193- OP_2ROT : True ,
194- OP_2SWAP : True ,
195- OP_IFDUP : True ,
196- OP_DEPTH : True ,
197- OP_DROP : True ,
198- OP_DUP : True ,
199- OP_NIP : True ,
200- OP_OVER : True ,
201- OP_PICK : True ,
202- OP_ROLL : True ,
203- OP_ROT : True ,
204- OP_SWAP : True ,
205- OP_TUCK : True ,
206-
207- OP_CAT : True ,
208- OP_SUBSTR : True ,
209- OP_LEFT : True ,
210- OP_RIGHT : True ,
211- OP_SIZE : True ,
212-
213- OP_INVERT : True ,
214- OP_AND : True ,
215- OP_OR : True ,
216- OP_XOR : True ,
217- OP_EQUAL : True ,
218- OP_EQUALVERIFY : True ,
219- OP_RESERVED1 : True ,
220- OP_RESERVED2 : True ,
221-
222- OP_1ADD : True ,
223- OP_1SUB : True ,
224- OP_2MUL : True ,
225- OP_2DIV : True ,
226- OP_NEGATE : True ,
227- OP_ABS : True ,
228- OP_NOT : True ,
229- OP_0NOTEQUAL : True ,
230-
231- OP_ADD : True ,
232- OP_SUB : True ,
233- OP_MUL : True ,
234- OP_DIV : True ,
235- OP_MOD : True ,
236- OP_LSHIFT : True ,
237- OP_RSHIFT : True ,
238-
239- OP_BOOLAND : True ,
240- OP_BOOLOR : True ,
241- OP_NUMEQUAL : True ,
242- OP_NUMEQUALVERIFY : True ,
243- OP_NUMNOTEQUAL : True ,
244- OP_LESSTHAN : True ,
245- OP_GREATERTHAN : True ,
246- OP_LESSTHANOREQUAL : True ,
247- OP_GREATERTHANOREQUAL : True ,
248- OP_MIN : True ,
249- OP_MAX : True ,
250-
251- OP_WITHIN : True ,
252-
253- OP_RIPEMD160 : True ,
254- OP_SHA1 : True ,
255- OP_SHA256 : True ,
256- OP_HASH160 : True ,
257- OP_HASH256 : True ,
258- OP_CODESEPARATOR : True ,
259- OP_CHECKSIG : True ,
260- OP_CHECKSIGVERIFY : True ,
261- OP_CHECKMULTISIG : True ,
262- OP_CHECKMULTISIGVERIFY : True ,
263-
264- OP_NOP1 : True ,
265- OP_NOP2 : True ,
266- OP_NOP3 : True ,
267- OP_NOP4 : True ,
268- OP_NOP5 : True ,
269- OP_NOP6 : True ,
270- OP_NOP7 : True ,
271- OP_NOP8 : True ,
272- OP_NOP9 : True ,
273- OP_NOP10 : True ,
274-
275- OP_SMALLINTEGER : True ,
276- OP_PUBKEYS : True ,
277- OP_PUBKEYHASH : True ,
278- OP_PUBKEY : True ,
157+ OP_1NEGATE ,
158+ OP_RESERVED ,
159+ OP_1 ,
160+ OP_2 ,
161+ OP_3 ,
162+ OP_4 ,
163+ OP_5 ,
164+ OP_6 ,
165+ OP_7 ,
166+ OP_8 ,
167+ OP_9 ,
168+ OP_10 ,
169+ OP_11 ,
170+ OP_12 ,
171+ OP_13 ,
172+ OP_14 ,
173+ OP_15 ,
174+ OP_16 ,
175+
176+ OP_NOP ,
177+ OP_VER ,
178+ OP_IF ,
179+ OP_NOTIF ,
180+ OP_VERIF ,
181+ OP_VERNOTIF ,
182+ OP_ELSE ,
183+ OP_ENDIF ,
184+ OP_VERIFY ,
185+ OP_RETURN ,
186+
187+ OP_TOALTSTACK ,
188+ OP_FROMALTSTACK ,
189+ OP_2DROP ,
190+ OP_2DUP ,
191+ OP_3DUP ,
192+ OP_2OVER ,
193+ OP_2ROT ,
194+ OP_2SWAP ,
195+ OP_IFDUP ,
196+ OP_DEPTH ,
197+ OP_DROP ,
198+ OP_DUP ,
199+ OP_NIP ,
200+ OP_OVER ,
201+ OP_PICK ,
202+ OP_ROLL ,
203+ OP_ROT ,
204+ OP_SWAP ,
205+ OP_TUCK ,
206+
207+ OP_CAT ,
208+ OP_SUBSTR ,
209+ OP_LEFT ,
210+ OP_RIGHT ,
211+ OP_SIZE ,
212+
213+ OP_INVERT ,
214+ OP_AND ,
215+ OP_OR ,
216+ OP_XOR ,
217+ OP_EQUAL ,
218+ OP_EQUALVERIFY ,
219+ OP_RESERVED1 ,
220+ OP_RESERVED2 ,
221+
222+ OP_1ADD ,
223+ OP_1SUB ,
224+ OP_2MUL ,
225+ OP_2DIV ,
226+ OP_NEGATE ,
227+ OP_ABS ,
228+ OP_NOT ,
229+ OP_0NOTEQUAL ,
230+
231+ OP_ADD ,
232+ OP_SUB ,
233+ OP_MUL ,
234+ OP_DIV ,
235+ OP_MOD ,
236+ OP_LSHIFT ,
237+ OP_RSHIFT ,
238+
239+ OP_BOOLAND ,
240+ OP_BOOLOR ,
241+ OP_NUMEQUAL ,
242+ OP_NUMEQUALVERIFY ,
243+ OP_NUMNOTEQUAL ,
244+ OP_LESSTHAN ,
245+ OP_GREATERTHAN ,
246+ OP_LESSTHANOREQUAL ,
247+ OP_GREATERTHANOREQUAL ,
248+ OP_MIN ,
249+ OP_MAX ,
250+
251+ OP_WITHIN ,
252+
253+ OP_RIPEMD160 ,
254+ OP_SHA1 ,
255+ OP_SHA256 ,
256+ OP_HASH160 ,
257+ OP_HASH256 ,
258+ OP_CODESEPARATOR ,
259+ OP_CHECKSIG ,
260+ OP_CHECKSIGVERIFY ,
261+ OP_CHECKMULTISIG ,
262+ OP_CHECKMULTISIGVERIFY ,
263+
264+ OP_NOP1 ,
265+ OP_NOP2 ,
266+ OP_NOP3 ,
267+ OP_NOP4 ,
268+ OP_NOP5 ,
269+ OP_NOP6 ,
270+ OP_NOP7 ,
271+ OP_NOP8 ,
272+ OP_NOP9 ,
273+ OP_NOP10 ,
274+
275+ OP_SMALLINTEGER ,
276+ OP_PUBKEYS ,
277+ OP_PUBKEYHASH ,
278+ OP_PUBKEY ,
279279}
280+
280281OPCODE_NAMES = {
281282 OP_0 : 'OP_0' ,
282283 OP_PUSHDATA1 : 'OP_PUSHDATA1' ,
Original file line number Diff line number Diff line change @@ -141,14 +141,14 @@ def dumpstack(msg, stack):
141141 print "#%d: %s" % (i , vch .encode ('hex' ))
142142
143143ISA_UNOP = {
144- OP_1ADD : True ,
145- OP_1SUB : True ,
146- OP_2MUL : True ,
147- OP_2DIV : True ,
148- OP_NEGATE : True ,
149- OP_ABS : True ,
150- OP_NOT : True ,
151- OP_0NOTEQUAL : True ,
144+ OP_1ADD ,
145+ OP_1SUB ,
146+ OP_2MUL ,
147+ OP_2DIV ,
148+ OP_NEGATE ,
149+ OP_ABS ,
150+ OP_NOT ,
151+ OP_0NOTEQUAL ,
152152}
153153
154154def UnaryOp (opcode , stack ):
@@ -189,21 +189,21 @@ def UnaryOp(opcode, stack):
189189 return True
190190
191191ISA_BINOP = {
192- OP_ADD : True ,
193- OP_SUB : True ,
194- OP_LSHIFT : True ,
195- OP_RSHIFT : True ,
196- OP_BOOLAND : True ,
197- OP_BOOLOR : True ,
198- OP_NUMEQUAL : True ,
199- OP_NUMEQUALVERIFY : True ,
200- OP_NUMNOTEQUAL : True ,
201- OP_LESSTHAN : True ,
202- OP_GREATERTHAN : True ,
203- OP_LESSTHANOREQUAL : True ,
204- OP_GREATERTHANOREQUAL : True ,
205- OP_MIN : True ,
206- OP_MAX : True ,
192+ OP_ADD ,
193+ OP_SUB ,
194+ OP_LSHIFT ,
195+ OP_RSHIFT ,
196+ OP_BOOLAND ,
197+ OP_BOOLOR ,
198+ OP_NUMEQUAL ,
199+ OP_NUMEQUALVERIFY ,
200+ OP_NUMNOTEQUAL ,
201+ OP_LESSTHAN ,
202+ OP_GREATERTHAN ,
203+ OP_LESSTHANOREQUAL ,
204+ OP_GREATERTHANOREQUAL ,
205+ OP_MIN ,
206+ OP_MAX ,
207207}
208208
209209def BinOp (opcode , stack ):
Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ def verbose_sendmsg(message):
4444
4545def verbose_recvmsg (message ):
4646 skipmsg = {
47- 'tx' : True ,
48- 'block' : True ,
49- 'inv' : True ,
50- 'addr' : True
47+ 'tx' ,
48+ 'block' ,
49+ 'inv' ,
50+ 'addr' ,
5151 }
5252 if debugnet :
5353 return True
Original file line number Diff line number Diff line change 1616import bitcoin .coredefs
1717
1818VALID_RPCS = {
19- "getblockcount" : True ,
20- "getblockhash" : True ,
21- "getconnectioncount" : True ,
22- "getinfo" : True ,
23- "getrawmempool" : True ,
24- "getrawtransaction" : True ,
25- "help" : True ,
26- "stop" : True ,
19+ "getblockcount" ,
20+ "getblockhash" ,
21+ "getconnectioncount" ,
22+ "getinfo" ,
23+ "getrawmempool" ,
24+ "getrawtransaction" ,
25+ "help" ,
26+ "stop" ,
2727}
2828
2929
You can’t perform that action at this time.
0 commit comments