Add timestamp customization for fake header

This commit is contained in:
Gabe Laughlin 2019-04-09 17:06:33 -05:00
parent b403e731be
commit 8903b6fb2d

View File

@ -43,11 +43,15 @@ var FakeHeader = core.Header{
}
func GetFakeHeader(blockNumber int64) core.Header {
return GetFakeHeaderWithTimestamp(fakeTimestamp, blockNumber)
}
func GetFakeHeaderWithTimestamp(timestamp, blockNumber int64) core.Header {
return core.Header{
Hash: FakeHash.String(),
BlockNumber: blockNumber,
Raw: rawFakeHeader,
Timestamp: strconv.FormatInt(fakeTimestamp, 10),
Timestamp: strconv.FormatInt(timestamp, 10),
}
}