HomePhabricator

unsigned int -> size_t in merkleblock-related code

Description

unsigned int -> size_t in merkleblock-related code

Summary:
A lot of code was using unsigned int for the type used in list
iterators, indices, etc..
This switches to size_t. Note that there is one exception, nTransactions,
which has been explicitly switched to a 32-bit integer as that is what the
serialization protocol demands. If transactions with 4 billion transactions
ever happen, a bit more work will be needed. ;-) (In reality, this part of
the code will need to be rewritten and optimized quite a bit for that
eventuality, if not discarded altogether.)

Also, introduces braces in multiple places (code style).

Test Plan: make check

Reviewers: deadalnix, jasonbcox, Fabien, #bitcoin_abc, nakihito

Reviewed By: deadalnix, #bitcoin_abc, nakihito

Differential Revision: https://reviews.bitcoinabc.org/D3399

Details

Provenance
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Authored on Jun 23 2019, 14:33
FabienPushed on Jun 25 2019, 09:26
Reviewer
Restricted Project
Differential Revision
D3399: unsigned int -> size_t in merkleblock-related code
Parents
rSTAGING1ae9292bfca3: Remove unknown version warning from UpdateTip
Branches
Unknown
Tags
Unknown