This can put a lot of pressure on the database when someone with a large account is doing a lot of multikeysend requests.
We could move the CheckPaymentAllowed check one level up, into both the KeySend and MultiKeySend controller methods. For the MultiKeysend, we can create a "synthetic" LNPayReq object with the amount being the total amount in the multikeysend request. Like this we can decrease the load on the database significantly.
Currently, we do a CheckPaymentAllowed for every split in the multikeysend.
This can put a lot of pressure on the database when someone with a large account is doing a lot of multikeysend requests. We could move the CheckPaymentAllowed check one level up, into both the KeySend and MultiKeySend controller methods. For the MultiKeysend, we can create a "synthetic" LNPayReq object with the amount being the total amount in the multikeysend request. Like this we can decrease the load on the database significantly.