mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
test: Correct ineffectual WithOrVersion from transactions_tests
WithOrVersion uses | to combine the versions, and | with 0 is a no-op. Instead I run it with PROTOCOL_VERSION and 0 separately, as the original code only tested PROTOCOL_VERSION but apparently only intended to test version 0. Introduced inab48c5e721Last updated81e3228fcb
This commit is contained in:
parent
ed12fd83ca
commit
75778a0724
2 changed files with 4 additions and 10 deletions
|
|
@ -414,7 +414,8 @@ static void ReplaceRedeemScript(CScript& script, const CScript& redeemScript)
|
|||
script = PushAll(stack);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_big_witness_transaction) {
|
||||
BOOST_AUTO_TEST_CASE(test_big_witness_transaction)
|
||||
{
|
||||
CMutableTransaction mtx;
|
||||
mtx.nVersion = 1;
|
||||
|
||||
|
|
@ -456,9 +457,8 @@ BOOST_AUTO_TEST_CASE(test_big_witness_transaction) {
|
|||
}
|
||||
|
||||
CDataStream ssout(SER_NETWORK, PROTOCOL_VERSION);
|
||||
auto vstream = WithOrVersion(&ssout, 0);
|
||||
vstream << mtx;
|
||||
CTransaction tx(deserialize, vstream);
|
||||
ssout << mtx;
|
||||
CTransaction tx(deserialize, ssout);
|
||||
|
||||
// check all inputs concurrently, with the cache
|
||||
PrecomputedTransactionData txdata(tx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue