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
markblundebergPushed on Jun 25 2019, 03:06
Reviewer
Restricted Project
Differential Revision
D3399: unsigned int -> size_t in merkleblock-related code
Parents
rABC1ae9292bfca3: Remove unknown version warning from UpdateTip
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rABC37da7fbc098c: unsigned int -> size_t in merkleblock-related code (authored by Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>).Jun 25 2019, 03:06