Skip to content
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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

ALPAC-4
Copy link
Collaborator

@ALPAC-4 ALPAC-4 commented Nov 1, 2024

Use sqlite to store indexed events to support:

  • Ordered Channel
  • Channel Creation (to support ICA)
  • Packet Fee

@beer-1 beer-1 self-requested a review November 1, 2024 03:14
}
}

private static async feedChannelCloseConfirmEvent(
Copy link

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) {
Copy link

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,
Copy link

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, [
Copy link

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)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants