diff --git a/.gitignore b/.gitignore index 6dd29b7..a5d8f72 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -bin/ \ No newline at end of file +bin/ +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml index 8f5efec..645a2b7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,7 @@ before: hooks: - go mod download + - make migration-pack builds: - main: ./cli/node/main.go @@ -9,10 +10,8 @@ builds: goos: - linux - darwin - - windows - hooks: - pre: make migration-pack - post: make migration-clean + goarch: + - amd64 archives: - replacements: diff --git a/eth/ethereum.go b/eth/ethereum.go index fcfba50..de3c99f 100644 --- a/eth/ethereum.go +++ b/eth/ethereum.go @@ -245,15 +245,15 @@ func (c *EthereumClient) EthBlockByNumber(ctx context.Context, number int64) (*c if number == -1 { blockNum = nil } - block, err := c.client.BlockByNumber(ctx, blockNum) + header, err := c.client.HeaderByNumber(ctx, blockNum) if err != nil { return nil, tracerr.Wrap(err) } b := &common.Block{ - Num: block.Number().Int64(), - Timestamp: time.Unix(int64(block.Time()), 0), - ParentHash: block.ParentHash(), - Hash: block.Hash(), + Num: header.Number.Int64(), + Timestamp: time.Unix(int64(header.Time), 0), + ParentHash: header.ParentHash, + Hash: header.Hash(), } return b, nil }