GolosChain / golos

Socio-economic mediablockchain
https://developers.golos.io
Other
59 stars 36 forks source link

cli_wallet doesn't return transaction ids in get_block() #531

Closed afalaleev closed 6 years ago

afalaleev commented 6 years ago

Steps to reproduce

  1. # ./cli_wallet --server-rpc-endpoint="wss://ws.golos.io"
  2. locked >>> get_block 1234

Actual result

{
  "previous": "000004d10f3a1a1c6c81e5cb7f4adf41be80a5be",
  "timestamp": "2016-10-18T12:06:21",
  "witness": "testzcrypto-01",
  "transaction_merkle_root": "2dd29bfd3d0121065547a46a71641c4af2d343e1",
  "extensions": [],
  "witness_signature": "20243d5e271b2fe97ac6f734b1e8f01616813108e703e9476a033b726787ab2c470360b12661081cd7e4a3a05711494af2b35ae425780f8a0f721ce0408b8ad207",
  "transactions": [{
      "ref_block_num": 1228,
      "ref_block_prefix": 460778576,
      "expiration": "2016-10-18T12:06:33",
      "operations": [[
          "account_witness_vote",{
            "account": "lehard",
            "witness": "primus",
            "approve": true
          }
        ]
      ],
      "extensions": [],
      "signatures": [
        "1f71b01ab9f17d414d5d35ed277fdbcca1569cc566b7fb194828a51e1ca3f64d8c16b2fd512205033a1ebb8761fb4f6bfcd728ff50f0f5083f3e48f52b49b55ba5"
      ]
    }
  ]
}

Expected result

{
......
  "block_id": "....",
  "signed_key": "....",
  "transaction_ids": [...],
}
zxcat commented 6 years ago

Direct get_block call to api node returns the same result, so It's not cli_wallet issue. Not sure if it issue at all, get_block in 16.4 returns the same result.

afalaleev commented 6 years ago

In 16.4 cli_wallet returns signed_block_with_info - https://github.com/GolosChain/golos/blob/golos-v0.16.4/libraries/wallet/wallet.cpp#L1048 And it's a cli_wallet structure with filled transactions ids: https://github.com/GolosChain/golos/blob/golos-v0.16.4/libraries/wallet/include/steemit/wallet/wallet.hpp#L69 Filling of transaction ids is here: https://github.com/GolosChain/golos/blob/golos-v0.16.4/libraries/wallet/wallet.cpp#L1337

zxcat commented 6 years ago

532