Removed `mineWhenNeeded` condition
Removed a condition that detects if `mineWhenNeeded === true`. While reaslistically, the `defaultAccount` will only be populated when `mineWhenNeeded` is set, there is no need to check for this when falling back to the blockchain account.
This commit is contained in:
parent
294e14446f
commit
178115de18
|
@ -25,18 +25,16 @@ class SwarmProcess extends ProcessWrapper {
|
|||
password = fs.dappPath(this.storageConfig.account.password);
|
||||
}
|
||||
// default to our blockchain config account, or our default account
|
||||
else if (!this.blockchainConfig.isDev &&
|
||||
this.blockchainConfig.mineWhenNeeded &&
|
||||
this.blockchainConfig.account &&
|
||||
else if (this.blockchainConfig.account &&
|
||||
(this.blockchainConfig.account.address || this.defaultAccount) &&
|
||||
this.blockchainConfig.account.password
|
||||
) {
|
||||
// defaultAccount is populated from blockchain_connector.determineDefaultAccount which is either
|
||||
// config/blockchain.js > account > address or the first address returned from web3.eth.getAccounts
|
||||
// (usually the default account)
|
||||
bzzaccount = this.defaultAccount;
|
||||
bzzaccount = this.blockchainConfig.account.address || this.defaultAccount;
|
||||
password = fs.dappPath(this.blockchainConfig.account.password);
|
||||
console.trace(`Swarm account/password falling back to the blockchain account ${this.defaultAccount}. The account is either specified in config/blockchain.js > account > address or is the first address returned from web3.eth.getAccounts. The password is specified in config/blockchain.js > account > address.`);
|
||||
console.trace(`Swarm account/password falling back to the blockchain account ${this.blockchainConfig.account.address || this.defaultAccount}. The account is either specified in config/blockchain.js > account > address or is the first address returned from web3.eth.getAccounts. The password is specified in config/blockchain.js > account > address.`);
|
||||
}
|
||||
else {
|
||||
return 'Account address and password are needed in the storage config to start the Swarm process';
|
||||
|
|
Loading…
Reference in New Issue