When we launch substrate-front-end-template, the first thing one sees is a bunch of dummy accounts with some Balance, and I was under the impression that these accounts were being fetched from Genesis storage of the running chain. However, when I went into chain_spec.rs
file and deleted all accounts, and even renamed some in the testnet_genesis function, I continue to see accounts, albeit with zero balance: ![enter image description here](https://i.stack.imgur.com/WmCkG.png)
在控制台上,keyring.getAccounts()
返回这些帐户。
这是我的 ChainSpec 的样子:
Ok(ChainSpec::from_genesis(
"Development",
"dev",
ChainType::Development,
move || {
testnet_genesis(
wasm_binary,
vec![authority_keys_from_seed("Foundation")],
get_account_id_from_seed::<sr25519::Public>("Foundation"),
vec![
get_account_id_from_seed::<sr25519::Public>("Foundation"),
],
true,
)
},
// Bootnodes
vec![],
// Telemetry
None,
// Protocol ID
None,
// Properties
Some(props),
// Extensions
None,
))
正如您所看到的,没有提及 alice、bob、charlie 等帐户。我什至搜索了整个节点文件夹以查找这些帐户的提及,但无济于事。有人可以告诉我怎么做吗properly将新帐户、sudo 帐户等添加到我的创世配置中?谢谢。