Skip to content

Commit 3212d10

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#23829: refactor: use braced init for integer literals instead of c style casts
f2fc03e refactor: use braced init for integer constants instead of c style casts (Pasta) Pull request description: See bitcoin/bitcoin#23810 for more context. This is broken out from that PR, as it is less breaking, and should be trivial to review and merge. EDIT: Long term, the intention is to remove all C-style casts, as they can dangerously introduce reinterpret_casts. This is one step which removes a number of trivially removable C-style casts ACKs for top commit: aureleoules: ACK f2fc03e Tree-SHA512: 2fd11b92c9147e3f970ec3e130e3b3dce70e707ff02950a8c697d4b111ddcbbfa16915393db20cfc8f384bc76f13241c9b994a187987fcecd16a61f8cc0af14c
2 parents 61f3515 + f2fc03e commit 3212d10

23 files changed

+47
-47
lines changed

src/bench/coin_selection.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ static CAmount make_hard_case(int utxos, std::vector<OutputGroup>& utxo_pool)
9999
utxo_pool.clear();
100100
CAmount target = 0;
101101
for (int i = 0; i < utxos; ++i) {
102-
target += (CAmount)1 << (utxos+i);
103-
add_coin((CAmount)1 << (utxos+i), 2*i, utxo_pool);
104-
add_coin(((CAmount)1 << (utxos+i)) + ((CAmount)1 << (utxos-1-i)), 2*i + 1, utxo_pool);
102+
target += CAmount{1} << (utxos+i);
103+
add_coin(CAmount{1} << (utxos+i), 2*i, utxo_pool);
104+
add_coin((CAmount{1} << (utxos+i)) + (CAmount{1} << (utxos-1-i)), 2*i + 1, utxo_pool);
105105
}
106106
return target;
107107
}

src/crypto/siphash.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ uint64_t SipHashUint256(uint64_t k0, uint64_t k1, const uint256& val)
119119
SIPROUND;
120120
SIPROUND;
121121
v0 ^= d;
122-
v3 ^= ((uint64_t)4) << 59;
122+
v3 ^= (uint64_t{4}) << 59;
123123
SIPROUND;
124124
SIPROUND;
125-
v0 ^= ((uint64_t)4) << 59;
125+
v0 ^= (uint64_t{4}) << 59;
126126
v2 ^= 0xFF;
127127
SIPROUND;
128128
SIPROUND;
@@ -159,7 +159,7 @@ uint64_t SipHashUint256Extra(uint64_t k0, uint64_t k1, const uint256& val, uint3
159159
SIPROUND;
160160
SIPROUND;
161161
v0 ^= d;
162-
d = (((uint64_t)36) << 56) | extra;
162+
d = ((uint64_t{36}) << 56) | extra;
163163
v3 ^= d;
164164
SIPROUND;
165165
SIPROUND;

src/cuckoocache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ class cache
344344
collection_flags.setup(size);
345345
epoch_flags.resize(size);
346346
// Set to 45% as described above
347-
epoch_size = std::max((uint32_t)1, (45 * size) / 100);
347+
epoch_size = std::max(uint32_t{1}, (45 * size) / 100);
348348
// Initially set to wait for a whole epoch
349349
epoch_heuristic_counter = epoch_size;
350350
return size;

src/random.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class FastRandomContext
200200
return rand64() >> (64 - bits);
201201
} else {
202202
if (bitbuf_size < bits) FillBitBuffer();
203-
uint64_t ret = bitbuf & (~(uint64_t)0 >> (64 - bits));
203+
uint64_t ret = bitbuf & (~uint64_t{0} >> (64 - bits));
204204
bitbuf >>= bits;
205205
bitbuf_size -= bits;
206206
return ret;

src/script/interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ class CTransactionSignatureSerializer
13031303
// Serialize the nSequence
13041304
if (nInput != nIn && (fHashSingle || fHashNone))
13051305
// let the others update at will
1306-
::Serialize(s, (int)0);
1306+
::Serialize(s, int{0});
13071307
else
13081308
::Serialize(s, txTo.vin[nInput].nSequence);
13091309
}

