Remove Tic logic

This commit is contained in:
Rob Mulholand
2019-03-06 12:43:39 -06:00
parent 310a52cb0c
commit 7ed4dcd1fa
3 changed files with 0 additions and 19 deletions
-4
View File
@@ -17,7 +17,3 @@
package constants
var DataItemLength = 32
// TODO: Move to Plugin
// TODO: Grab this from DB, since it can change through governance
var TTL = int64(10800) // 60 * 60 * 3 == 10800 seconds == 3 hours
-12
View File
@@ -155,15 +155,3 @@ func CreateNotCheckedSQL(boolColumns []string, recheckHeaders constants.Transfor
return result.String()
}
// TODO: Move to plugin
func GetTicInTx(headerID int64, tx *sql.Tx) (int64, error) {
var blockTimestamp int64
err := tx.QueryRow(`SELECT block_timestamp FROM public.headers WHERE id = $1;`, headerID).Scan(&blockTimestamp)
if err != nil {
return 0, err
}
tic := blockTimestamp + constants.TTL
return tic, nil
}