bdk icon indicating copy to clipboard operation
bdk copied to clipboard

[chain] Create module `indexer`

Open ValuedMammal opened this issue 1 year ago • 4 comments

Introduce module keychain_txout_index and replace old keychain module with balance.rs

fixes #1317 replaces #1175

Changelog notice

Removed keychain module from bdk_chain. The Balance type is now re-exported from the top level

Checklists

All Submissions:

  • [x] I've signed all my commits
  • [x] I followed the contribution guidelines
  • [x] I ran cargo fmt and cargo clippy before committing

ValuedMammal avatar Jun 27 '24 14:06 ValuedMammal

I wonder what we think about:

indexer.rs // the trait in here
indexer/
  ├── keychain_txout.rs
  └── spk_txout.rs

LLFourn avatar Jun 28 '24 00:06 LLFourn

@LLFourn Should indexer be a pub mod or do we just re export everything under it?

ValuedMammal avatar Jun 28 '24 12:06 ValuedMammal

I think re-export, despite pedantic, is more future-proof.

storopoli avatar Jun 29 '24 16:06 storopoli

Rebased onto a112b4d9

ValuedMammal avatar Jul 03 '24 14:07 ValuedMammal

@LLFourn Should indexer be a pub mod or do we just re export everything under it?

I think it must be pub mod otherwise you will be re-exporting the ChangeSet in the keychain_txout.rs file at the root! I would just make people import by indexer::keychain_txout::KeychainTxOutIndex.

I wouldn't mind dropping the TxOut from these which seems pretty redundant.

LLFourn avatar Jul 04 '24 01:07 LLFourn

  • Fixed file indexer.rs
  • Made indexer a public module

ValuedMammal avatar Jul 05 '24 16:07 ValuedMammal

I'd prefer to merge this as is rather than doing any more renaming at this point.

notmandatory avatar Jul 05 '24 17:07 notmandatory