aboutsummaryrefslogtreecommitdiff
path: root/src/util/rbf.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-04-02 17:03:37 -0400
committerJohn Newbery <john@johnnewbery.com>2019-04-09 17:53:08 -0400
commit91a25d1e711bfc0617027eee18b9777ff368d6b9 (patch)
treeaf7b5dbb366b9f9aac68ecf668f330d180bc31f4 /src/util/rbf.h
parent99517866b62c261f990e1f897502855afc12f2a7 (diff)
downloadbitcoin-91a25d1e711bfc0617027eee18b9777ff368d6b9.tar.xz
[build] Add several util units
Adds the following util units and adds them to libbitcoin_util: - `util/url.cpp` takes `urlDecode` from `httpserver.cpp` - `util/error.cpp` takes `TransactionErrorString` from `node/transaction.cpp` and `AmountHighWarn` and `AmountErrMsg` from `ui_interface.cpp` - `util/fees.cpp` takes `StringForFeeReason` and `FeeModeFromString` from `policy/fees.cpp` - `util/rbf.cpp` takes `SignalsOptInRBF` from `policy/rbf.cpp` - 'util/validation.cpp` takes `FormatStateMessage` and `strMessageMagic` from 'validation.cpp`
Diffstat (limited to 'src/util/rbf.h')
-rw-r--r--src/util/rbf.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/util/rbf.h b/src/util/rbf.h
new file mode 100644
index 0000000000..d3ef110628
--- /dev/null
+++ b/src/util/rbf.h
@@ -0,0 +1,18 @@
+// Copyright (c) 2016-2018 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_UTIL_RBF_H
+#define BITCOIN_UTIL_RBF_H
+
+#include <cstdint>
+
+class CTransaction;
+
+static const uint32_t MAX_BIP125_RBF_SEQUENCE = 0xfffffffd;
+
+// Check whether the sequence numbers on this transaction are signaling
+// opt-in to replace-by-fee, according to BIP 125
+bool SignalsOptInRBF(const CTransaction &tx);
+
+#endif // BITCOIN_UTIL_RBF_H