Changeset 3388215
- Timestamp:
- 11/01/2025 11:05:22 PM (5 months ago)
- Location:
- infoforflux/trunk
- Files:
-
- 2 edited
-
infoforflux.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
infoforflux/trunk/infoforflux.php
r3376199 r3388215 3 3 * Plugin Name: Info for Flux 4 4 * Description: Display and Monitor Flux Network (runonflux.com) 5 * Version: 1.0.1 25 * Version: 1.0.13 6 6 * Author: Tom Moulton tom@runonflux.com 7 7 * Author URI: https://runonflux.com … … 158 158 $ret = '(unknown)'; 159 159 $name = esc_attr( get_option('infoforflux_name') ); 160 $endblock = esc_attr( get_option('infoforflux_expire_block') );161 $current = infoforflux_get_current_block();160 $endblock = (int)esc_attr( get_option('infoforflux_expire_block') ); 161 $current = (int)infoforflux_get_current_block(); 162 162 $height = esc_attr( get_option('infoforflux_block_height') ); 163 163 if ($current) { … … 170 170 $ret = $days; 171 171 } 172 } else { // App Updated before V2 , Does it expire before V2?173 // S ince app spec can't be changed due to fork174 // We can assume that Flux will properly handle the expiration DATE175 $ minutes = $blocks * 2; // Flux Generates a block every 120 seconds +/-176 $ days = (int)($minutes/(60*24));177 $ret = $days;178 if ($endblock < $flux_v2_start_block) { // Yes - V1 Only 179 $endblockV2 = $endblock;180 } else { // Starts in V1 expires in V2 - transition case, compute new endblock 181 // 4 V2 blocks per V1 Block time182 $endblockV2 = ( ($endblock - $flux_v2_start_block) * 4) + $flux_v2_start_block;172 } else { // App Updated before V2 173 // Starts in V1 expires in V2 - transition case, compute new endblock 174 // 4 V2 blocks per V1 Block time 175 $blocksV2 = ($endblock - $flux_v2_start_block) * 4; 176 $endblockV2 = $blocksV2 + $flux_v2_start_block; 177 if ($current > $endblockV2) $ret = 'Expired V1 -> V2'; 178 else { 179 $blocks = $endblockV2 - $current; 180 $minutes = $blocks / 2; 181 $days = (int)($minutes/(60*24)); 182 $ret = $days; 183 183 } 184 if ($current > $endblockV2) $ret = 'Expired V1 -> V2';185 184 } 186 185 } -
infoforflux/trunk/readme.txt
r3376199 r3388215 4 4 Requires at least: 4.7 5 5 Tested up to: 6.8.3 6 Stable Tag: 1.0.1 26 Stable Tag: 1.0.13 7 7 License: GPLv3 or later. 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 77 77 = Version 1.0.12 - 10 Oct 2025 = 78 78 - Add actual Flux V2 PoUW Starting Block 2020000 79 80 = Version 1.0.13 - 1 Nov 2025 = 81 - Fix V1 to V2 block calculation and fatal error
Note: See TracChangeset
for help on using the changeset viewer.