Remove Tic logic
This commit is contained in:
parent
310a52cb0c
commit
7ed4dcd1fa
@ -17,7 +17,3 @@
|
|||||||
package constants
|
package constants
|
||||||
|
|
||||||
var DataItemLength = 32
|
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
|
|
||||||
|
@ -155,15 +155,3 @@ func CreateNotCheckedSQL(boolColumns []string, recheckHeaders constants.Transfor
|
|||||||
|
|
||||||
return result.String()
|
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
|
|
||||||
}
|
|
||||||
|
@ -24,7 +24,6 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
|
|
||||||
"github.com/vulcanize/vulcanizedb/libraries/shared/constants"
|
|
||||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -49,5 +48,3 @@ func GetFakeHeader(blockNumber int64) core.Header {
|
|||||||
Timestamp: strconv.FormatInt(fakeTimestamp, 10),
|
Timestamp: strconv.FormatInt(fakeTimestamp, 10),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var FakeHeaderTic = fakeTimestamp + constants.TTL
|
|
||||||
|
Loading…
Reference in New Issue
Block a user