Skip to content
Snippets Groups Projects

issue #223: correctly detect if reversible data have to be removed after hived restart

Closed issue #223: correctly detect if reversible data have to be removed after hived restart
Closed Marcin requested to merge mi_investigate_restart_with_app into develop
Compare and Show latest version
3 files
+ 9
3
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -27,6 +27,10 @@ $BODY$
DECLARE
__fork_id BIGINT;
BEGIN
IF (SELECT COUNT(*) FROM hive.fork ) > 0 THEN
RETURN;
END IF;
INSERT INTO hive.fork(block_num, time_of_fork)
VALUES( _block_num_before_fork, LOCALTIMESTAMP );
@@ -338,7 +342,7 @@ AS
$BODY$
BEGIN
PERFORM hive.remove_inconsistent_irreversible_data();
IF _remove_reversible OR _block_num = 0 THEN --_block_num = 0 to ensure that at least 1 fork exists
IF _block_num = 0 THEN --_block_num = 0 to ensure that at least 1 fork exists
PERFORM hive.back_from_fork( _block_num );
END IF;
INSERT INTO hive.hived_connections( block_num, git_sha, time )
Loading