As per title.
Details
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- defaults (branched from master)
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 3792 Build 5658: Bitcoin ABC Buildbot (legacy) Build 5657: arc lint + arc unit
Event Timeline
@deadalnix
Should
/** Default setting for maximum allowed size for a block, in bytes */ static const uint64_t DEFAULT_MAX_BLOCK_SIZE = 32 * ONE_MEGABYTE;
from consensus.h be moved here? I think it should be.
src/defaults.h | ||
---|---|---|
146 | I'll address this in a bit |
src/validation.cpp | ||
---|---|---|
22 ↗ | (On Diff #5679) | Duplicate |
I'm torn. I think there's an argument for keeping it in consensus. The argument for moving it to defaults is because it can be overridden by miners, but tweaking this value can lead to chain instability if every miner has a different max set (allowing others to exploit this boundary, etc).
Otherwise, the diff looks fine to me. Getting many of these defaults out of validation.h to somewhere better described makes sense.
Thought about it some more. I don't think this fixes the root cause of the issue: validation.h/cpp is full of junk that shouldn't be there. Moving these defaults out looks like on the surface, but would be a non-issue if code was properly segmented into appropriate headers. That way, defaults would live where they are used.