我使用以下两行来启动和运行私有区块链。假设我已经向它发送了一些事务,现在由于某些原因(例如服务器出现故障),我需要重新启动该链。我的链只运行在一个节点/服务器上(所以没有网络,所有东西都运行在一台服务器上)
geth --identity "MyNodeName" --rpc --rpcport "8545" --rpccorsdomain
"*" --datadir Users/TestChain1 --port "30303" --rpcaddr "127.0.0.1"
--nodiscover --rpcapi "db,eth,net,web3,personal" --networkid 123
init /Users/CustomGenesis.json
geth --identity "MyNodeName" --rpc --rpcport "8545" --rpccorsdomain
"*" --datadir Users/TestChain1 --port "30303" --nodiscover --rpcapi
"db,eth,net,web3,personal" --networkid 123 console问:我能否停止区块链,然后重新运行区块链而不会丢失储存在其中的任何数据?
发布于 2017-11-13 10:41:18
是。
只需跳过第一个命令(所以没有init),geth将接受保存在User/TestChain1 1中的链接数据,以便继续:)
https://ethereum.stackexchange.com/questions/30594
复制相似问题