wemixarchive / go-wemix

Go implementation of the Wemix project.
https://www.wemix.com/
GNU Lesser General Public License v3.0
28 stars 25 forks source link

Implement API to get brioche configuration #86

Closed eomti-wm closed 3 months ago

eomti-wm commented 3 months ago

Fixes #77 The implemented API is as follows.

To expose the Brioche API via the Websocket/HTTP RPC interface, need to add the --http(ws).api "wemix" flag or append "wemix" to Http(Ws)Modules in the node.config.

Closes #77

egonspace commented 3 months ago

If we attach a node to the mainnet now and look it up, it comes out as follows.

...
{
      blockReward: 30517578125000,
      endBlock: 1000285370,
      halvingTimes: 15,
      startBlock: 937170171
  }, {
      blockReward: 0,
      endBlock: 1000000000,
      halvingTimes: 16,
      startBlock: 1000285371
  }

But shouldn't it be like this?

...
{
      blockReward: 30517578125000,
      endBlock: 999999999,
      halvingTimes: 15,
      startBlock: 937170171
  }, {
      blockReward: 0,
      endBlock: 0, // ? we must decide the value for infinity block
      halvingTimes: 0, // ??
      startBlock: 1000000000
  }