Page MenuHomePhabricator

Refactor GetDifficulty from RPC
ClosedPublic

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

Details

Summary

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

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
getdifficultyreface
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1014
Build 1014: arc lint + arc unit

Event Timeline

chainActive.Tip() is a threadsafe singleton class?

src/rpc/server.h
222

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.

src/rpc/server.h
222

There is a lot of historical weirdness in that codebase.

This revision was automatically updated to reflect the committed changes.