mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user