You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #18946: rpcwallet: Replace boost::optional<T>::emplace with simple assignment of T{}
fa1f840 rpcwallet: Replace pwallet-> with wallet. (MarcoFalke)
fa182a8 rpcwallet: Replace boost::optional<T>::emplace with simple assignment of T{} (MarcoFalke)
Pull request description:
Closes #18943
ACKs for top commit:
laanwj:
ACK fa1f840
ryanofsky:
Code review ACK fa1f840 and thanks for using a standalone commit for the fix
promag:
Code review ACK fa1f840.
hebasto:
ACK fa1f840, tested on Linux Mint 19.3.
Tree-SHA512: 0838485d1f93f737ce5bf12740669dcafeebb78dbc3fa15dbcc511edce64bf024f60f0497a04149a1e799d893d57b0c9ffe442020c1b9cfc3c69db731f50e712
// Make sure the results are valid at least up to the most recent block
1546
1546
// the user could have gotten from another RPC command prior to now
1547
-
pwallet->BlockUntilSyncedToCurrentChain();
1547
+
wallet.BlockUntilSyncedToCurrentChain();
1548
1548
1549
-
LOCK(pwallet->cs_wallet);
1549
+
LOCK(wallet.cs_wallet);
1550
1550
1551
1551
// The way the 'height' is initialized is just a workaround for the gcc bug #47679 since version 4.6.0.
1552
1552
Optional<int> height = MakeOptional(false, int()); // Height of the specified block or the common ancestor, if the block provided was in a deactivated chain.
if (!pwallet->chain().findCommonAncestor(blockId, pwallet->GetLastBlockHash(), /* ancestor out */FoundBlock().height(*height), /* blockId out */FoundBlock().height(*altheight))) {
1560
+
height = int{};
1561
+
altheight = int{};
1562
+
if (!wallet.chain().findCommonAncestor(blockId, wallet.GetLastBlockHash(), /* ancestor out */FoundBlock().height(*height), /* blockId out */FoundBlock().height(*altheight))) {
1563
1563
throwJSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
0 commit comments