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

fix: the chain/outputs/byids doesn't work for SigLocked UTXO #11

Closed garyyu closed 4 years ago

garyyu commented 4 years ago

The output_i and output_ii problems :-)

After this fixing, it works like this example:

$ curl -0 -XGET -u gotts:`cat ~/.gotts/floo/.api_secret`  http://127.0.0.1:13513/v1/chain/outputs/byids?id=09d3aee1dd7f6d2742e7e15c8ca6f0b486735e347520fb48f689edd7a5943c1d23

[
  {
    "output": {
      "features": {
        "SigLocked": {
          "locker": {
            "p2pkh": "ab9926027c6c037c9629b5b78b647ab8fd43a6aeef76d1d16716c7d445a1e92f",
            "pub_nonce": "027fdb417ae76708d60a47d82633c6539ac00dea11538475c9f3ec70009b5b9d66",
            "secured_w": 5264193619716105024,
            "relative_lock_height": 1
          }
        }
      },
      "commit": "09d3aee1dd7f6d2742e7e15c8ca6f0b486735e347520fb48f689edd7a5943c1d23",
      "value": 100000000000
    },
    "height": 112,
    "mmr_index": 5
  }
]