Skip to content

Conversation

@DesWurstes
Copy link
Contributor

No description provided.

@domob1812
Copy link
Contributor

utACK 13938/commits/923b9f5172d5a8d2841fb52e187bd057570853ee

@maflcko
Copy link
Member

maflcko commented Aug 10, 2018

If my memory doesn't fail me, we did something similar only 2 weeks ago: Return void instead of bool for functions that cannot fail #13774

How many are there still left?

@maflcko maflcko requested a review from practicalswift August 10, 2018 18:13
@maflcko
Copy link
Member

maflcko commented Aug 10, 2018

utACK 923b9f5172d5a8d2841fb52e187bd057570853ee

@DesWurstes
Copy link
Contributor Author

Yes, I saw this one while reviewing that Pull Request. I don’t know if there are more of those.

@Empact
Copy link
Contributor

Empact commented Aug 10, 2018

utACK 923b9f5

Copy link
Member

@sipa sipa left a comment

Choose a reason for hiding this comment

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

utACK 923b9f5172d5a8d2841fb52e187bd057570853ee

src/init.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Nit: if you're modifying this code anyway, update it to follow the style guide and put braces around then clause which isn't on the same line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Empact
Copy link
Contributor

Empact commented Aug 11, 2018

re-utACK 2da54f5

@practicalswift
Copy link
Contributor

utACK 2da54f5

@maflcko
Copy link
Member

maflcko commented Aug 11, 2018

utACK 2da54f5

Copy link
Contributor

@donaloconnor donaloconnor left a comment

Choose a reason for hiding this comment

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

utACK 2da54f5

@fanquake
Copy link
Member

utACK 2da54f5

@fanquake fanquake changed the title [Refactoring] Trivial: Cleanup StartRest() refactoring: Cleanup StartRest() Aug 12, 2018
@maflcko maflcko added this to the 0.18.0 milestone Aug 12, 2018
@laanwj
Copy link
Member

laanwj commented Aug 13, 2018

If my memory doesn't fail me, we did something similar only 2 weeks ago: Return void instead of bool for functions that cannot fail #13774
How many are there still left?

I think this is a good point, I'm also a bit divided on changes like this. It seems unnecessary and exposes callee implementation details to the caller.

A consistent convention for error handling ("return false on error") makes sense and if a function cannot return an error that might mean that some potential errors go ignored, or do a lazy thing such as assert out.

All this needs to be re-added when proper error handling is introduced in the future.

@DesWurstes
Copy link
Contributor Author

DesWurstes commented Aug 13, 2018

Maybe we should aim to replace exceptions with returning bool (except in tests)?

@maflcko maflcko merged commit 2da54f5 into bitcoin:master Aug 13, 2018
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 19, 2021
2da54f5 Cleanup StartRest() (DesWurstes)

Pull request description:

Tree-SHA512: 7e907315009c0351b7a3347ec13b6727abd12fe722d51cc061cb635ea20f9a550af5f50dc364c4313501b0dfc3696bcfa26a2a5f0170a4b5808624e043085d29
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
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.

9 participants