kernel: Add API function for getting a tx input's nSequence

This commit is contained in:
Sebastian Falbesoner
2026-03-18 04:15:30 +01:00
parent 6b64b181d5
commit 9f28120a5b
4 changed files with 21 additions and 0 deletions

View File

@@ -404,6 +404,8 @@ BOOST_AUTO_TEST_CASE(btck_transaction_tests)
BOOST_CHECK_EQUAL(tx.GetLocktime(), 510826);
auto broken_tx_data{std::span<std::byte>{tx_data.begin(), tx_data.begin() + 10}};
BOOST_CHECK_THROW(Transaction{broken_tx_data}, std::runtime_error);
auto input{tx.GetInput(0)};
BOOST_CHECK_EQUAL(input.GetSequence(), 0xfffffffe);
auto output{tx.GetOutput(tx.CountOutputs() - 1)};
BOOST_CHECK_EQUAL(output.Amount(), 42130042);
auto script_pubkey{output.GetScriptPubkey()};