Page MenuHomePhabricator

Use DataStream where possible
ClosedPublic

Authored by PiRK on Mon, Nov 17, 15:08.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCe63a388c3f04: Use DataStream where possible
Summary

This replaces CDataStream with DataStream everywhere where it doesn't cause a compilation failure (i.e no downstream code is calling ss.Get/SetVersion or ss.Get/SetType).

This concludes backport of core#25296
https://github.com/bitcoin/bitcoin/pull/25296/commits/fa29e73cdab82f98682821322cda89b1084ba887
https://github.com/bitcoin/bitcoin/pull/25296/commits/fa035fe2d61d0c98d1bfd0153a0c3b5eb9d40de4
Depends on D18947

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Mon, Nov 17, 15:08
src/streams.h
420 ↗(On Diff #56636)

this change is the second commit

src/wallet/bdb.cpp
762 ↗(On Diff #56636)

This and the next line are the only non-trivial changes in the diff. The fact that we can change the type of ssKey to DataStream demonstrates that nothing calls GetType or tries to access the nType member (which is private anyway) on that returned object.

This revision is now accepted and ready to land.Tue, Nov 18, 10:52
This revision was automatically updated to reflect the committed changes.