From fa182a8794cbf9be1aa91d1d75e65bc7800156bc Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 11 May 2020 09:59:32 -0400 Subject: [PATCH] rpcwallet: Replace boost::optional::emplace with simple assignment of T{} Optional::emplace() was only added in boost 1.56, see https://github.com/boostorg/optional/commit/2e583aaf30964afd66c1284aa71d0d8b42fa440d To simply work around https://github.com/bitcoin/bitcoin/issues/18943, replace it with assignment of T{} --- src/wallet/rpcwallet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index dda00f1fe..fcf78bd4b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1557,8 +1557,8 @@ static UniValue listsinceblock(const JSONRPCRequest& request) uint256 blockId; if (!request.params[0].isNull() && !request.params[0].get_str().empty()) { blockId = ParseHashV(request.params[0], "blockhash"); - height.emplace(); - altheight.emplace(); + height = int{}; + altheight = int{}; if (!pwallet->chain().findCommonAncestor(blockId, pwallet->GetLastBlockHash(), /* ancestor out */ FoundBlock().height(*height), /* blockId out */ FoundBlock().height(*altheight))) { throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found"); }