diff options
author | Andrew Chow <github@achow101.com> | 2023-09-05 12:03:46 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-09-12 12:14:31 -0400 |
commit | 8dd067088d41f021b357d7db5fa5f0a9f61edddc (patch) | |
tree | 6b2adb2b5c2e5cae92f032d910e7294d55d716a4 /src/test/script_standard_tests.cpp | |
parent | 238d29aff9b43234e340a9cf17742b2be5d1e97d (diff) |
Make WitnessUnknown members private
Make sure that nothing else can change WitnessUnknown's data members by
making them private. Also change the program to use a vector rather than
C-style array.
Diffstat (limited to 'src/test/script_standard_tests.cpp')
-rw-r--r-- | src/test/script_standard_tests.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/test/script_standard_tests.cpp b/src/test/script_standard_tests.cpp index 1a205728d6..c3d5990e01 100644 --- a/src/test/script_standard_tests.cpp +++ b/src/test/script_standard_tests.cpp @@ -249,10 +249,7 @@ BOOST_AUTO_TEST_CASE(script_standard_ExtractDestination) s.clear(); s << OP_1 << ToByteVector(pubkey); BOOST_CHECK(ExtractDestination(s, address)); - WitnessUnknown unk; - unk.length = 33; - unk.version = 1; - std::copy(pubkey.begin(), pubkey.end(), unk.program); + WitnessUnknown unk{1, ToByteVector(pubkey)}; BOOST_CHECK(std::get<WitnessUnknown>(address) == unk); } |