Add test helper function which stores a program and registers a user #1036
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.
Now that we no longer have pre-registered accounts, in order to test signing we need to first store a program and register a user. To reduce boilerplate in our siging tests, this adds a test helper function which stores a default program and registers a user using that program.
I've also made a change to the
get_sign_tx_data
test helper function. It now takes the verifying key as an argument, rather than defaulting toDAVE_VERIFYING_KEY
, and sets the block number to the current block number rather than defaulting to zero.One unrelated thing i noticed: We have a test called
signature_request_with_derived_account_works
which looks to me like it doesn't test anything extra than our other signing tests - it is left over from when we had two different signing flows. Do yous think we can get rid of it?entropy-core/crates/threshold-signature-server/src/user/tests.rs
Line 320 in 624b37d