forked from cerc-io/ipld-eth-server
Merge pull request #76 from vulcanize/fake-header-customization
Add timestamp customization for fake header
This commit is contained in:
commit
8b704e9f1e
@ -43,11 +43,15 @@ var FakeHeader = core.Header{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GetFakeHeader(blockNumber int64) core.Header {
|
func GetFakeHeader(blockNumber int64) core.Header {
|
||||||
|
return GetFakeHeaderWithTimestamp(fakeTimestamp, blockNumber)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetFakeHeaderWithTimestamp(timestamp, blockNumber int64) core.Header {
|
||||||
return core.Header{
|
return core.Header{
|
||||||
Hash: FakeHash.String(),
|
Hash: FakeHash.String(),
|
||||||
BlockNumber: blockNumber,
|
BlockNumber: blockNumber,
|
||||||
Raw: rawFakeHeader,
|
Raw: rawFakeHeader,
|
||||||
Timestamp: strconv.FormatInt(fakeTimestamp, 10),
|
Timestamp: strconv.FormatInt(timestamp, 10),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user