美文网首页eos
2.9 cleos-commands-net

2.9 cleos-commands-net

作者: furnace | 来源:发表于2019-07-24 15:12 被阅读0次

net 常用命令

控制本地 p2p 网络连接。使用方式 cleos net SUBCOMMAND。

1. connect

开始到一个对端的新连接。使用方式 cleos net connect host。

$ cleos net connect 127.0.0.1:9099
"added connection"

注意,这会更新 cleos net peers 的输出结果。

2. disconnect

关闭一个已经存在的连接。使用方式 cleos net disconnect host。

$ cleos net disconnect 127.0.0.1:9099
"connection removed"

注意,这会更新 cleos net peers 的输出结果。

3. status

已存在连接的状态。使用方式 cleos net status host。

$ cleos net status 127.0.0.1:9011
{
  "peer": "127.0.0.1:9011",
  "connecting": false,
  "syncing": false,
  "last_handshake": {
    "network_version": 0,
    "chain_id": "0000000000000000000000000000000000000000000000000000000000000000",
    "node_id": "0000000000000000000000000000000000000000000000000000000000000000",
    "key": "EOS1111111111111111111111111111111114T1Anm",
    "time": 0,
    "token": "0000000000000000000000000000000000000000000000000000000000000000",
    "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
    "p2p_address": "",
    "last_irreversible_block_num": 0,
    "last_irreversible_block_id": "0000000000000000000000000000000000000000000000000000000000000000",
    "head_num": 0,
    "head_id": "0000000000000000000000000000000000000000000000000000000000000000",
    "os": "",
    "agent": "",
    "generation": 0
  }
}
$ cleos net status 127.0.0.1:9018
null

4. peers

所有已存在对端的状态。使用方式 cleos net peers。

$ cleos net peers
[{
    "peer": "",
    "connecting": false,
    "syncing": false,
    "last_handshake": {
      "network_version": 1206,
      "chain_id": "f22d65c5d3af21db9f2b474ca4ed5f93b2f7e2e72798179585b85570f705e4dc",
      "node_id": "8fc5a23f2595bbd8628acf4cc86f811c8f4be784e544b96eea5be695aa63d46e",
      "key": "EOS1111111111111111111111111111111114T1Anm",
      "time": "1563789282490704426",
      "token": "0000000000000000000000000000000000000000000000000000000000000000",
      "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
      "p2p_address": "furnace:9011 - 8fc5a23",
      "last_irreversible_block_num": 24064,
      "last_irreversible_block_id": "00005e005dfc7a9fee7b94faa9a3b345499e43d6b46efc4dbcea1a9669543c92",
      "head_num": 24065,
      "head_id": "00005e01041df6aa4225c68ba7247a8038a001c24693800c69b31ae969bc476c",
      "os": "linux",
      "agent": "\"EOS Test Agent\"",
      "generation": 4
    }
  },{
    "peer": "127.0.0.1:9013",
    "connecting": false,
    "syncing": false,
    "last_handshake": {
      "network_version": 0,
      "chain_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "node_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "key": "EOS1111111111111111111111111111111114T1Anm",
      "time": 0,
      "token": "0000000000000000000000000000000000000000000000000000000000000000",
      "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
      "p2p_address": "",
      "last_irreversible_block_num": 0,
      "last_irreversible_block_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "head_num": 0,
      "head_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "os": "",
      "agent": "",
      "generation": 0
    }
  },{
    "peer": "127.0.0.1:9011",
    "connecting": false,
    "syncing": false,
    "last_handshake": {
      "network_version": 0,
      "chain_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "node_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "key": "EOS1111111111111111111111111111111114T1Anm",
      "time": 0,
      "token": "0000000000000000000000000000000000000000000000000000000000000000",
      "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
      "p2p_address": "",
      "last_irreversible_block_num": 0,
      "last_irreversible_block_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "head_num": 0,
      "head_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "os": "",
      "agent": "",
      "generation": 0
    }
  },{
    "peer": "127.0.0.1:9012",
    "connecting": false,
    "syncing": false,
    "last_handshake": {
      "network_version": 0,
      "chain_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "node_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "key": "EOS1111111111111111111111111111111114T1Anm",
      "time": 0,
      "token": "0000000000000000000000000000000000000000000000000000000000000000",
      "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
      "p2p_address": "",
      "last_irreversible_block_num": 0,
      "last_irreversible_block_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "head_num": 0,
      "head_id": "0000000000000000000000000000000000000000000000000000000000000000",
      "os": "",
      "agent": "",
      "generation": 0
    }
  }
]

项目源代码

项目源代码会逐步上传到 Github,地址为 https://github.com/windstamp/blockchain

Contributor

  1. Windstamp, https://github.com/windstamp

相关文章

  • 2.9 cleos-commands-net

    net 常用命令 控制本地 p2p 网络连接。使用方式 cleos net SUBCOMMAND。 1. conn...

  • HCI笔记 | Week 09 Interfaces and P

    lessons 2.9 and 2.10 2.9 Interfaces and Politics Introduc...

  • 宝宝成长记

    2.9

  • 防盗螺丝选择

    防盗螺丝选择: 一、型号:M2.9-19 ,M2.9-25, M2.9-19圆头(内六角)自攻 材质:不锈钢 (终...

  • 2.9 Python-爬虫 - 子目录

    0.0 总目录 2.9爬虫 2.9.1请求库 2.9.1.1Urllib 2.9.1.2Requests 2.9....

  • 2.9

    今天是小年,可一点也没有要过年的氛围,农村里该走的都走了,或是去儿女家过年,都活小年了,父母也还没有回来,不知...

  • 2.9

    《2.9系统程序的部署》具体要求: 贴效果图,最好是GIF文件3.gif 系统部署前的准备工作(制作图标、添加关于...

  • 2.9

    1 制作图标 先下载png图片timg.png 然后通过在线转换设计为图标QQ图片20181129094618.j...

  • 2.9

    年前放假的最后一天! 上了班,跟小伙伴们交代了各种注意事项,感觉今天早会也是开心满满,特别是微微,感...

  • 2.9

    事件:过年给职工办年货~不可思议的忙!食堂各个分部都任务巨大~我一直苦于干杂活,没办法练手,这机会终于来了!面点房...

网友评论

    本文标题:2.9 cleos-commands-net

    本文链接:https://www.haomeiwen.com/subject/urvxrctx.html