LLFourn / bdk_core_staging

Staging area for bdk_core initial development
15 stars 12 forks source link

`insert..` methods ensure chain consistency + renaming stuff #116

Closed evanlinjin closed 1 year ago

evanlinjin commented 1 year ago

Closes #97 Closes #90 Closes #110

Chain consistency stuff

Methods such as insert_{} are split between insert_{}_preview and insert_{}. One only previews the changes, the latter also applies. Both these methods returns a changeset.

The internal logic of insert_{}_preview now uses as determine_changeset to make behavior more reliable and reduce duplicated code. This means that any changes are consistent with the logic of determine_changeset/additions.

Renaming stuff

codecov-commenter commented 1 year ago

Codecov Report

Merging #116 (71376cc) into master (0615e7d) will increase coverage by 2.98%. The diff coverage is 78.00%.

@@            Coverage Diff             @@
##           master     #116      +/-   ##
==========================================
+ Coverage   59.46%   62.45%   +2.98%     
==========================================
  Files           8        8              
  Lines         264      277      +13     
==========================================
+ Hits          157      173      +16     
+ Misses        107      104       -3     
Impacted Files Coverage Δ
bdk_chain/src/chain_graph.rs 0.00% <ø> (ø)
bdk_chain/src/keychain.rs 0.00% <ø> (ø)
bdk_chain/src/keychain/keychain_txout_index.rs 0.00% <ø> (ø)
bdk_chain/src/sparse_chain.rs 80.48% <0.00%> (+1.91%) :arrow_up:
bdk_chain/src/tx_graph.rs 71.14% <82.97%> (+6.69%) :arrow_up:
bdk_chain/src/chain_data.rs 44.59% <0.00%> (-4.06%) :arrow_down:

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