mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Add Coordinator goroutines & channels processes
Add Coordinator goroutines & channels processes - Add Coordinator goroutines & channels - Add Coordinator test to debug batches - Add MakeCheckpoint call after BatchBuilder BuildBatch process - Update ethClient BlockByNumber to return hermez/common.Block instead of go-ethereum/core/types.Block
This commit is contained in:
@@ -195,9 +195,18 @@ func (c *Client) HeaderByNumber(ctx context.Context, number *big.Int) (*types.He
|
||||
return c.client.HeaderByNumber(ctx, number)
|
||||
}
|
||||
|
||||
// BlockByNumber internally calls ethclient.Client BlockByNumber
|
||||
func (c *Client) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) {
|
||||
return c.client.BlockByNumber(ctx, number)
|
||||
// BlockByNumber internally calls ethclient.Client BlockByNumber and returns *common.Block
|
||||
func (c *Client) BlockByNumber(ctx context.Context, number *big.Int) (*common.Block, error) {
|
||||
block, err := c.client.BlockByNumber(ctx, number)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b := &common.Block{
|
||||
EthBlockNum: block.Number().Uint64(),
|
||||
Timestamp: time.Unix(int64(block.Time()), 0),
|
||||
Hash: block.Hash(),
|
||||
}
|
||||
return b, nil
|
||||
}
|
||||
|
||||
func (c *Client) ForgeCall(callData *common.CallDataForge) ([]byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user