[
  {
    "description": "Standard",
    "transactions": {
      "aaa": {
        "inputs": [
          {
            "txId": "xxx",
            "vout": 0
          },
          {
            "txId": "xxx",
            "vout": 1
          }
        ],
        "outputs": [
          1,
          2,
          3,
          4
        ]
      },
      "ccc": {
        "inputs": [
          {
            "txId": "yyy",
            "vout": 0
          },
          {
            "txId": "yyy",
            "vout": 1
          }
        ],
        "outputs": [
          5,
          6
        ]
      },
      "ddd": {
        "inputs": [
          {
            "txId": "aaa",
            "vout": 0
          },
          {
            "txId": "ccc",
            "vout": 0
          }
        ],
        "outputs": [
          7,
          8
        ]
      },
      "eee": {
        "inputs": [
          {
            "txId": "ccc",
            "vout": 1
          },
          {
            "txId": "ddd",
            "vout": 0
          },
          {
            "txId": "ddd",
            "vout": 1
          }
        ],
        "outputs": [
          9
        ]
      }
    },
    "expected": [
      {
        "txId": "aaa",
        "vout": 1
      },
      {
        "txId": "aaa",
        "vout": 2
      },
      {
        "txId": "aaa",
        "vout": 3
      },
      {
        "txId": "eee",
        "vout": 0
      }
    ]
  },
  {
    "description": "Double spends [and subsequent invalid chains]",
    "transactions": {
      "aaa": {
        "inputs": [
          {
            "txId": "xxx",
            "vout": 0
          }
        ],
        "outputs": [
          1
        ]
      },
      "bbb": {
        "inputs": [
          {
            "txId": "xxx",
            "vout": 0
          }
        ],
        "outputs": [
          2
        ]
      },
      "ccc": {
        "inputs": [
          {
            "txId": "bbb",
            "vout": 0
          }
        ],
        "outputs": [
          3
        ]
      },
      "ddd": {
        "inputs": [
          {
            "txId": "ccc",
            "vout": 0
          }
        ],
        "outputs": [
          4
        ]
      }
    },
    "expected": [
      {
        "txId": "aaa",
        "vout": 0
      }
    ]
  }
]