src/test/checkqueue_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,15 @@ static void Correct_Queue_range(std::vector<size_t> range)
194194
BOOST_AUTO_TEST_CASE(test_CheckQueue_Correct_Zero)
195195
{
196196
std::vector<size_t> range;
197-
range.push_back((size_t)0);
197+
range.push_back(size_t{0});
198198
Correct_Queue_range(range);
199199
}
200200
/** Test that 1 check is correct
201201
*/
202202
BOOST_AUTO_TEST_CASE(test_CheckQueue_Correct_One)
203203
{
204204
std::vector<size_t> range;
205-
range.push_back((size_t)1);
205+
range.push_back(size_t{1});
206206
Correct_Queue_range(range);
207207
}
208208
/** Test that MAX check is correct

src/test/crypto_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,14 +723,14 @@ BOOST_AUTO_TEST_CASE(countbits_tests)
723723
// Check handling of zero.
724724
BOOST_CHECK_EQUAL(CountBits(0), 0U);
725725
} else if (i < 10) {
726-
for (uint64_t j = (uint64_t)1 << (i - 1); (j >> i) == 0; ++j) {
726+
for (uint64_t j = uint64_t{1} << (i - 1); (j >> i) == 0; ++j) {
727727
// Exhaustively test up to 10 bits
728728
BOOST_CHECK_EQUAL(CountBits(j), i);
729729
}
730730
} else {
731731
for (int k = 0; k < 1000; k++) {
732732
// Randomly test 1000 samples of each length above 10 bits.
733-
uint64_t j = ((uint64_t)1) << (i - 1) | ctx.randbits(i - 1);
733+
uint64_t j = (uint64_t{1}) << (i - 1) | ctx.randbits(i - 1);
734734
BOOST_CHECK_EQUAL(CountBits(j), i);
735735
}
736736
}

src/test/fuzz/p2p_transport_serialization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void initialize_p2p_transport_serialization()
2424
FUZZ_TARGET_INIT(p2p_transport_serialization, initialize_p2p_transport_serialization)
2525
{
2626
// Construct deserializer, with a dummy NodeId
27-
V1TransportDeserializer deserializer{Params(), (NodeId)0, SER_NETWORK, INIT_PROTO_VERSION};
27+
V1TransportDeserializer deserializer{Params(), NodeId{0}, SER_NETWORK, INIT_PROTO_VERSION};
2828
V1TransportSerializer serializer{};
2929
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
3030

src/test/fuzz/versionbits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class TestConditionChecker : public AbstractThresholdConditionChecker
5555

5656
bool Condition(int32_t version) const
5757
{
58-
uint32_t mask = ((uint32_t)1) << m_bit;
58+
uint32_t mask = (uint32_t{1}) << m_bit;
5959
return (((version & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (version & mask) != 0);
6060
}
6161

src/test/merkle_tests.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot
5050
// For each of the lower bits in count that are 0, do 1 step. Each
5151
// corresponds to an inner value that existed before processing the
5252
// current leaf, and each needs a hash to combine it.
53-
for (level = 0; !(count & (((uint32_t)1) << level)); level++) {
53+
for (level = 0; !(count & ((uint32_t{1}) << level)); level++) {
5454
if (pbranch) {
5555
if (matchh) {
5656
pbranch->push_back(inner[level]);
@@ -74,12 +74,12 @@ static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot
7474
int level = 0;
7575
// As long as bit number level in count is zero, skip it. It means there
7676
// is nothing left at this level.
77-
while (!(count & (((uint32_t)1) << level))) {
77+
while (!(count & ((uint32_t{1}) << level))) {
7878
level++;
7979
}
8080
uint256 h = inner[level];
8181
bool matchh = matchlevel == level;
82-
while (count != (((uint32_t)1) << level)) {
82+
while (count != ((uint32_t{1}) << level)) {
8383
// If we reach this point, h is an inner value that is not the top.
8484
// We combine it with itself (Bitcoin's special rule for odd levels in
8585
// the tree) to produce a higher level one.
@@ -89,10 +89,10 @@ static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot
8989
CHash256().Write(h).Write(h).Finalize(h);
9090
// Increment count to the value it would have if two entries at this
9191
// level had existed.
92-
count += (((uint32_t)1) << level);
92+
count += ((uint32_t{1}) << level);
9393
level++;
9494
// And propagate the result upwards accordingly.
95-
while (!(count & (((uint32_t)1) << level))) {
95+
while (!(count & ((uint32_t{1}) << level))) {
9696
if (pbranch) {
9797
if (matchh) {
9898
pbranch->push_back(inner[level]);

src/test/random_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(fastrandom_randbits)
9494
for (int j = 0; j < 1000; ++j) {
9595
uint64_t rangebits = ctx1.randbits(bits);
9696
BOOST_CHECK_EQUAL(rangebits >> bits, 0U);
97-
uint64_t range = ((uint64_t)1) << bits | rangebits;
97+
uint64_t range = (uint64_t{1}) << bits | rangebits;
9898
uint64_t rand = ctx2.randrange(range);
9999
BOOST_CHECK(rand < range);
100100
}

src/test/serialize_tests.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,17 @@ BOOST_AUTO_TEST_CASE(varints_bitpatterns)
123123
CDataStream ss(SER_DISK, 0);
124124
ss << VARINT_MODE(0, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "00"); ss.clear();
125125
ss << VARINT_MODE(0x7f, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "7f"); ss.clear();
126-
ss << VARINT_MODE((int8_t)0x7f, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "7f"); ss.clear();
126+
ss << VARINT_MODE(int8_t{0x7f}, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "7f"); ss.clear();
127127
ss << VARINT_MODE(0x80, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "8000"); ss.clear();
128-
ss << VARINT((uint8_t)0x80); BOOST_CHECK_EQUAL(HexStr(ss), "8000"); ss.clear();
128+
ss << VARINT(uint8_t{0x80}); BOOST_CHECK_EQUAL(HexStr(ss), "8000"); ss.clear();
129129
ss << VARINT_MODE(0x1234, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "a334"); ss.clear();
130-
ss << VARINT_MODE((int16_t)0x1234, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "a334"); ss.clear();
130+
ss << VARINT_MODE(int16_t{0x1234}, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "a334"); ss.clear();
131131
ss << VARINT_MODE(0xffff, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "82fe7f"); ss.clear();
132-
ss << VARINT((uint16_t)0xffff); BOOST_CHECK_EQUAL(HexStr(ss), "82fe7f"); ss.clear();
132+
ss << VARINT(uint16_t{0xffff}); BOOST_CHECK_EQUAL(HexStr(ss), "82fe7f"); ss.clear();
133133
ss << VARINT_MODE(0x123456, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "c7e756"); ss.clear();
134-
ss << VARINT_MODE((int32_t)0x123456, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "c7e756"); ss.clear();
134+
ss << VARINT_MODE(int32_t{0x123456}, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "c7e756"); ss.clear();
135135
ss << VARINT(0x80123456U); BOOST_CHECK_EQUAL(HexStr(ss), "86ffc7e756"); ss.clear();
136-
ss << VARINT((uint32_t)0x80123456U); BOOST_CHECK_EQUAL(HexStr(ss), "86ffc7e756"); ss.clear();
136+
ss << VARINT(uint32_t{0x80123456U}); BOOST_CHECK_EQUAL(HexStr(ss), "86ffc7e756"); ss.clear();
137137
ss << VARINT(0xffffffff); BOOST_CHECK_EQUAL(HexStr(ss), "8efefefe7f"); ss.clear();
138138
ss << VARINT_MODE(0x7fffffffffffffffLL, VarIntMode::NONNEGATIVE_SIGNED); BOOST_CHECK_EQUAL(HexStr(ss), "fefefefefefefefe7f"); ss.clear();
139139
ss << VARINT(0xffffffffffffffffULL); BOOST_CHECK_EQUAL(HexStr(ss), "80fefefefefefefefe7f"); ss.clear();

src/test/streams_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ BOOST_AUTO_TEST_CASE(bitstream_reader_writer)
144144
CDataStream data_copy(data);
145145
uint32_t serialized_int1;
146146
data >> serialized_int1;
147-
BOOST_CHECK_EQUAL(serialized_int1, (uint32_t)0x7700C35A); // NOTE: Serialized as LE
147+
BOOST_CHECK_EQUAL(serialized_int1, uint32_t{0x7700C35A}); // NOTE: Serialized as LE
148148
uint16_t serialized_int2;
149149
data >> serialized_int2;
150-
BOOST_CHECK_EQUAL(serialized_int2, (uint16_t)0x1072); // NOTE: Serialized as LE
150+
BOOST_CHECK_EQUAL(serialized_int2, uint16_t{0x1072}); // NOTE: Serialized as LE
151151

152152
BitStreamReader<CDataStream> bit_reader(data_copy);
153153
BOOST_CHECK_EQUAL(bit_reader.Read(1), 0U);

src/test/util_tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,8 @@ BOOST_AUTO_TEST_CASE(test_ParseInt64)
810810
BOOST_CHECK(ParseInt64("01234", &n) && n == 1234LL); // no octal
811811
BOOST_CHECK(ParseInt64("2147483647", &n) && n == 2147483647LL);
812812
BOOST_CHECK(ParseInt64("-2147483648", &n) && n == -2147483648LL);
813-
BOOST_CHECK(ParseInt64("9223372036854775807", &n) && n == (int64_t)9223372036854775807);
814-
BOOST_CHECK(ParseInt64("-9223372036854775808", &n) && n == (int64_t)-9223372036854775807-1);
813+
BOOST_CHECK(ParseInt64("9223372036854775807", &n) && n == int64_t{9223372036854775807});
814+
BOOST_CHECK(ParseInt64("-9223372036854775808", &n) && n == int64_t{-9223372036854775807-1});
815815
BOOST_CHECK(ParseInt64("-1234", &n) && n == -1234LL);
816816
// Invalid values
817817
BOOST_CHECK(!ParseInt64("", &n));
@@ -907,8 +907,8 @@ BOOST_AUTO_TEST_CASE(test_ParseUInt32)
907907
BOOST_CHECK(ParseUInt32("1234", &n) && n == 1234);
908908
BOOST_CHECK(ParseUInt32("01234", &n) && n == 1234); // no octal
909909
BOOST_CHECK(ParseUInt32("2147483647", &n) && n == 2147483647);
910-
BOOST_CHECK(ParseUInt32("2147483648", &n) && n == (uint32_t)2147483648);
911-
BOOST_CHECK(ParseUInt32("4294967295", &n) && n == (uint32_t)4294967295);
910+
BOOST_CHECK(ParseUInt32("2147483648", &n) && n == uint32_t{2147483648});
911+
BOOST_CHECK(ParseUInt32("4294967295", &n) && n == uint32_t{4294967295});
912912
BOOST_CHECK(ParseUInt32("+1234", &n) && n == 1234);
913913
BOOST_CHECK(ParseUInt32("00000000000000001234", &n) && n == 1234);
914914
BOOST_CHECK(ParseUInt32("00000000000000000000", &n) && n == 0);

src/test/validation_chainstate_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE(validation_chainstate_resize_caches)
3232
COutPoint outp{txid, 0};
3333
newcoin.nHeight = 1;
3434
newcoin.out.nValue = InsecureRand32();
35-
newcoin.out.scriptPubKey.assign((uint32_t)56, 1);
35+
newcoin.out.scriptPubKey.assign(uint32_t{56}, 1);
3636
coins_view.AddCoin(outp, std::move(newcoin), false);
3737

3838
return outp;

src/test/validation_flush_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ BOOST_AUTO_TEST_CASE(getcoinscachesizestate)
3131
COutPoint outp{txid, 0};
3232
newcoin.nHeight = 1;
3333
newcoin.out.nValue = InsecureRand32();
34-
newcoin.out.scriptPubKey.assign((uint32_t)56, 1);
34+
newcoin.out.scriptPubKey.assign(uint32_t{56}, 1);
3535
coins_view.AddCoin(outp, std::move(newcoin), false);
3636

3737
return outp;

src/util/moneystr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ std::string FormatMoney(const CAmount n)
3434
str.erase(str.size()-nTrim, nTrim);
3535

3636
if (n < 0)
37-
str.insert((unsigned int)0, 1, '-');
37+
str.insert(uint32_t{0}, 1, '-');
3838
return str;
3939
}
4040

src/versionbits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class VersionBitsConditionChecker : public AbstractThresholdConditionChecker {
195195

196196
public:
197197
explicit VersionBitsConditionChecker(Consensus::DeploymentPos id_) : id(id_) {}
198-
uint32_t Mask(const Consensus::Params& params) const { return ((uint32_t)1) << params.vDeployments[id].bit; }
198+
uint32_t Mask(const Consensus::Params& params) const { return (uint32_t{1}) << params.vDeployments[id].bit; }
199199
};
200200

201201
} // namespace

src/wallet/bdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void BerkeleyEnvironment::Close()
100100
if (ret != 0)
101101
LogPrintf("BerkeleyEnvironment::Close: Error %d closing database environment: %s\n", ret, DbEnv::strerror(ret));
102102
if (!fMockDb)
103-
DbEnv((uint32_t)0).remove(strPath.c_str(), 0);
103+
DbEnv(uint32_t{0}).remove(strPath.c_str(), 0);
104104

105105
if (error_file) fclose(error_file);
106106

src/wallet/scriptpubkeyman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2123,7 +2123,7 @@ bool DescriptorScriptPubKeyMan::TopUp(unsigned int size)
21232123
if (size > 0) {
21242124
target_size = size;
21252125
} else {
2126-
target_size = std::max(gArgs.GetIntArg("-keypool", DEFAULT_KEYPOOL_SIZE), (int64_t) 1);
2126+
target_size = std::max(gArgs.GetIntArg("-keypool", DEFAULT_KEYPOOL_SIZE), int64_t{1});
21272127
}
21282128

21292129
// Calculate the new range_end

src/wallet/spend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ util::Result<SelectionResult> AutomaticCoinSelection(const CWallet& wallet, Coin
667667
// possible) if we cannot fund the transaction otherwise.
668668
if (wallet.m_spend_zero_conf_change) {
669669
ordered_filters.push_back({CoinEligibilityFilter(0, 1, 2)});
670-
ordered_filters.push_back({CoinEligibilityFilter(0, 1, std::min((size_t)4, max_ancestors/3), std::min((size_t)4, max_descendants/3))});
670+
ordered_filters.push_back({CoinEligibilityFilter(0, 1, std::min(size_t{4}, max_ancestors/3), std::min(size_t{4}, max_descendants/3))});
671671
ordered_filters.push_back({CoinEligibilityFilter(0, 1, max_ancestors/2, max_descendants/2)});
672672
// If partial groups are allowed, relax the requirement of spending OutputGroups (groups
673673
// of UTXOs sent to the same address, which are obviously controlled by a single wallet)

src/wallet/test/coinselector_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ static CAmount make_hard_case(int utxos, std::vector<COutput>& utxo_pool)
121121
utxo_pool.clear();
122122
CAmount target = 0;
123123
for (int i = 0; i < utxos; ++i) {
124-
target += (CAmount)1 << (utxos+i);
125-
add_coin((CAmount)1 << (utxos+i), 2*i, utxo_pool);
126-
add_coin(((CAmount)1 << (utxos+i)) + ((CAmount)1 << (utxos-1-i)), 2*i + 1, utxo_pool);
124+
target += CAmount{1} << (utxos+i);
125+
add_coin(CAmount{1} << (utxos+i), 2*i, utxo_pool);
126+
add_coin((CAmount{1} << (utxos+i)) + (CAmount{1} << (utxos-1-i)), 2*i + 1, utxo_pool);
127127
}
128128
return target;
129129
}

src/wallet/test/wallet_tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,10 @@ BOOST_FIXTURE_TEST_CASE(wallet_descriptor_test, BasicTestingSetup)
736736
std::vector<unsigned char> malformed_record;
737737
CVectorWriter vw(0, 0, malformed_record, 0);
738738
vw << std::string("notadescriptor");
739-
vw << (uint64_t)0;
740-
vw << (int32_t)0;
741-
vw << (int32_t)0;
742-
vw << (int32_t)1;
739+
vw << uint64_t{0};
740+
vw << int32_t{0};
741+
vw << int32_t{0};
742+
vw << int32_t{1};
743743

744744
SpanReader vr{0, 0, malformed_record};
745745
WalletDescriptor w_desc;

0 commit comments

Comments
 (0)