Parameters in UpdateTip - calculation of log2_work I looked up log2_work inside main.cpp and I can't follow its calculation by log(chainActive.Tip()-&gt;nChainWork.getdouble())/log(2.0).

a) What is -&gt; explicitely indicating? (I'm at basic level of C++)

b) And what is log2_work exactly saying? Does it quantify the effort of calculation?

Related Question: here
FYI the code under discussion is available here on GitHub.

-&gt; is a member access operator in C++, just as . is. They both expect the name of an object's member on the right (e.g. a member function or variable). The difference is that . expects an object on the left, whereas -&gt; expects a pointer to an object which it first dereferences.

So chainActive.Tip()-&gt;nChainWork.getdouble() starts with the active chain, gets a pointer to a CBlockIndex object which represents the current tip, dereferences that pointer and gets the total chain work of the tip (which is a 256 bit integer), and converts it to a double.

Next it calculates natural_log(total_chain_work) / natural_log(2), which is the same as calculating log_base_2(total_chain_work). I presume this is simply to make the output smaller, as opposed to having to output the entire (much longer) total_chain_work.

If you'd like to get it back into the total_chain_work format used in older versions, just calculate 2log2_work, e.g. pow(2.0, log2_work).