节点配置

源码样式:

    // 0: local-node 
    //1: master-worker
    RunMode RunMode `toml:"run_mode"`
    // serve http port
    HttpPort string `toml:"http_port"`
    // serve websocket port
    WsPort string `toml:"ws_port"`
    // log out level:
    // panic, fatal, error, warn, info, debug, trace
    LogLevel string `toml:"log_level"`
    
    LeiLimit uint64 `toml:"lei_limit"`
  • Runmode: the node operation mode, 0 is for single-node operation, 1 is for master-worker operation (master-worker is not currently supported)
  • HttpPort: http listening address, port configuration for serving external calls.
  • WsPort: the websocket listening address, the port configuration for serving external calls.
  • LogLevel: print the level of the log, from top to bottom, there are panic, fatal, error, warn, info, debug, trace
  • LeiLimit:the upper limit of lei that can be consumed per block

配置示例:

run_mode = 0

http_port = "7998"

ws_port = "8998"

log_level = "info"

lei_limit = 50000