Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Nov 23, 2020

Using uint8_t for raw bytes has a style benefit:

  • The signedness is clear from reading the code, as it does not depend on the architecture

Other clean-ups in this pull include:

  • Remove unused methods
  • Constructor is simplified with Span
  • Remove Init() member in favor of C++11 member initialization

@practicalswift
Copy link
Contributor

practicalswift commented Nov 23, 2020

Concept ACK: nice cleanup (+49 −109)!

MarcoFalke added 2 commits November 23, 2020 21:19
@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member

laanwj commented Nov 25, 2020

Concept ACK!

@laanwj
Copy link
Member

laanwj commented Nov 25, 2020

There are some more unnecessary MakeUCharSpan that can be removed here, especially related to Base64 handling:

src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));

(possibly more but I could find these quickly)

@jonatack
Copy link
Member

Concept ACK

@laanwj
Copy link
Member

laanwj commented Dec 19, 2020

Code review ACK apart from the above comment. This PR is straightforward to review. The first commit can be seen separately.

@theStack
Copy link
Contributor

Concept ACK -- will review as soon as #20464 (comment) is resolved

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa29272 🍾

@laanwj
Copy link
Member

laanwj commented Feb 1, 2021

code review ACK fa29272

@laanwj laanwj merged commit 2c0fc85 into bitcoin:master Feb 1, 2021
@ryanofsky ryanofsky mentioned this pull request Feb 1, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 2, 2021
fa29272 Remove redundant MakeUCharSpan wrappers (MarcoFalke)
faf4aa2 Remove CDataStream::Init in favor of C++11 member initialization (MarcoFalke)
fada14b Treat CDataStream bytes as uint8_t (MarcoFalke)
fa8bdb0 refactor: Drop CDataStream constructors in favor of one taking a Span of bytes (MarcoFalke)
faa96f8 Remove unused CDataStream methods (MarcoFalke)

Pull request description:

  Using `uint8_t` for raw bytes has a style benefit:
  * The signedness is clear from reading the code, as it does not depend on the architecture

  Other clean-ups in this pull include:
  * Remove unused methods
  * Constructor is simplified with `Span`
  * Remove `Init()` member in favor of C++11 member initialization

ACKs for top commit:
  laanwj:
    code review ACK fa29272
  theStack:
    ACK fa29272 🍾

Tree-SHA512: 931ee28bd99843d7e894b48e90e1187ffb0278677c267044b3c0c255069d9bbd9298ab2e539b1002a30b543d240450eaec718ef4ee95a7fd4be0a295e926343f
@maflcko maflcko deleted the 2011-dataStream branch February 3, 2021 18:04
blockstreamsatellite added a commit to Blockstream/bitcoinsatellite that referenced this pull request Oct 28, 2021
Follow the updates from PR bitcoin#20464. Assume the new SerializeData (former
CSerializeData) is now a stream of uint8_t and drop the usage of the
GetAndClear() function, which was removed in the referred PR.
blockstreamsatellite added a commit to Blockstream/bitcoinsatellite that referenced this pull request Nov 10, 2021
Follow the updates from PR bitcoin#20464. Assume the new SerializeData (former
CSerializeData) is now a stream of uint8_t and drop the usage of the
GetAndClear() function, which was removed in the referred PR.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants