Page MenuHomePhabricator

fix includes in standard.{h|cpp}
ClosedPublic

Authored by PiRK on Mar 25 2024, 14:23.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC4b15b2af0406: fix includes in standard.{h|cpp}
Summary

As far as I can tell, nothing in this module needs amount.h, so just remove the include. This should prevent D15778 from introducing a new amount -> util/system -> script/standard -> amount circular import.

While we are fixing the includes, remove also the unused crypto/sha256.h include in the source file.

Test Plan

ninja all check-all

Event Timeline

Fabien requested changes to this revision.Mar 25 2024, 14:30
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/script/standard.cpp
9 ↗(On Diff #46452)

But see other comment

src/script/standard.h
12 ↗(On Diff #46452)

I don't think you can do that, and I think it only works because it's indirectly included already.
The CScriptID template below needs the uint160 type to exist.

This revision now requires changes to proceed.Mar 25 2024, 14:30
PiRK edited the summary of this revision. (Show Details)

don't remove the uint256.h include (uint160 needed for templates) and don't confuse uint256 with sha256

This revision is now accepted and ready to land.Mar 25 2024, 16:36
This revision was automatically updated to reflect the committed changes.