You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rbf.h 974B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2016 The Starwels developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef STARWELS_POLICY_RBF_H
  5. #define STARWELS_POLICY_RBF_H
  6. #include "txmempool.h"
  7. static const uint32_t MAX_BIP125_RBF_SEQUENCE = 0xfffffffd;
  8. enum RBFTransactionState {
  9. RBF_TRANSACTIONSTATE_UNKNOWN,
  10. RBF_TRANSACTIONSTATE_REPLACEABLE_BIP125,
  11. RBF_TRANSACTIONSTATE_FINAL
  12. };
  13. // Check whether the sequence numbers on this transaction are signaling
  14. // opt-in to replace-by-fee, according to BIP 125
  15. bool SignalsOptInRBF(const CTransaction &tx);
  16. // Determine whether an in-mempool transaction is signaling opt-in to RBF
  17. // according to BIP 125
  18. // This involves checking sequence numbers of the transaction, as well
  19. // as the sequence numbers of all in-mempool ancestors.
  20. RBFTransactionState IsRBFOptIn(const CTransaction &tx, CTxMemPool &pool);
  21. #endif // STARWELS_POLICY_RBF_H