Skip to content

Latest commit

 

History

History
executable file
·
45 lines (30 loc) · 625 Bytes

命令行测试.md

File metadata and controls

executable file
·
45 lines (30 loc) · 625 Bytes

geth命令行测试

初始化:

./geth --datadir data0 init genesis.json

进入geth命令行:

./geth --datadir data0 --networkid 1108 console 2>geth.log

新建账户:

personal.newAccount('123')

开始挖矿:

miner.start()
miner.start(1);admin.sleepBlocks(1);miner.stop() //只挖一个区块

解锁账户:

personal.unlockAccount(eth.accounts[0])

发送交易:

eth.sendTransaction({from:eth.accounts[0],to:"0xc9194a8ea28d76389af4c7e9c81222386a6ab47a",value:1000000,filename:"math",key:["a","b","c"]})

关键词查询:

eth.search(["d","c"])