MCPcopy
hub / github.com/jimmysong/programmingbitcoin / op_equal

Function op_equal

code-ch08/op.py:390–399  ·  view source on GitHub ↗
(stack)

Source from the content-addressed store, hash-verified

388
389
390def op_equal(stack):
391 if len(stack) < 2:
392 return False
393 element1 = stack.pop()
394 element2 = stack.pop()
395 if element1 == element2:
396 stack.append(encode_num(1))
397 else:
398 stack.append(encode_num(0))
399 return True
400
401
402def op_equalverify(stack):

Callers 2

evaluateMethod · 0.90
op_equalverifyFunction · 0.70

Calls 1

encode_numFunction · 0.70

Tested by

no test coverage detected