4.9 本地以太坊第7步:给初始账户打钱

分配好了,下面开始打款。学名:

Step 7: Initializing the Geth Database 初始化Geth数据库

用我们上一节生成的genesis.json文件来为两个节点充值。当然,要先初始化。用的是geth init这个命令。To create a blockchain node that uses this genesis block, first use geth init to import and sets the canonical genesis block for the new chain. This requires the path to genesis.json to be passed as an argument.

geth --datadir ./TPNode1/ init genesis.json geth --datadir myNet/HPNode2/ init genesis.json

通过geth init,node1注入100个以太币,node2注入200个以太币。

INFO [10-27|22:12:10.072] Maximum peer count ETH=50 LES=0 total=50

INFO [10-27|22:12:10.074] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"

WARN [10-27|22:12:10.077] Sanitizing cache to Go's GC limits provided=1024 updated=641

INFO [10-27|22:12:10.077] Set global gas cap cap=50,000,000

INFO [10-27|22:12:10.081] Initializing the KZG library backend=gokzg

INFO [10-27|22:12:10.123] Defaulting to pebble as the backing database

INFO [10-27|22:12:10.123] Allocated cache and file handles database=/home/eth/go-ethereum/V330/V330Node2/geth/chaindata cache=16.00MiB handles=16

INFO [10-27|22:12:10.136] Opened ancient database database=/home/eth/go-ethereum/V330/V330Node2/geth/chaindata/ancient/chain readonly=false

INFO [10-27|22:12:10.136] State schema set to default scheme=hash

INFO [10-27|22:12:10.136] Writing custom genesis block

INFO [10-27|22:12:10.137] Persisted trie from memory database nodes=3 size=411.00B time="735.212µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=0 livesize=0.00B

INFO [10-27|22:12:10.143] Successfully wrote genesis state database=chaindata hash=692145..82d559

INFO [10-27|22:12:10.143] Defaulting to pebble as the backing database

INFO [10-27|22:12:10.143] Allocated cache and file handles database=/home/eth/go-ethereum/V330/V330Node2/geth/lightchaindata cache=16.00MiB handles=16

INFO [10-27|22:12:10.154] Opened ancient database database=/home/eth/go-ethereum/V330/V330Node2/geth/lightchaindata/ancient/chain readonly=false

INFO [10-27|22:12:10.155] State schema set to default scheme=hash

INFO [10-27|22:12:10.155] Writing custom genesis block

INFO [10-27|22:12:10.156] Persisted trie from memory database nodes=3 size=411.00B time="972.267µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=0 livesize=0.00B

INFO [10-27|22:12:10.161] Successfully wrote genesis state database=lightchaindata hash=692145..82d559

郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。

郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。

微信号已复制,请打开微信添加咨询详情!
-->