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

fix: query cell_output by hex index #1499

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

rabbitz
Copy link
Collaborator

@rabbitz rabbitz commented Nov 16, 2023

https://explorer.nervos.org/transaction/0xab0877e51785419489f0a5049250c08e47dbdb2fee1a6c8a37ae10dd523090a7

image
{"cycles"=>"0x6c32eb",
 "time_added_to_pool"=>nil,
 "transaction"=>
  {"cell_deps"=>
    [{"dep_type"=>"dep_group", "out_point"=>{"index"=>"0x0", "tx_hash"=>"0xf05188e5f3a6767fc4687faf45ba5f1a6e25d3ada6129dae8722cb282f262493"}},
     {"dep_type"=>"code", "out_point"=>{"index"=>"0x2", "tx_hash"=>"0x5dce8acab1750d4790059f22284870216db086cb32ba118ee5e08b97dc21d471"}}],
   "hash"=>"0xab0877e51785419489f0a5049250c08e47dbdb2fee1a6c8a37ae10dd523090a7",
   "header_deps"=>[],
   "inputs"=>[{"previous_output"=>{"index"=>"0x1", "tx_hash"=>"0xd24e1ae55741c46994f11627b63cb3aedd41b769accfcb1daa5ddf1461f098b8"}, "since"=>"0x0"}],
   "outputs"=>
    [{"capacity"=>"0x32a9f80c6",
      "lock"=>{"args"=>"0x000174a34aef48704ef33dcc3f7a7dd5c8e5144ea69b", "code_hash"=>"0xd00c84f0ec8fd441c38bc3f87a371f547190f2fcff88e642bc5bf54b9e318323", "hash_type"=>"type"},
      "type"=>
       {"args"=>"0x520adc2e6a1211b822f866e13b1009a1862225a10000000100000069", "code_hash"=>"0x2b24f0d644ccbdd77bbf86b27c8cca02efa0ad051e447c212636d9ee7acaaec9", "hash_type"=>"type"}}],
   "outputs_data"=>["0x000000000000000000c000"],
   "version"=>"0x0",
   "witnesses"=>
    ["0x540100001000000054010000540100004001000001d7953f528ac1834deefa677e4833937023cb5ddb6b076a25857eb113b6d3a91dc0d70aeba6d0efa6887ab7308ea3f5044fd7ad501f75dba9df4fcc98adc00833a62b694a43d91b33738a3a24cb6a3b380e12105a1c492e8ee7a4d164e1be9abbec97eeac261cc27ca8a6c4d0d6d739e27e46a5d242e08df9f33ae86d3965dd6bd280d9320d7862ad09b32103900596a08ba01a51863a8aac3f5ac1969360ae301d000000007b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a224e475579596d526a4d44466a4f4749334e5442684d7a59334e445134595467304e7a5935596d4e6a4d544a6d5a5752695a6a4d795a6a5134597a4930595449784d474a684e7a4a6b4f54466b5a5755335a6d4a685a67222c226f726967696e223a2268747470733a2f2f6170702e6a6f792e6964227d"]},
 "tx_status"=>{"block_hash"=>"0xb8aebf019676d289186499efa237b9d4532e2a17a228f02579aee965deb6a7ea", "reason"=>nil, "status"=>"committed"}}

OutPoint.Index should be 2

@rabbitz rabbitz requested a review from zmcNotafraid November 16, 2023 01:50
@codecov-commenter
Copy link

Codecov Report

Attention: 187 lines in your changes are missing coverage. Please review.

Comparison is base (bb447e4) 66.37% compared to head (8e12f60) 67.30%.
Report is 139 commits behind head on develop.

❗ Current head 8e12f60 differs from pull request most recent head 338d2fb. Consider uploading reports for the commit 338d2fb to get more accurate results

Files Patch % Lines
...ib/tasks/migration/update_output_cells_status.rake 29.26% 29 Missing ⚠️
lib/tasks/migration/generate_referring_cells.rake 19.23% 21 Missing ⚠️
.../controllers/api/v1/ckb_transactions_controller.rb 39.28% 17 Missing ⚠️
app/workers/token_transfer_detect_worker.rb 10.52% 17 Missing ⚠️
...ib/tasks/migration/async_missing_transactions.rake 15.78% 16 Missing ⚠️
app/workers/contract_statistic_worker.rb 0.00% 15 Missing ⚠️
app/models/ckb_sync/new_node_data_processor.rb 71.73% 13 Missing ⚠️
app/controllers/api/v2/scripts_controller.rb 72.97% 10 Missing ⚠️
lib/websocket.rb 0.00% 10 Missing ⚠️
lib/scheduler.rb 0.00% 7 Missing ⚠️
... and 9 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1499      +/-   ##
===========================================
+ Coverage    66.37%   67.30%   +0.92%     
===========================================
  Files          275      283       +8     
  Lines         7397     7634     +237     
===========================================
+ Hits          4910     5138     +228     
- Misses        2487     2496       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rabbitz rabbitz added this pull request to the merge queue Nov 16, 2023
Merged via the queue into nervosnetwork:develop with commit f154543 Nov 16, 2023
1 check passed
@rabbitz rabbitz deleted the fix/cell_output_query branch November 16, 2023 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants