port over lightSync updates from maker repo

This commit is contained in:
Ian Norden
2018-11-29 20:33:21 -06:00
parent 26aaa8319b
commit 390a60f7f6
40 changed files with 626 additions and 296 deletions
+31 -2
View File
@@ -16,6 +16,35 @@
package fakes
import "errors"
import (
"encoding/json"
"errors"
"strconv"
var FakeError = errors.New("failed")
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/core"
)
var (
FakeError = errors.New("failed")
FakeHash = common.BytesToHash([]byte{1, 2, 3, 4, 5})
fakeTimestamp = int64(111111111)
)
var rawFakeHeader, _ = json.Marshal(types.Header{})
var FakeHeader = core.Header{
Hash: FakeHash.String(),
Raw: rawFakeHeader,
Timestamp: strconv.FormatInt(fakeTimestamp, 10),
}
func GetFakeHeader(blockNumber int64) core.Header {
return core.Header{
Hash: FakeHash.String(),
BlockNumber: blockNumber,
Raw: rawFakeHeader,
Timestamp: strconv.FormatInt(fakeTimestamp, 10),
}
}