-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNS-334: Subscription fixes, tests, and CLI #351
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orenl-lava
force-pushed
the
CNS-334-subscription-fixes-tests-and-cli
branch
2 times, most recently
from
March 10, 2023 03:50
e641114
to
43489bd
Compare
Yaroms
requested changes
Mar 10, 2023
Yaroms
previously approved these changes
Mar 12, 2023
omerlavanet
requested changes
Mar 15, 2023
omerlavanet
previously approved these changes
Mar 15, 2023
AdvanceBlock(): use ctx.WithBlockTime() to update the ctx's block time. InitAllKeppers(): use AdvanceBlock instead of NewBlock() and get a new ctx.
The result of NextMonth() on Jan 30,31 was Mar 1 or 2. Fix it to be the end of February.
During tx-subscribe we calculate the subscription expiry time. To ensure to the start-time is deterministic, use the current block timestamp.
subscribe: lavad tx subscription subscribe PLAN [CONSUMER] [IS_YEARLY] [flags] - PLAN is mandatory - CONSUMER is optional (default is creator's address) - IS_YEARLY is optional (default is false) current-subscription: lavad query subscription current-subscription [CONSUMER] - CONSUMER is optional (default is creator's address)
Not needed because all state changes are reverted anyhow upon error.
Rename the msg 'subscribe' to 'buy. Replace `is_yearly` with `duration` (in months)
Plans are always for 1 month. The `tx subscription buy` message indicates duration (in months).
For `query current-subscription` arg is mandatory (back). For `tx buy` indicate optional args in usage string.
Mark removed field as reserved and restore original identifiers.
orenl-lava
force-pushed
the
CNS-334-subscription-fixes-tests-and-cli
branch
from
March 15, 2023 17:02
c8f3ff9
to
d6bd5ff
Compare
omerlavanet
approved these changes
Mar 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
is_yearly
withduration
, all plans are for 1 month (remove planDuration
)tx subscription subscribe
totx subscription buy
buy
and (query)current-subscription
buy
msg args "consumer", "duration" optional (defaults: "creator", "1" respectively).