-
Notifications
You must be signed in to change notification settings - Fork 682
fix: add an upper limit to # of accounts that can be generated by ganache #3361
Conversation
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.
Other than my one query, I give this the 👍
Co-authored-by: David Murdoch <187813+davidmurdoch@users.noreply.github.com>
…g/account-upper-limit
Since I have to back out the changes in the cli and move them to wallet && I borked the conventional commit, I am going to close this pr/del branch and re-open with the appropriate conventional commit. |
Not sure why you need to close. The conversations here may be valuable in the future and it would be nice to be able to reference this if we need to; that becomes more difficulty in a closed PR simple because it's not as visible (since you'd have to link to it from another PR to know to get to it.) |
@davidmurdoch Alrighty. |
Summary:
Cool. I thought Specifically, should I pass the whole |
My preference is to pass in just what is required, narrow the interface and all that. |
Since My assumption is uniformity. So do we update every instantiation of const wallet = new Wallet(options.wallet); // becomes
const wallet = new Wallet(options.wallet, options.logging); And the constructor becomes constructor(opts: EthereumInternalOptions["wallet"]) { // becomes
constructor(
opts: EthereumInternalOptions["wallet"],
logging: EthereumInternalOptions["logging"]
) { or, use destructuring const wallet = new Wallet(options.wallet); // becomes
const wallet = new Wallet(options); and the constructors constructor({
wallet: opts,
logging // only for classes that need logger
}: {
wallet: EthereumInternalOptions["wallet"];
logging: EthereumInternalOptions["logging"];
}) { Or my assumption is wrong about uniformity. Or something else. |
My preference would be to pass in only what is required (so we'd now be passing in And I'd extend that preference to pass in only what is required to all of the classes over having uniformity between those classes. I don't see the need to pass logging options into |
I think we should leave it as you have it right now |
yes. |
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.
I love it!
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.
LGTM lol
Issue #736 calls for a cap on the
totalAccounts
generated by ganache. This change sets a cap at 1000 accounts. 1000 was chosen because it was the largest power of ten that kept its unit tests under < 1s.Fixes #736