Skip to content
Snippets Groups Projects
Commit 1feb59dd authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Supplemented helper table creation used at `calculate_account_reputations_for_block`.

parent cb1f203b
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!393Reputation calc enabled at LIVE SYNC again
......@@ -130,6 +130,14 @@ DECLARE
__traced_author int;
__account_name varchar;
BEGIN
CREATE UNLOGGED TABLE IF NOT EXISTS __new_reputation_data
(
id integer,
author_id integer,
voter_id integer,
rshares bigint,
prev_rshares bigint
);
TRUNCATE TABLE __new_reputation_data;
INSERT INTO __new_reputation_data
......@@ -144,6 +152,14 @@ BEGIN
ORDER BY rd.id
;
CREATE UNLOGGED TABLE IF NOT EXISTS __tmp_accounts
(
id integer,
reputation bigint,
is_implicit boolean,
changed boolean
);
TRUNCATE TABLE __tmp_accounts;
INSERT INTO __tmp_accounts
SELECT ha.id, ha.reputation, ha.is_implicit, false AS changed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment