Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

11.7. 配置自動解鎖賬號

創建password檔案,在裡面輸入密碼,每個賬號一行密碼如:

			
123456
123456
123456			
			
		

啟動參數

			
geth --rpc --rpcaddr="0.0.0.0" --rpccorsdomain="*" --unlock '0,1,2' --password ~/.ethereum/password   --nodiscover --maxpeers '5' --networkid '12345' --datadir '~/.ethereum'  console			
			
		
		
neo@MacBook-Pro ~/ethereum % geth --networkid 123456 --rpc --rpcaddr="0.0.0.0" --rpccorsdomain "*" --mine --minerthreads 1 --unlock 0 --password ./password
INFO [02-28|22:51:25] Maximum peer count                       ETH=25 LES=0 total=25
INFO [02-28|22:51:25] Starting peer-to-peer node               instance=Geth/v1.8.1-stable/darwin-amd64/go1.10
INFO [02-28|22:51:25] Allocated cache and file handles         database=/Users/neo/Library/Ethereum/geth/chaindata cache=768 handles=128
INFO [02-28|22:51:25] Initialised chain configuration          config="{ChainID: 15 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 Byzantium: <nil> Engine: unknown}"
INFO [02-28|22:51:25] Disk storage enabled for ethash caches   dir=/Users/neo/Library/Ethereum/geth/ethash count=3
INFO [02-28|22:51:25] Disk storage enabled for ethash DAGs     dir=/Users/neo/.ethash                      count=2
INFO [02-28|22:51:25] Initialising Ethereum protocol           versions="[63 62]" network=123456
WARN [02-28|22:51:25] Head state missing, repairing chain      number=5373 hash=6a2b1b…9e3c38
INFO [02-28|22:51:25] Rewound blockchain to past state         number=5372 hash=f6900d…59872d
INFO [02-28|22:51:25] Loaded most recent local header          number=5373 hash=6a2b1b…9e3c38 td=2246785401
INFO [02-28|22:51:25] Loaded most recent local full block      number=5372 hash=f6900d…59872d td=2246064913
INFO [02-28|22:51:25] Loaded most recent local fast block      number=5373 hash=6a2b1b…9e3c38 td=2246785401
INFO [02-28|22:51:25] Loaded local transaction journal         transactions=0 dropped=0
INFO [02-28|22:51:25] Regenerated local transaction journal    transactions=0 accounts=0
WARN [02-28|22:51:25] Blockchain not empty, fast sync disabled 
INFO [02-28|22:51:25] Starting P2P networking 
INFO [02-28|22:51:28] UDP listener up                          self=enode://f4e5cee0be36c8823423d3115c488f29f82b5f95c02a796cd80c4f47078726e0b2dc5b95407469275fb52a24ff0fb95b2a32f38d6eb95f417a2f65268d4e3fa8@[::]:30303
INFO [02-28|22:51:28] RLPx listener up                         self=enode://f4e5cee0be36c8823423d3115c488f29f82b5f95c02a796cd80c4f47078726e0b2dc5b95407469275fb52a24ff0fb95b2a32f38d6eb95f417a2f65268d4e3fa8@[::]:30303
INFO [02-28|22:51:28] IPC endpoint opened                      url=/Users/neo/Library/Ethereum/geth.ipc
INFO [02-28|22:51:28] HTTP endpoint opened                     url=http://0.0.0.0:8545                  cors=* vhosts=localhost
WARN [02-28|22:51:28] ------------------------------------------------------------------- 
WARN [02-28|22:51:28] Referring to accounts by order in the keystore folder is dangerous! 
WARN [02-28|22:51:28] This functionality is deprecated and will be removed in the future! 
WARN [02-28|22:51:28] Please use explicit addresses! (can search via `geth account list`) 
WARN [02-28|22:51:28] ------------------------------------------------------------------- 
INFO [02-28|22:51:29] Unlocked account                         address=0x5c18a33DF2cc41a1bedDC91133b8422e89f041B7
INFO [02-28|22:51:29] Transaction pool price threshold updated price=18000000000
INFO [02-28|22:51:29] Etherbase automatically configured       address=0x5c18a33DF2cc41a1bedDC91133b8422e89f041B7
INFO [02-28|22:51:29] Starting mining operation 
INFO [02-28|22:51:29] Commit new mining work                   number=5373 txs=0 uncles=0 elapsed=403.127µs
INFO [02-28|22:51:38] Successfully sealed new block            number=5373 hash=f70a5d…fe9b7b
INFO [02-28|22:51:38] 🔨 mined potential block                  number=5373 hash=f70a5d…fe9b7b