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

Fixes#355: [Pdr acc] CORS, Debug Mode, the first day issue on the calculation #358

Merged
merged 24 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
debug prints are deleted
  • Loading branch information
kdetry committed Nov 2, 2023
commit b36bbf4f2aba8968bb2083652dd4f9e17510f40f
2 changes: 0 additions & 2 deletions pdr_backend/accuracy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def save_statistics_to_file():

output = []

print("contract_information", len(contract_information))
for statistic_type in statistic_types:
seconds_per_epoch = statistic_type["seconds_per_epoch"]
contracts = list(
Expand All @@ -53,7 +52,6 @@ def save_statistics_to_file():
start_ts_param, end_ts_param = get_start_end_params(seconds_per_epoch)

contract_ids = [contract["id"] for contract in contracts]
print("contract_ids", len(contract_ids))

# Get statistics for all contracts
statistics = calculate_statistics_for_all_assets(
Expand Down
6 changes: 1 addition & 5 deletions pdr_backend/util/subgraph_slot.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def get_slots(
skip,
)

print("query", query)
result = query_subgraph(
get_subgraph_url(network),
query,
Expand Down Expand Up @@ -125,10 +124,7 @@ def process_single_slot(slot: Slot, end_of_previous_day_timestamp: int):
correct_predictions_count = slots_evaluated = 0
# split the id to get the slot timestamp
timestamp = int(slot["id"].split("-")[1])
# print("timestamp", timestamp)
# print("end_of_previous_day_timestamp", end_of_previous_day_timestamp)
# print("slot", slot)
# print("------------------")

if timestamp < end_of_previous_day_timestamp:
staked_yesterday += float(slot["roundSumStakes"])
else:
Expand Down
Loading