-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: log open/closed channels together with their locked AE #840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, does it need a resync as I don't see a migration. Let's wait until release with the merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Would only add unit tests for the new mutations and refactor one minor point.
@spec close_mutation(closing_type(), Node.aetx()) :: ChannelCloseMutation.t() | ||
def close_mutation(tx_type, tx), do: ChannelCloseMutation.new(tx_type, tx) | ||
|
||
@spec open_mutation(Node.aetx()) :: ChannelOpenMutation.t() | ||
def open_mutation(tx), do: ChannelOpenMutation.new(tx) | ||
|
||
@spec deposit_mutation(Node.aetx()) :: ChannelSpendMutation.t() | ||
def deposit_mutation(tx), do: ChannelSpendMutation.new(:aesc_deposit_tx.amount(tx)) | ||
|
||
@spec withdraw_mutation(Node.aetx()) :: ChannelSpendMutation.t() | ||
def withdraw_mutation(tx), do: ChannelSpendMutation.new(-:aesc_withdraw_tx.amount(tx)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's neat but personally I would call the new
directly avoiding the indirection as they are used only once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of this was to encapsulate the :aesc module inside the Channels
module so that the Transaction
module didn't have to deal with them directly
This migration will avoid requiring a full-sync, but it will take ~30mins to run.
@thepiwo I've now added the migration which to me took ~30min to run. This migration will avoid having to perform a resync |
refs #748