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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chainActive.Tip() is a threadsafe singleton class?

src/rpc/server.h
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.

src/rpc/server.h
222 ↗(On Diff #1591)

There is a lot of historical weirdness in that codebase.

This revision was automatically updated to reflect the committed changes.