LLFourn / bdk_core_staging

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

Fix add_spk API #118

Closed rajarshimaitra closed 1 year ago

rajarshimaitra commented 1 year ago

Check if the spk already exists. If yes, returns false, or else add the spk into map and returns true

Fixes #98

codecov-commenter commented 1 year ago

Codecov Report

Merging #118 (46524ad) into master (b6a9886) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #118   +/-   ##
=======================================
  Coverage   59.39%   59.39%           
=======================================
  Files           8        8           
  Lines         266      266           
=======================================
  Hits          158      158           
  Misses        108      108           
Impacted Files Coverage Δ
bdk_chain/src/keychain/keychain_txout_index.rs 0.00% <ø> (ø)
bdk_chain/src/lib.rs 100.00% <ø> (ø)

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

LLFourn commented 1 year ago

Thaks @rajarshimaitra. Shall we also change the name to insert_script_pubkey to be consistent with the other apis?

rajarshimaitra commented 1 year ago

Done..

rajarshimaitra commented 1 year ago

@LLFourn updated as suggestied. Let me know if this is how you meant to import..

We can make hash_brown a non-optional dependency if that helps.

Could be, but what we have currently doesn't seem to be bad either..