Skip to content

Commit

Permalink
remove rand
Browse files Browse the repository at this point in the history
  • Loading branch information
crosschainer committed Oct 2, 2024
1 parent d4560f5 commit 6689a20
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/contracting/execution/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
# Define maximum stamps
MAX_STAMPS = 6500000

CRYPTO_MODULE_NAME = "contracting.stdlib.bridge.crypto"
RANDOMX_FUNCTION_NAME = "randomx_hash"

class Tracer:
def __init__(self):
self.cost = 0
Expand Down Expand Up @@ -101,10 +98,6 @@ def trace_func(self, frame, event, arg):
globals_dict = frame.f_globals
module_name = globals_dict.get('__name__', '')

if (current_function_name == RANDOMX_FUNCTION_NAME and
module_name == CRYPTO_MODULE_NAME):
self.cost += 100000 # Increment the cost by a specific value

# Only trace code within contracts (if '__contract__' in globals)
if '__contract__' not in globals_dict:
return
Expand Down

0 comments on commit 6689a20

Please sign in to comment.