-
Notifications
You must be signed in to change notification settings - Fork 94
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
Support for importing prefunded accounts #105
Conversation
Pull Request Test Coverage Report for Build 3870
💛 - Coveralls |
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.
🚀
@@ -136,6 +136,13 @@ func InitializeConstruction( | |||
fetcher.WithTimeout(time.Duration(config.HTTPTimeout)*time.Second), | |||
) | |||
|
|||
// Import prefunded account and save to database | |||
// TODO: load balances of these imported addresses |
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.
nit: load balances and coins of imported addresses
pkg/storage/key_storage.go
Outdated
// Skip if key already exists | ||
err = k.Store(ctx, acc.Address, keyPair) | ||
if err != nil { | ||
alreadyExists := strings.Contains(err.Error(), "already exists") |
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.
nit: let's use errors.Is
here
Motivation
Supports importing accounts into the database by adding them as
PrefundedAccount
in the config file.Solution
Open questions