-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #447 save instruction statistics * #447 add token info * #447 add table for tx costs * #447 fix * #447 remove obsolete fields * #447 fix merge * #447 add heap info and move step info to different table * #447 fix * #447 fix PR issues * fix PR issues * Use re for getting bpf and heap info
- Loading branch information
Showing
7 changed files
with
194 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from typing import List | ||
|
||
from ..indexer.utils import CostInfo | ||
from ..indexer.base_db import BaseDB | ||
|
||
|
||
class CostsDB(BaseDB): | ||
def __init__(self): | ||
BaseDB.__init__(self, 'solana_neon_transactions_costs') | ||
|
||
def add_costs(self, tx_costs: List[CostInfo]): | ||
rows = [] | ||
for cost_info in tx_costs: | ||
rows.append(tuple(cost_info)) | ||
|
||
with self._conn.cursor() as cursor: | ||
cursor.executemany(f''' | ||
INSERT INTO solana_neon_transactions_costs | ||
(sol_sign, operator, heap_size, bpf_instructions, sol_cost, neon_income) | ||
VALUES(%s, %s, %s, %s, %s, %s) ON CONFLICT DO NOTHING''', | ||
rows) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.