git fetch
git checkout -b v1.0.1
./bytomd init --chain_id testnet
defaultdatadir() string
}return datadir
}其它(如linux):~/.bytom
# this is a toml config file.
# for more information, see
fast_sync = true
db_backend = "leveldb"
api_addr = "0.0.0.0:9888"
chain_id = "testnet"
[p2p]
laddr = "tcp:"
seeds = "47.96.42.1:46656,172.104.224.219:46656,45.118.132.164:46656"
api_addr = "0.0.0.0:9888"
:我們可以在瀏覽器中開啟http://localhost:9888
來訪問dashboard頁面,進行檢視與管理
chain_id = "testnet"
:當前連線的是testnet
,即測試網,裡面挖出來的比原幣是不值錢的
laddr = "tcp:"
:本地監聽46656
埠,別的節點如果想連我,就需要訪問我的46656
埠
seeds = "47.96.42.1:46656,172.104.224.219:46656,45.118.132.164:46656"
:比原啟動後,會主動連線這幾個位址獲取資料
defaultconfigtmpl = `# this is a toml config file.
# for more information, see
fast_sync = true
db_backend = "leveldb"
api_addr = "0.0.0.0:9888"
`var
mainnetconfigtmpl = `chain_id = "mainnet"
[p2p]
laddr = "tcp:"
seeds = "45.79.213.28:46657,198.74.61.131:46657,212.111.41.245:46657,47.100.214.154:46657,47.100.109.199:46657,47.100.105.165:46657"
`var
testnetconfigtmpl = `chain_id = "testnet"
[p2p]
laddr = "tcp:"
seeds = "47.96.42.1:46656,172.104.224.219:46656,45.118.132.164:46656"
`var
solonetconfigtmpl = `chain_id = "solonet"
[p2p]
laddr = "tcp:"
seeds = ""
`testnet(連線到測試網):46656
,會主動連線3個種子
solonet(本地單獨節點):46658
,不會主動連線別人(也因此不會被別人連線上),適合單機研究
main()
initfiles(cmd *cobra.command, args string)
if config.chainid == "mainnet"
else
if config.chainid == "testnet"
else
log.withfield("config"
, configfilepath).info("initialized bytom")}
ensureroot(rootdir
string, network
string)
}selectnetwork(network
string) string else
if network == "mainnet"
else
}
mysql 初始化配置檔案 MySQL 初始化配置
1 方式 原始碼安裝 編譯過程中設定初始化引數 配置檔案 資料庫啟動之前,設定配置檔案引數 etc my.cnf 啟動指令碼命令列 mysqld safe skip grant tables skip networking 說明 my.cnf port 3306 mysqld safe port 3...
yii 初始化時如何配置預設訪問某個檔案
4.進入module檔案 class module extends yii base module 需要繼承 yii base module使用框架自帶的方法初始化 defaultroute 設定改檔案 home 下的控制器檔案 controller 下的某個檔案為預設檔案 init 根據defau...
MySQL 初始化讀取配置檔案摘要
摘自 mysql技術內幕 innodb儲存引擎 在資料庫例項啟動時,會在以下位置讀取配置檔案 etc my.cnf etc mysql my.cnf usr local mysql etc my.cnf mycnf 讀取順序 由 前 到後 依次讀取 如存在多個配置檔案,以最後讀取的配置檔案為準。my...