mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 18:49:30 +01:00
rpcwallet: Replace boost::optional<T>::emplace with simple assignment of T{}
Optional::emplace() was only added in boost 1.56, see
2e583aaf30
To simply work around https://github.com/bitcoin/bitcoin/issues/18943,
replace it with assignment of T{}
This commit is contained in:
parent
88d8b4e182
commit
fa182a8794
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user