Skip to content

Commit

Permalink
Merge pull request magicalne#8 from magicalne/fix_get_block_committed…
Browse files Browse the repository at this point in the history
…_info

fix: empty response in gw_committed_block_info
  • Loading branch information
magicalne authored Mar 7, 2022
2 parents 2838840 + 67dabb5 commit a4dfb61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agent/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ def get_gw_stat_by_lock(lock_name, gw_rpc: GodwokenRpc, block_hash,
ckb_rpc: CkbRpc):
lock_type_hash = gw_config.get_lock_type_hash(lock_name)
res = gw_rpc.gw_get_block_committed_info(block_hash)
if res is None or res['result'] is None:
return (0, 0)
tx = res["result"]["transaction_hash"]
res = ckb_rpc.get_transaction(tx)
inputs = res["result"]["transaction"]["inputs"]
Expand Down

0 comments on commit a4dfb61

Please sign in to comment.