Merge branch 'develop' into feature/getPoolTxs

This commit is contained in:
Mikelle
2021-03-29 13:42:01 +03:00
3 changed files with 10 additions and 10 deletions

3
.gitignore vendored
View File

@@ -1 +1,2 @@
bin/ bin/
dist/

View File

@@ -1,6 +1,7 @@
before: before:
hooks: hooks:
- go mod download - go mod download
- make migration-pack
builds: builds:
- main: ./cli/node/main.go - main: ./cli/node/main.go
@@ -9,10 +10,8 @@ builds:
goos: goos:
- linux - linux
- darwin - darwin
- windows goarch:
hooks: - amd64
pre: make migration-pack
post: make migration-clean
archives: archives:
- replacements: - replacements:

View File

@@ -245,15 +245,15 @@ func (c *EthereumClient) EthBlockByNumber(ctx context.Context, number int64) (*c
if number == -1 { if number == -1 {
blockNum = nil blockNum = nil
} }
block, err := c.client.BlockByNumber(ctx, blockNum) header, err := c.client.HeaderByNumber(ctx, blockNum)
if err != nil { if err != nil {
return nil, tracerr.Wrap(err) return nil, tracerr.Wrap(err)
} }
b := &common.Block{ b := &common.Block{
Num: block.Number().Int64(), Num: header.Number.Int64(),
Timestamp: time.Unix(int64(block.Time()), 0), Timestamp: time.Unix(int64(header.Time), 0),
ParentHash: block.ParentHash(), ParentHash: header.ParentHash,
Hash: block.Hash(), Hash: header.Hash(),
} }
return b, nil return b, nil
} }