gottstech / gotts

A blockchain for non-collateralized stable-coins, follow MimbleWimble protocol but with explicit amount.
https://gotts.tech
Apache License 2.0
48 stars 4 forks source link

Remove the database migration and fix the Genesis output index #6

Closed garyyu closed 4 years ago

garyyu commented 4 years ago

Before this fixing:

$ curl -0 -XGET  -u gotts:`cat ~/.gotts/floo/.api_secret`  http://127.0.0.1:13513/v1/txhashset/outputs?start_index=1\&max=1

{
  "highest_index": 303,
  "last_retrieved_index": 1,
  "outputs": [
    {
      "output": {
        "features": {
          "Coinbase": {
            "spath": "9c9af651f2111dc5d529a760d5c42ea24d572589453f38982a9984c7"
          }
        },
        "commit": "0973513433682b8f4224a7a1bf387755a0642b54ca129eb4bc2946bd8e83fb54b4",
        "value": 60000000000
      },
      "output_type": "Coinbase",
      "spent": true,
      "block_height": null,
      "merkle_proof": null,
      "mmr_index": 0
    }
  ]
}

After this fixing:

$ curl -0 -XGET  -u gotts:`cat ~/.gotts/floo/.api_secret`  http://127.0.0.1:13513/v1/txhashset/outputs?start_index=1\&max=1
{
  "highest_index": 303,
  "last_retrieved_index": 1,
  "outputs": [
    {
      "output": {
        "features": {
          "Coinbase": {
            "spath": "9c9af651f2111dc5d529a760d5c42ea24d572589453f38982a9984c7"
          }
        },
        "commit": "0973513433682b8f4224a7a1bf387755a0642b54ca129eb4bc2946bd8e83fb54b4",
        "value": 60000000000
      },
      "output_type": "Coinbase",
      "spent": false,
      "block_height": 0,
      "merkle_proof": null,
      "mmr_index": 1
    }
  ]
}