feat: write out results of tested seed phrase reconstruction to txt file #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While the
double_check_shares()
function does ensure that the original seed phrase can be reconstructed for anyt
shares, it doesn't display the results to the user (it only shows Ok/Fail). So if someone wants to validate this themselves, they will need to manually via thecargo run reconstruct...
command. This can be fairly time-consuming and error prone depending on how many combinations there are. If someone wants to test a 2 of 4 reconstruction for all combinations, it will take quite a while.This change updates that function to output each n of m combination that is tested and then writes out the results to a file called
reconstructed_seed_phrases.txt
. For example, using the example from theREADME
:cargo run --features double-check split -t 2 -n 3 --secret "permit universe parent weapon amused modify essay borrow tobacco budget walnut lunch consider gallery ride amazing frog forget treat market chapter velvet useless topple"
, then the content of thetxt
file are automatically populated with the following: