Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

demonstrate syncing with block_position indexing #119

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rajarshimaitra
Copy link
Collaborator

This is an attemted approach at #85 . Not final and can be structured better. Opening up for approach discussions.

Build on top of #77 and demos it over electrum API.

Things Done:

  • new BlockPosition struct that is ChainPosition with custom ordering.
  • Fetch block position data from electrum and create the index accordingly.
  • New SyncBlockPosition command to sync in this way. This will create a new tracker and a new db. the regular TxHeight tracker and db won't be updated in that call.

Question:

  • What are better way to structure this. There's a lot of copy past of existing code, and I couldn't find a good way to satisfy type checker, with the way the main function is structured currently. So just dumped all the code in a separate cli arg.

@rajarshimaitra rajarshimaitra changed the title Block position demosntrate syncing with block_position indexing Jan 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2023

Codecov Report

Merging #119 (3cf3831) into master (e9ac33e) will decrease coverage by 4.15%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   65.30%   61.14%   -4.16%     
==========================================
  Files           8        8              
  Lines         294      314      +20     
==========================================
  Hits          192      192              
- Misses        102      122      +20     
Impacted Files Coverage Δ
bdk_chain/src/chain_data.rs 35.10% <0.00%> (-9.49%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@LLFourn
Copy link
Owner

LLFourn commented Jan 10, 2023

Can you try and re-do this PR on top of master @rajarshimaitra?

@rajarshimaitra
Copy link
Collaborator Author

@LLFourn rebased on master..

@evanlinjin evanlinjin changed the title demosntrate syncing with block_position indexing demonstrate syncing with block_position indexing Jan 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants