monero-project/bitmonero — pull request #24 by Neozaru (2014-06-04 21:05:32+00:00)
Title: 'getinfo' daemon HTTP-RPC returns 'target_height' for progress estimation

Caution : "cryptonote_protocol_handler.inl" calls a 'core' setter for updating the target blockchain height. The "blockchain_target_height" attribute in 'core' was created for purely informative stuff. I don't think this is the best way to achieve this, but I think the core shouldn't access to raw data by itself, and it seems that some structure accessors/getters are actually performing changes to objects, so I wouldn't take the risk to alter daemon behavior.

The ideal way to achieve this properly could be an "Observer" pattern.