ipld-eth-server/pkg/fakes/data.go
Rob Mulholand d3df685c46 Add timestamp to block header
- Enables quickly deriving timestamp from header for log events
2018-10-12 12:00:02 -05:00

25 lines
484 B
Go

package fakes
import (
"encoding/json"
"errors"
"github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/core"
)
var FakeError = errors.New("failed")
var rawFakeHeader, _ = json.Marshal(types.Header{})
var FakeHeader = core.Header{
Raw: rawFakeHeader,
Timestamp: "111111111",
}
func GetFakeHeader(blockNumber int64) core.Header {
return core.Header{
BlockNumber: blockNumber,
Raw: rawFakeHeader,
Timestamp: "111111111",
}
}