Skip to content

Refactorings#316

Merged
bigspider merged 9 commits intodevelopfrom
refactorings
Mar 14, 2025
Merged

Refactorings#316
bigspider merged 9 commits intodevelopfrom
refactorings

Conversation

@bigspider
Copy link
Collaborator

@bigspider bigspider commented Feb 3, 2025

Changes from #314 that are relevant improvement for the develop branch.

It's mostly about cleaning up some interfaces, modularizing and exposing some previously static functionality

@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.70%. Comparing base (f377b0e) to head (f46bb46).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #316   +/-   ##
========================================
  Coverage    84.70%   84.70%           
========================================
  Files           17       17           
  Lines         2230     2230           
========================================
  Hits          1889     1889           
  Misses         341      341           
Flag Coverage Δ
unittests 84.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…of sign_psbt.

Created separate utility modules instead.
Deleted the 'update_hashes_with_map_value' module, as it was only used in
the new txhashes.c module.

Cleaned up interface of the various compute_sighash_* functions.
Avoid taking the key placeholder as an argument, and declare some
of the arguments as const pointers.
…functions public.

The functions (and some related ones) have been refactored in order to avoid
arguments referring to the specific input state, or the key expression.
@bigspider bigspider marked this pull request as ready for review March 13, 2025 10:04
Copy link
Contributor

@iartemov-ledger iartemov-ledger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not compared the functions moved from sign_psbt.c.
Also you mentioned some bitcoin flavors that would benefit from this refactoring. Do we test them somewhere?

@bigspider bigspider merged commit 1478c9e into develop Mar 14, 2025
187 checks passed
@bigspider bigspider deleted the refactorings branch March 14, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants