diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-02-12 17:03:43 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-02-12 17:03:46 +0100 |
commit | 80d1f2e48364f05b2cdf44239b3a1faa0277e58e (patch) | |
tree | 39fc8fe0304591eebc89b30b6f53cd328983962f /src/main.h | |
parent | 621940e04090919f87d452723cfddd427e561812 (diff) | |
parent | b043c4b746c8199ce948aa5e8b186e0d1a61ad68 (diff) |
Merge #7184: Implement SequenceLocks functions for BIP 68
b043c4b fix sdaftuar's nits again (Alex Morcos)
a51c79b Bug fix to RPC test (Alex Morcos)
da6ad5f Add RPC test exercising BIP68 (mempool only) (Suhas Daftuar)
c6c2f0f Implement SequenceLocks functions (Alex Morcos)
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h index 4061daba3b..b6f61ca991 100644 --- a/src/main.h +++ b/src/main.h @@ -365,7 +365,22 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime); */ bool CheckFinalTx(const CTransaction &tx, int flags = -1); -/** +/** + * Check if transaction is final per BIP 68 sequence numbers and can be included in a block. + * Consensus critical. Takes as input a list of heights at which tx's inputs (in order) confirmed. + */ +bool SequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block); + +/** + * Check if transaction will be BIP 68 final in the next block to be created. + * + * Simulates calling SequenceLocks() with data from the tip of the current active chain. + * + * See consensus/consensus.h for flag definitions. + */ +bool CheckSequenceLocks(const CTransaction &tx, int flags); + +/** * Closure representing one script verification * Note that this stores references to the spending transaction */ |