From c663f1f62b130eab841a098f0f8af088721feb3d Mon Sep 17 00:00:00 2001 From: Mark Travis Date: Sat, 20 Nov 2021 15:51:32 -0800 Subject: [PATCH] Make tx() function against a read-only postgres instance. --- src/ripple/core/Pg.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ripple/core/Pg.cpp b/src/ripple/core/Pg.cpp index 2e2121c11..df0f6da5e 100644 --- a/src/ripple/core/Pg.cpp +++ b/src/ripple/core/Pg.cpp @@ -792,11 +792,7 @@ CREATE OR REPLACE FUNCTION tx ( _in_trans_id bytea ) RETURNS jsonb AS $$ DECLARE - _min_ledger bigint := min_ledger(); - _min_seq bigint := (SELECT ledger_seq - FROM ledgers - WHERE ledger_seq = _min_ledger - FOR SHARE); + _min_seq bigint := min_ledger(); _max_seq bigint := max_ledger(); _ledger_seq bigint; _nodestore_hash bytea;