Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented May 17, 2020

The first commit removes a TODO that is infeasible to solve. Currently, most (de)serializable classes in Bitcoin Core have public members. For example CMessageHeader, FlatFilePos, CBlock, CTransaction, CCoin, ...

So either this TODO comment should apply to all classes or to none. Fix that discrepancy by removing it from the source code for now. If deemed important, the TODO can be discussed in a brainstorming issue later.

Also run clang format on the header file in a new commit. Happy to drop this commit if it is too controversial, but I think it is trivial to review and makes the workflow of developers using clang-format-diff easier.

MarcoFalke added 2 commits May 17, 2020 10:24
Can be reviewed with the git diff flags
-U0 --ignore-all-space --word-diff-regex=.
@practicalswift
Copy link
Contributor

practicalswift commented May 17, 2020

ACK fabea6d

This is probably the only repo where a clang-format-diff.py runs the risk of be deemed "too controversial" :)

@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.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK fabea6d, agree with both changes: removing TODO and applying the clang-format-diff.py.

@naumenkogs
Copy link
Member

ACK fabea6d. Not sure why that TODO was there in the first place, but Marco's justification seems correct.

Formatting seems correct.

@maflcko
Copy link
Member Author

maflcko commented May 18, 2020

Not sure why that TODO was there in the first place

The TODO was added in one of the first commits. I think it made sense back when it was added.

@maflcko maflcko merged commit e20e964 into bitcoin:master May 20, 2020
@maflcko maflcko deleted the 2005-netNoTodo branch May 20, 2020 11:32
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 20, 2020
fabea6d net: Run clang-format on protocol.h (MarcoFalke)
facdeea net: Remove un-actionable TODO (MarcoFalke)

Pull request description:

  The first commit removes a TODO that is infeasible to solve. Currently, most (de)serializable classes in Bitcoin Core have public members. For example `CMessageHeader`, `FlatFilePos`, `CBlock`, `CTransaction`, `CCoin`, ...

  So either this TODO comment should apply to all classes or to none. Fix that discrepancy by removing it from the source code for now. If deemed important, the TODO can be discussed in a brainstorming issue later.

  Also run clang format on the header file in a new commit. Happy to drop this commit if it is too controversial, but I think it is trivial to review and makes the workflow of developers using clang-format-diff easier.

ACKs for top commit:
  practicalswift:
    ACK fabea6d
  naumenkogs:
    ACK fabea6d. Not sure why that TODO was there in the first place, but Marco's justification seems correct.
  hebasto:
    ACK fabea6d, agree with both changes: removing TODO and applying the `clang-format-diff.py`.

Tree-SHA512: b79ae07be27e5a40fc9f411a5e9ae91aecb2fdedbcbf74699614a1004f4ef816bf396903ec6c06eb1395fd83a2047620c7583acbaadfb8c4e613319a63062c3c
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Feb 3, 2021
Summary:
> The first commit removes a TODO that is infeasible to solve. Currently, most (de)serializable classes in Bitcoin Core have public members. For example CMessageHeader, FlatFilePos, CBlock, CTransaction, CCoin, ...
>
> So either this TODO comment should apply to all classes or to none. Fix that discrepancy by removing it from the source code for now. If deemed important, the TODO can be discussed in a brainstorming issue later.

Backport note: the second commit is about style. Some changes go against ABC style guidelines, the rest are already applied.

This is a backport of Core [[bitcoin/bitcoin#18996 | PR18996]]

Test Plan: ninja && ninja check

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9138
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 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.

5 participants