reusing code of bridge calls in condenser_api
Compare changes
Files
13@@ -270,7 +270,7 @@ $function$
@@ -270,7 +270,7 @@ $function$
CREATE FUNCTION bridge_get_ranked_post_by_payout( in _author VARCHAR, in _permlink VARCHAR, in _limit SMALLINT )
@@ -328,7 +328,8 @@ BEGIN
@@ -328,7 +328,8 @@ BEGIN
WHERE hp1.counter_deleted = 0 AND NOT hp1.is_paidout AND hp1.payout_at BETWEEN __head_block_time + interval '12 hours' AND __head_block_time + interval '36 hours'
AND ( __post_id = 0 OR ( hp1.payout + hp1.pending_payout ) < __payout_limit OR ( ( hp1.payout + hp1.pending_payout ) = __payout_limit AND hp1.id < __post_id ) )