throwJSONRPCError(RPC_INVALID_PARAMETER,strprintf("Fee %s is greater than the sum of outputs %s",FormatMoney(nFee),FormatMoney(nTotalOut)));
}
// This allows amount=0 (and all amount < nDefaultFee) transactions to use the default network fee
// or anything less than nDefaultFee instead of being forced to use a custom fee and leak metadata
if(nTotalOut<nDefaultFee){
if(nFee>nDefaultFee){
throwJSONRPCError(RPC_INVALID_PARAMETER,strprintf("Small transaction amount %s has fee %s that is greater than the default fee %s",FormatMoney(nTotalOut),FormatMoney(nFee),FormatMoney(nDefaultFee)));
}
}else{
// Check that the user specified fee is sane.
if(nFee>nTotalOut){
throwJSONRPCError(RPC_INVALID_PARAMETER,strprintf("Fee %s is greater than the sum of outputs %s",FormatMoney(nFee),FormatMoney(nTotalOut)));
}
}
}
// Use input parameters as the optional context info to be returned by z_getoperationstatus and z_getoperationresult.