Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

most likely fixes out of sync #42

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/contracting/execution/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def execute(self, sender, contract_name, function_name, kwargs,

# TODO: Why do we do this?
# Multiply stamps by 1000 because we divide by it later
runtime.rt.set_up(stmps=stamps * 1000, meter=metering)
# runtime.rt.set_up(stmps=stamps * 1000, meter=metering)

runtime.rt.context._base_state = {
'signer': sender,
Expand Down Expand Up @@ -124,7 +124,9 @@ def execute(self, sender, contract_name, function_name, kwargs,
kwargs[k] = ContractingDecimal(str(v))

enable_restricted_imports()
runtime.rt.set_up(stmps=stamps * 1000, meter=metering)
result = func(**kwargs)
runtime.rt.tracer.stop()
disable_restricted_imports()

if auto_commit:
Expand All @@ -137,7 +139,7 @@ def execute(self, sender, contract_name, function_name, kwargs,
if auto_commit:
driver.flush_cache()

runtime.rt.tracer.stop()
#runtime.rt.tracer.stop()

# Deduct the stamps if that is enabled
stamps_used = runtime.rt.tracer.get_stamp_used()
Expand Down
Loading