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

refactor(indexes): Create a generic TxGroupIndex and uses it on AddressIndex #524

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

msbrogli
Copy link
Member

@msbrogli msbrogli commented Feb 9, 2023

Acceptance Criteria

  1. Create a TxGroupIndex, which is an abstract class to group transactions according to a key. It will be used in future PRs.
  2. Implemente MemoryTxGroupIndex and RocksDBTxGroupIndex, which are abstract classes as well.
  3. Refactor AddressIndex to use the TxGroupItem. Specifically, MemoryAddressIndex must use MemoryTxGroupIndex, and RocksDBAddressIndex must use RocksDBTxGroupIndex.

@msbrogli msbrogli requested a review from jansegre as a code owner February 9, 2023 06:36
@msbrogli msbrogli self-assigned this Feb 9, 2023
@msbrogli msbrogli force-pushed the refactor/address-index branch from 5ddf575 to c03a02e Compare February 9, 2023 16:03
hathor/indexes/memory_tx_group_index.py Outdated Show resolved Hide resolved
hathor/indexes/rocksdb_tx_group_index.py Outdated Show resolved Hide resolved
hathor/indexes/memory_address_index.py Outdated Show resolved Hide resolved
hathor/indexes/memory_tx_group_index.py Outdated Show resolved Hide resolved
hathor/indexes/memory_tx_group_index.py Outdated Show resolved Hide resolved
hathor/indexes/rocksdb_tx_group_index.py Outdated Show resolved Hide resolved
@msbrogli msbrogli force-pushed the refactor/address-index branch 2 times, most recently from 3475d13 to 4172700 Compare February 9, 2023 18:01
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #524 (ac3cef4) into dev (5b70281) will increase coverage by 0.02%.
The diff coverage is 98.83%.

@@            Coverage Diff             @@
##              dev     #524      +/-   ##
==========================================
+ Coverage   82.85%   82.87%   +0.02%     
==========================================
  Files         198      201       +3     
  Lines       18143    18205      +62     
  Branches     2564     2563       -1     
==========================================
+ Hits        15032    15088      +56     
- Misses       2549     2552       +3     
- Partials      562      565       +3     
Impacted Files Coverage Δ
hathor/indexes/rocksdb_tx_group_index.py 97.43% <97.43%> (ø)
hathor/indexes/address_index.py 92.30% <100.00%> (-0.80%) ⬇️
hathor/indexes/memory_address_index.py 96.00% <100.00%> (-1.73%) ⬇️
hathor/indexes/memory_tx_group_index.py 100.00% <100.00%> (ø)
hathor/indexes/rocksdb_address_index.py 96.96% <100.00%> (+0.26%) ⬆️
hathor/indexes/tx_group_index.py 100.00% <100.00%> (ø)
hathor/p2p/node_sync.py 83.98% <0.00%> (-1.46%) ⬇️
hathor/wallet/base_wallet.py 96.06% <0.00%> (+0.19%) ⬆️

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

hathor/indexes/tx_group_index.py Outdated Show resolved Hide resolved
hathor/indexes/tx_group_index.py Outdated Show resolved Hide resolved
hathor/indexes/memory_address_index.py Show resolved Hide resolved
hathor/indexes/memory_address_index.py Outdated Show resolved Hide resolved
hathor/indexes/memory_tx_group_index.py Outdated Show resolved Hide resolved
hathor/indexes/rocksdb_tx_group_index.py Outdated Show resolved Hide resolved
hathor/indexes/rocksdb_tx_group_index.py Show resolved Hide resolved
@pedroferreira1 pedroferreira1 self-requested a review February 12, 2023 18:21
@msbrogli msbrogli force-pushed the refactor/address-index branch from 293f66f to ac3cef4 Compare February 12, 2023 18:21
@msbrogli msbrogli force-pushed the refactor/address-index branch from ac3cef4 to 7a0b9a4 Compare February 16, 2023 15:58
@msbrogli msbrogli merged commit 7a0b9a4 into dev Feb 16, 2023
@msbrogli msbrogli deleted the refactor/address-index branch February 16, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants