Skip to content

Conversation

@gmaxwell
Copy link
Contributor

Thanks to awemany for pointing this out.

This replaces #10172 which appears to be abandoned, but uses the constants as requested on that PR.

for (const CTxIn &_txin : ptxConflicting->vin)
{
if (_txin.nSequence < std::numeric_limits<unsigned int>::max()-1)
if (_txin.nSequence <= MAX_BIP125_RBF_SEQUENCE)
Copy link
Member

@laanwj laanwj Jul 17, 2017

Choose a reason for hiding this comment

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

MAX_BIP125_RBF_SEQUENCE is 0xfffffffd
The old value was 0xfffffffe (on supported platforms)
Is this intended?
Edit: oh, <=, ok never mind

#include "init.h"
#include "policy/fees.h"
#include "policy/policy.h"
#include "policy/rbf.h"
Copy link
Member

Choose a reason for hiding this comment

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

Do we want validation to depend on those policy headers? It seems the wrong way around.

Copy link
Contributor

Choose a reason for hiding this comment

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

ATMP does policy-based decisions. I think the real answer here is ATMP belongs outside of validation.cpp, but dear god thats a big refactor (I think).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't make the standards, I just follow them. (didn't think much about it because of the above two lines). :)

Copy link
Member

Choose a reason for hiding this comment

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

Well it would be wrong to rely on a policy constant if ATMP was a consensus critical function, but you're right.

@TheBlueMatt
Copy link
Contributor

utACK 095b917

@laanwj
Copy link
Member

laanwj commented Jul 26, 2017

utACK 095b917

@laanwj laanwj merged commit 095b917 into bitcoin:master Jul 26, 2017
laanwj added a commit that referenced this pull request Jul 26, 2017
…otocol constants.

095b917 Avoid using sizes on non-fixed-width types to derive protocol constants. (Gregory Maxwell)

Pull request description:

  Thanks to awemany for pointing this out.

  This replaces #10172 which appears to be abandoned, but uses the constants as requested on that PR.

Tree-SHA512: 032c0d75b3aaf807a7d0c7fb8ff5515acc45ad58bd00fe81413f900fe02bad900534a970403b9bb568e132c9eddea6043e958daf625e8acc84375bd41ee2e2ef
laanwj added a commit that referenced this pull request Aug 14, 2017
Update release notes from wiki, and fill in authors list from git.

Additional credits:

- Awemany (for #10854)
- Gregory Maxwell (release notes writing)
- John Newbery (release notes writing)
- Kibbled Jive Elk Zoo (for #10177 (comment))
- Luke Dashjr (release notes writing)
- Marco Falke (release notes writing)
- Pieter Wuille (release notes writing)
- Rusty Russell (release notes writing)
- tintinweb (for early-announcing miniupnp CVE-2017-8798, forgot this for 0.14.2)

Tree-SHA512: 8024eb761fcac4bb7f16ba3a9db376508f1f1bcf8a89cfb5e2928ad384675d3e912cada6ffef7d5aac181a965ebb8b823f6a63d9e976c1be753ec8eb9a8b9ef5
codablock pushed a commit to codablock/dash that referenced this pull request Sep 23, 2019
…rive protocol constants.

095b917 Avoid using sizes on non-fixed-width types to derive protocol constants. (Gregory Maxwell)

Pull request description:

  Thanks to awemany for pointing this out.

  This replaces bitcoin#10172 which appears to be abandoned, but uses the constants as requested on that PR.

Tree-SHA512: 032c0d75b3aaf807a7d0c7fb8ff5515acc45ad58bd00fe81413f900fe02bad900534a970403b9bb568e132c9eddea6043e958daf625e8acc84375bd41ee2e2ef
UdjinM6 added a commit to dashpay/dash that referenced this pull request Sep 24, 2019
Backport bitcoin#10854: Avoid using sizes on non-fixed-width types to derive protocol constants
@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.

5 participants