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

Think about deterministic improvements for Split logic #11

Closed
SpontaneousOverthrow opened this issue Mar 24, 2023 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@SpontaneousOverthrow
Copy link
Contributor

The main idea here is to refactor this function

	for _, store := range stores {
		for id := range peers {
			peerExists, _ := regexp.MatchString(filepath.Base(store.Location)+":.*", peers[id])
			if peerExists {
				participantsIDs = append(participantsIDs, id)
			}
		}
		for _, wallet := range store.Wallets {
			for account := range wallet.Accounts(ctx) {
				key, err := service.GetAccountKey(ctx, account, passphrases)
				if err != nil {
					fmt.Println("Error")
				}

				accountDatas[account.Name()] = append(
					accountDatas[account.Name()],
					key,
				)
			}
		}
	}

We need to have ParticipantID accountName and key in one data struct(struct or hash map) to prevent nondeterminism

@SpontaneousOverthrow SpontaneousOverthrow added the enhancement New feature or request label Mar 24, 2023
@SpontaneousOverthrow SpontaneousOverthrow self-assigned this Mar 24, 2023
@SpontaneousOverthrow
Copy link
Contributor Author

sort of fixed here #49 need more tests

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

No branches or pull requests

1 participant