getreceivedbyaddress
and getreceivedbylabel
into a single function GetReceived
. This reduces repeated code and makes it similar to listreceivedbyaddress
and listreceivedbylabel
, which use the function ListReceived
. It will also make the change in #14707 simpler and easier to review.