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

Restructure Token Issuer #97

Open
wants to merge 10 commits into
base: ads-stage
Choose a base branch
from
Open

Conversation

Sneagan
Copy link
Collaborator

@Sneagan Sneagan commented Dec 15, 2021

Change token issuer function to use goroutines and a waitgroup to manage
asynchronous processing instead of immediate commits.

@Sneagan Sneagan marked this pull request as ready for review December 21, 2021 15:52
@@ -107,6 +107,8 @@ func (c *Server) redeemTokenV2(issuer *Issuer, preimage *crypto.TokenPreimage, p
}

input := &dynamodb.PutItemInput{
// @ME emit different error messages depending on whether the ID is the same and the data is different or the ID is the same AND the data is the same.
// Batch persistence if possible

Choose a reason for hiding this comment

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

Is this a reminder?

for _, topicMapping := range topicMappings {
if msg.Topic == topicMapping.Topic {
go func(

Choose a reason for hiding this comment

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

I’m curious! Is there any disadvantage on keeping this goroutine here?

Issuer_public_key: "",
Status: ERROR,
Associated_data: request.Associated_data,
}

Choose a reason for hiding this comment

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

Final question, final question! I won’t bother more 😆

Why sending a result with an error and not an error to the error channel?

Given that all of the tokens will fail.

(I am missing so much context… This is just out of curiosity)

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