-
Notifications
You must be signed in to change notification settings - Fork 9
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
Use DB to support ordered channel, ICA and packet fee #14
base: main
Are you sure you want to change the base?
Conversation
src/db/controller/channel.ts
Outdated
} | ||
} | ||
|
||
private static async feedChannelCloseConfirmEvent( |
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.
seems unnecessary async
) | ||
} | ||
|
||
public static updateInProgress(id?: number, inProgress = true) { |
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.
id can be undefined?
]) // remove open try | ||
del<ChannelOpenCloseTable>(DB, this.tableName, [ | ||
{ | ||
state: ChannelState.INIT, |
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.
Seems this should be TRYOPEN?
event.channelOpenCloseInfo.dstConnectionId | ||
) | ||
return () => { | ||
del<ChannelOpenCloseTable>(DB, this.tableName, [ |
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.
hmm is this for cleanup??
in the flow, I thought each channel delete an event created by counterparty chain.
client.last_update_time = Number(header.signedHeader.header.time.seconds) | ||
} | ||
|
||
insert(DB, this.tableName, client) |
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.
update?
Use sqlite to store indexed events to support: