@@ -63,44 +63,50 @@ while true; do
6363 fi
6464
6565 # In case current and gas price meet the criteria, send a proof and reset counter
66- if { [ $elapsed_intervals -ge 1 ] && [ $elapsed_intervals -lt 3 ] && [ $current_gas_price -lt 1500000000 ]; }; then
67- # Between 1 and 3 elapsed intervals (5 to 15 minutes), if gas price is below 1 .5 gwei, send a proof
66+ if { [ $elapsed_intervals -ge 1 ] && [ $elapsed_intervals -lt 3 ] && [ $current_gas_price -lt 500000000 ]; }; then
67+ # At 1 tick (5 minutes), if gas price is below 0 .5 gwei, send a proof
6868 message=" Sending proof at $elapsed_intervals with gas price $current_gas_price wei"
6969 echo " $message "
7070 send_proof_background
7171 elapsed_intervals=0
72- elif { [ $elapsed_intervals -ge 3 ] && [ $elapsed_intervals -lt 6 ] && [ $current_gas_price -lt 4500000000 ]; }; then
73- # Between 3 and 6 elapsed intervals (15 to 30 minutes), if gas price is below 4 .5 gwei, send a proof
72+ elif { [ $elapsed_intervals -ge 3 ] && [ $elapsed_intervals -lt 6 ] && [ $current_gas_price -lt 1500000000 ]; }; then
73+ # At 3 ticks (15 minutes), if gas price is below 1 .5 gwei, send a proof
7474 message=" Sending proof at $elapsed_intervals with gas price $current_gas_price wei"
7575 echo " $message "
7676 send_proof_background
7777 elapsed_intervals=0
78- elif { [ $elapsed_intervals -ge 6 ] && [ $elapsed_intervals -lt 12 ] && [ $current_gas_price -lt 9000000000 ]; }; then
79- # Between 6 and 12 elapsed intervals (30 minutes to 1 hour ), if gas price is below 9 gwei, send a proof
78+ elif { [ $elapsed_intervals -ge 6 ] && [ $elapsed_intervals -lt 12 ] && [ $current_gas_price -lt 3000000000 ]; }; then
79+ # At 6 ticks (30 minutes), if gas price is below 3 gwei, send a proof
8080 message=" Sending proof at $elapsed_intervals with gas price $current_gas_price wei"
8181 echo " $message "
8282 send_proof_background
8383 elapsed_intervals=0
84- elif { [ $elapsed_intervals -ge 12 ] && [ $elapsed_intervals -lt 24 ] && [ $current_gas_price -lt 24000000000 ]; }; then
85- # Between 12 and 24 elapsed intervals (1 to 2 hours ), if gas price is below 24 gwei, send a proof
84+ elif { [ $elapsed_intervals -ge 12 ] && [ $elapsed_intervals -lt 24 ] && [ $current_gas_price -lt 6000000000 ]; }; then
85+ # At 12 ticks (1 hour ), if gas price is below 6 gwei, send a proof
8686 message=" Sending proof at $elapsed_intervals with gas price $current_gas_price wei"
8787 echo " $message "
8888 send_proof_background
8989 elapsed_intervals=0
90- elif { [ $elapsed_intervals -ge 24 ] && [ $elapsed_intervals -lt 48 ] && [ $current_gas_price -lt 48000000000 ]; }; then
91- # Between 24 and 48 elapsed intervals (2 to 4 hours), if gas price is below 48 gwei, send a proof
90+ elif { [ $elapsed_intervals -ge 24 ] && [ $elapsed_intervals -lt 48 ] && [ $current_gas_price -lt 12000000000 ]; }; then
91+ # At 24 ticks (2 hours), if gas price is below 12 gwei, send a proof
9292 message=" Sending proof at $elapsed_intervals with gas price $current_gas_price wei"
9393 echo " $message "
9494 send_proof_background
9595 elapsed_intervals=0
96- elif { [ $elapsed_intervals -ge 48 ] && [ $elapsed_intervals -lt 96 ] && [ $current_gas_price -lt 96000000000 ]; }; then
97- # Between 48 and 96 elapsed intervals (4 to 8 hours), if gas price is below 96 gwei, send a proof
96+ elif { [ $elapsed_intervals -ge 48 ] && [ $elapsed_intervals -lt 96 ] && [ $current_gas_price -lt 24000000000 ]; }; then
97+ # At 48 ticks (4 hours), if gas price is below 24 gwei, send a proof
9898 message=" Sending proof at $elapsed_intervals with gas price $current_gas_price wei"
9999 echo " $message "
100100 send_proof_background
101101 elapsed_intervals=0
102- elif { [ $elapsed_intervals -ge 96 ] && [ $current_gas_price -lt 192000000000 ]; }; then
103- # After 96 elapsed intervals (8 hours), if gas price is below 192 gwei, send a proof
102+ elif { [ $elapsed_intervals -ge 96 ] && [ $elapsed_intervals -lt 192 ] && [ $current_gas_price -lt 48000000000 ]; }; then
103+ # At 96 ticks (8 hours), if gas price is below 48 gwei, send a proof
104+ message=" Sending proof at $elapsed_intervals with gas price $current_gas_price wei"
105+ echo " $message "
106+ send_proof_background
107+ elapsed_intervals=0
108+ elif { [ $elapsed_intervals -ge 192 ] && [ $current_gas_price -lt 96000000000 ]; }; then
109+ # At 192 ticks (16 hours), if gas price is below 96 gwei, send a proof
104110 message=" Sending proof at $elapsed_intervals with gas price $current_gas_price wei"
105111 echo " $message "
106112 send_proof_background
0 commit comments