Closed sugargoat closed 5 months ago
Attention: Patch coverage is 50.49505%
with 50 lines
in your changes are missing coverage. Please review.
Project coverage is 55.61%. Comparing base (
ab2af32
) to head (c416c74
). Report is 193 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@sugargoat I like the renaming, and while we are at it, what about if we make it:
spend_subaddress
for the field that specifies which subaddress to spend from, andrequire_spend_subaddress
for the mode that requires it?This would be consistent and concise. If you are ok with this, I'd be happy to do the search-replace and push a commit.
@sugargoat I like the renaming, and while we are at it, what about if we make it:
spend_subaddress
for the field that specifies which subaddress to spend from, andrequire_spend_subaddress
for the mode that requires it?This would be consistent and concise. If you are ok with this, I'd be happy to do the search-replace and push a commit.
No worries - happy to get the renaming in order!
Motivation
We would like to provide a guard rail for the use of subaddress_to_spend_from, so that an account can enforce that transactions using the Txos within the account adhere to the scheme of spending from any Txo regardless of which subaddress it was sent to (the turnstile model), or requiring that a subaddress to spend from is always specified (so the Txos don’t get mixed together and create inconsistent subaddress balances)
In this PR
require_spend_subaddresses
to the Account db as bool columnrequire_spend_subaddresses
to the APIs for create and import accountsubaddress_to_spend_from
tospend_from_subaddress
for brevity & clarityspend_from_subaddress
to correctly initialize the account withrequire_spend_subaddress
Test Plan
spend_from_subaddress
teststransaction
service~ Going with minimum viable e2e testingFuture Work
--strict-params
mode to prevent misspellings from accidentally omitting the parameter