mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 11:43:26 -03:00
91a25d1e71
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`
22 lines
733 B
C
22 lines
733 B
C
// 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_POLICY_RBF_H
|
|
#define BITCOIN_POLICY_RBF_H
|
|
|
|
#include <txmempool.h>
|
|
|
|
enum class RBFTransactionState {
|
|
UNKNOWN,
|
|
REPLACEABLE_BIP125,
|
|
FINAL
|
|
};
|
|
|
|
// Determine whether an in-mempool transaction is signaling opt-in to RBF
|
|
// according to BIP 125
|
|
// This involves checking sequence numbers of the transaction, as well
|
|
// as the sequence numbers of all in-mempool ancestors.
|
|
RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs);
|
|
|
|
#endif // BITCOIN_POLICY_RBF_H
|