2

getblockheaderbyheight and any other simmilar calls only returns the data below. None of the other calls returns the txFee of the block

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "block_header": {
      "depth": 78376,
      "difficulty": 815625611,
      "hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
      "height": 912345,
      "major_version": 1,
      "minor_version": 2,
      "nonce": 1646,
      "orphan_status": false,
      "prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
      "reward": 7388968946286,
      "timestamp": 1452793716
    },
    "status": "OK"
  }
}
2

Presumably you'd have to use the getblock method to get the transactions also and then iterate the transactions to add up total fees of a block.

Update: doc

  • Thanks. I just saw the explorer's source code and that's how they get the total fee. They iterate through all the transactions and then increment the sum_fees – kuchi May 24 '18 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.