Skip to content
Merged
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
Get block number from DB. #425
  • Loading branch information
afalaleev committed Jan 11, 2022
commit d007ccc4dee6e83417cbd5599701ac7a557660f2
6 changes: 3 additions & 3 deletions proxy/plugin/solana_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def process_block_tag(self, tag):
return block_number

def eth_blockNumber(self):
slot = self.client.get_slot(commitment=Confirmed)['result']
logger.debug("eth_blockNumber %s", hex(slot))
return hex(slot)
height = self.db.get_last_block_height()
logger.debug("eth_blockNumber %s", hex(height))
return hex(height)

def eth_getBalance(self, account, tag):
"""account - address to check for balance.
Expand Down