Skip to content

Commit

Permalink
Fix the build on some platforms by using an explicit cast for Univalu…
Browse files Browse the repository at this point in the history
…e type

Summary: It appears that std::vector::size_type is not implicitely convertible to uint64_t or int64_t on on platforms , so cast it explicitely.

Test Plan:
  ./contrib/teamcity/build-configurations.py build-linux32
  ./contrib/teamcity/build-configurations.py build-native-osx

Reviewers: #bitcoin_abc, tyler-smith

Reviewed By: #bitcoin_abc, tyler-smith

Subscribers: tyler-smith

Differential Revision: https://reviews.bitcoinabc.org/D11244
  • Loading branch information
Fabcien committed Mar 22, 2022
1 parent 057a204 commit 7799192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/avalanche.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ static RPCHelpMan decodeavalanchedelegation() {
result.pushKV("proofid", delegation.getProofId().ToString());

auto levels = delegation.getLevels();
result.pushKV("depth", levels.size());
result.pushKV("depth", uint64_t(levels.size()));

UniValue levelsArray(UniValue::VARR);
for (auto &level : levels) {
Expand Down

0 comments on commit 7799192

Please sign in to comment.