From 779919230ef7257774d58e4bfac845ae9fdac8fb Mon Sep 17 00:00:00 2001 From: Fabien Date: Tue, 22 Mar 2022 21:08:26 +0100 Subject: [PATCH] Fix the build on some platforms by using an explicit cast for Univalue 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 --- src/rpc/avalanche.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/avalanche.cpp b/src/rpc/avalanche.cpp index 8372a4d8f0..85a1e70d27 100644 --- a/src/rpc/avalanche.cpp +++ b/src/rpc/avalanche.cpp @@ -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) {