mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-08 14:47:31 +02:00
kernel: Add API function for getting a tx input's nSequence
This commit is contained in:
@@ -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()};
|
||||
|
||||
Reference in New Issue
Block a user