Author Topic: [API] get_block returns transactions with IDs?  (Read 1189 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
I noticed that too when writing the new backend for stats.bitshares.eu .. things would be alot easier if we had an identifier in the transaction or at least the operation for get_block

Offline monsterer

My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline monsterer

Just digging into this transaction GUID problem, looking at get_block, I see output like this:

Code: [Select]

   "id":1,
   "result":{ 
      "previous":"0003c22d0651c49a1782e183bccbeb5dd6221f55",
      "timestamp":"2015-10-22T07:28:12",
      "witness":"1.6.40",
      "transaction_merkle_root":"f6cdd68c9292d1696f5c2ba76de5c68baa45175f",
      "extensions":[ 

      ],
      "witness_signature":"205f918acf9bf6ec73e288dfa731c732a18f5030aa103577e0199638ecd15aeebf6dee1f11ccd9dcf6f1dc6b44b3465c3b172a49f1e88204a7a0b167bb6fafc960",
      "transactions":[ 
         { 
            "ref_block_num":49708,
            "ref_block_prefix":4123127678,
            "expiration":"2015-10-22T07:28:24",
            "operations":[ 
               [ 
                  1,
                  { 
                     "fee":{ 
                        "amount":1000000,
                        "asset_id":"1.3.0"
                     },
                     "seller":"1.2.36644",
                     "amount_to_sell":{ 
                        "amount":"235000000000",
                        "asset_id":"1.3.0"
                     },
                     "min_to_receive":{ 
                        "amount":100000000,
                        "asset_id":"1.3.121"
                     },
                     "expiration":"2020-10-22T07:28:07",
                     "fill_or_kill":false,
                     "extensions":[ 

                     ]
                  }
               ]
            ],
            "extensions":[ 

            ],
            "signatures":[ 
               "1f43e13111b333462f0f43af6fd238d6474f9922485b8c08025ace2d80a5ebb4306229099e1da460c997c0543490b37db2fabf913dc513fb8786a285a41f1feca0"
            ],
            "operation_results":[ 
               [ 
                  1,
                  "1.7.1344"
               ]
            ]
         }
      ],
      "block_id":"0003c22e2f8cddfb7b3b2798543a4b131d0fbe7e",
      "signing_key":"BTS87mX5Fk4JHGMCudKYeTo2HfsukkLM9GyBYpj1QHwR2jxy7Mp7a"
   }
}

Note the complete lack of object ID for the transaction? How are we supposed to identify what transaction this is? I feel I must be missing something major, here.
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads