Oh man, you just linked to a random file with no comments in GitHub and your argument is that I could have figured that out before complaining about it?
You are too close to this project to understand what you just said to me. It would be impossible for you to find someone that's worked with this code for less than 100 hours to agree with you. How long you been working on this? Thousands of hours? And when you have a problem you have a direct line to the people who actually coded it.
uint32_t block_header::num_from_id(const block_id_type& id)
{
return fc::endian_reverse_u32(id._hash[0]);
}
tmp._hash[0] = fc::endian_reverse_u32(block_num()); // store the
block num in the ID, 160 bits is plenty for the hash
Ah ha! I misspoke! One comment in the middle of the file that vaguely references that the block id contains the block_num. This is acceptable documentation? I seem to recall reading dozens of times that it's not... from the witnesses. You know, those guys that validate the entire network for us and get professionally paid for their work? But somehow you think linking to a C++ file with zero documentation when people are using JavaScript is an appropriate response?
It's not a random file, it's the file that answers your question that you would have found if you'd taken the time to look.
It's not documentation, it's code.
It's nobody's fault but your own that you haven't taken the time to understand the code. It doesn't take thousands of hours, it takes a few minutes. You don't need that comment: you can see from the code itself that the block id contains the block number. Stop looking for someone to blame for your ignorance and start doing the reading.
So weird that no one seemed to have the answer except some Steemit inc employee replying under an anonymous account.
It's totally irrelevant that the block contains the block number. You already have to know the block number to retrieve the block in the first place.
99% of the incompetence has nothing to do with documentation. The functionality is trash. You can't retrieve a block with a date, and the only information Discussions give is the date (yet another obvious flaw). Not only that, the dates on operations are not the same as the date of the block they are in. Off by 3 sec.
You also can't retrieve the block with discussion id, another obvious function that should be included in the api. In addition, if the discussion is modified more than once the discussion does not record this info. Discussions also don't record where curation get's rewarded and the reward date gets erased after it's been paid off.
Need I go on? 90% of the info stored in the steemit api objects is useless and the info that's actually needed is missing. It's embarrassing, but not as embarrassing as the fact you won't admit it.