From b3c44c947fe7ffdc60033e48d75da82129ab8cef Mon Sep 17 00:00:00 2001 From: Karel Bilek Date: Sun, 24 Sep 2017 23:35:24 +0200 Subject: [PATCH] Pushing boolean value to univalue correctly --- include/univalue.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/univalue.h b/include/univalue.h index 4fd2223b302e7a..c15b2f051eb86f 100644 --- a/include/univalue.h +++ b/include/univalue.h @@ -130,6 +130,10 @@ class UniValue { UniValue tmpVal(val_); return pushKV(key, tmpVal); } + bool pushKV(const std::string& key, bool val_) { + UniValue tmpVal((bool)val_); + return pushKV(key, tmpVal); + } bool pushKV(const std::string& key, int val_) { UniValue tmpVal((int64_t)val_); return pushKV(key, tmpVal);