How to change default account in private ethereum network?

0 votes
I have created 5 account in my network. My default account is account 0. I want to make a transaction and some operations on account 3 so I want to set the default account to account 3. How to make account 3 as default?
Jan 9 in Blockchain by digger
• 27,620 points
42 views

1 answer to this question.

0 votes

First list the accounts:

> eth.accounts

NOTE: Even though you have mentioned that you want to set account 3 as default, selecting the account from the list displayed from the above command is important because there is a chance that the index of accounts is changed. 

Now to set the default account to account 3, you the following command:

> miner.setEtherbase(web3.eth.accounts[3])

answered Jan 9 by Omkar
• 67,120 points

Related Questions In Blockchain

0 votes
1 answer

Not able to create new account in geth for private ethereum network

Looks like the account you are trying ...READ MORE

answered Dec 6, 2018 in Blockchain by Omkar
• 67,120 points
66 views
0 votes
1 answer

How to connect two different nodes in private ethereum network?

To connect two nodes, you can use ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 67,120 points
107 views
0 votes
1 answer

How to check peer connectivity in ethereum private network?

You can use the net module to check the ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 67,120 points
17 views
0 votes
1 answer

How to get IP address of peer connected in private ethereum network?

To get these details, you can use ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 67,120 points
30 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
105 views
0 votes
1 answer
0 votes
0 answers

Error: Unexpected token o in JSON at position 1

I have been working with Interacting a ...READ MORE

Mar 6 in Blockchain by saeedi
• 120 points

edited Mar 6 by Omkar 233 views
0 votes
1 answer

How to get account with ethers by default in ethereum private network?

Have you created an account before allocating ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 67,120 points
30 views
0 votes
1 answer

How to import an account in private ethereum network?

 When you create a new account, the ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 67,120 points
18 views