aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-tx.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-11-07 11:14:45 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-11-07 11:15:22 -0500
commite8d490f27e691d8e5f6910f878c4f1c3c6ad788d (patch)
tree633ea5b30e9d79fcd7bc129c80b6eb82d4a05baa /src/bitcoin-tx.cpp
parent66c70249f9e696b62eeddf1943a7355ef7bb7409 (diff)
parent535203075e50eedef8f00852328f81f440233278 (diff)
downloadbitcoin-e8d490f27e691d8e5f6910f878c4f1c3c6ad788d.tar.xz
Merge #14636: Avoid using numeric_limits for sequence numbers and lock times
535203075e Avoid using numeric_limits for sequence numbers and lock times (Russell Yanofsky) bafb921507 Remove duplicated code (Hennadii Stepanov) e4dc39b3bc Replace platform dependent type with proper const (Hennadii Stepanov) Pull request description: Switches to named constants, because numeric_limits calls can be harder to read and less portable. Change was suggested by jamesob in https://github.com/bitcoin/bitcoin/pull/10973#discussion_r213473620 There are no changes in behavior except on some platforms we don't support (ILP64, IP16L32, I16LP32), where `SignalsOptInRBF` and `MutateTxAddInput` functions would now work correctly. Tree-SHA512: 3f5c6393c260551f65a0edfba55ef7eb3625232eec8d85b1457f26e144aa0b90c7ef5f44b2fd2f7d9be3c3bcb301030a9f5473c21b3bac566cc59b8c8780737c
Diffstat (limited to 'src/bitcoin-tx.cpp')
-rw-r--r--src/bitcoin-tx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index bdc064b9fb..bc91ca3641 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -255,7 +255,7 @@ static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInpu
throw std::runtime_error("invalid TX input vout '" + strVout + "'");
// extract the optional sequence number
- uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max();
+ uint32_t nSequenceIn = CTxIn::SEQUENCE_FINAL;
if (vStrInputParts.size() > 2)
nSequenceIn = std::stoul(vStrInputParts[2]);