Skip to content

Commit

Permalink
Increase cncli ptsendslots wait time after epoch boundary (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scitz0 committed Feb 27, 2021
1 parent e01d5f0 commit fc97b46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/cnode-helper-scripts/cncli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,10 @@ cncliPTsendslots() {
getNodeMetrics
[[ ${slotnum} -eq 0 ]] && continue # failed to grab node metrics
[[ ${sendslots_epoch} -eq ${epochnum} ]] && continue # this epoch is already sent
[[ ${slot_in_epoch} -lt 300 || ${slot_in_epoch} -gt 3600 ]] && continue # only allow slots to be sent in the first hour after epoch boundary, wait 5min after epoch boundary
if [[ ${slot_in_epoch} -lt 900 || ${slot_in_epoch} -gt 3600 ]]; then # only allow slots to be sent in the first hour after epoch boundary, wait 15min after epoch boundary
[[ -t 1 ]] && echo "${FG_YELLOW}WARN${NC}: Valid window to send slots is ${FG_LBLUE}15 - 60${NC} min after epoch boundary" && break
continue
fi
leaderlog_cnt=$(sqlite3 "${CNCLI_DB}" "SELECT COUNT(*) FROM slots WHERE epoch=${epochnum} and pool_id='${POOL_ID}';")
[[ ${leaderlog_cnt} -eq 0 ]] && echo "ERROR: no leaderlogs for epoch ${epochnum} and pool id '${POOL_ID}' found in cncli DB" && continue
cncli_ptsendslots=$(${CNCLI} sendslots --config "${pt_config}" --db "${CNCLI_DB}" --byron-genesis "${BYRON_GENESIS_JSON}" --shelley-genesis "${GENESIS_JSON}")
Expand Down

0 comments on commit fc97b46

Please sign in to comment.