Skip to content

Commit

Permalink
Reduced default Provider quorum for testnets.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 25, 2020
1 parent ad27600 commit 1cfab31
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/networks/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,11 @@ function ethDefaultProvider(network: string): (providers: any) => any {
if (providerList.length === 0) { return null; }

if (providers.FallbackProvider) {
let quorum = providerList.length / 2;
let quorum = 1;
if (options.quorum != null) {
quorum = options.quorum;
} else if (quorum > 2) {
if (network === "homestead") {
quorum = 2;
} else {
quorum = 1;
}
} else if (network === "homestead") {
quorum = 2;
}
return new providers.FallbackProvider(providerList, quorum);
}
Expand Down

0 comments on commit 1cfab31

Please sign in to comment.