Page MenuHomePhabricator

Refactor GetDifficulty from RPC

Authored by deadalnix on Oct 19 2017, 14:27.



It doesn't go fetch global state implicitely now and is declared is the proper header.

Test Plan
make check

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Oct 19 2017, 14:27
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 19 2017, 14:27
schancel accepted this revision.Oct 20 2017, 04:04

chainActive.Tip() is a threadsafe singleton class?

222 ↗(On Diff #1591)

This is pretty strange. Can't help but wonder why they did this that way.

This revision is now accepted and ready to land.Oct 20 2017, 04:04

The singleton is not thread safe, you need to lock onto cs_main or the code is invalid.

222 ↗(On Diff #1591)

There is a lot of historical weirdness in that codebase.

This revision was automatically updated to reflect the committed changes.