Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Unmarshalling error while fetching the block at height 311040 #16

Closed
pienkowb opened this issue Aug 2, 2021 · 3 comments
Closed

Unmarshalling error while fetching the block at height 311040 #16

pienkowb opened this issue Aug 2, 2021 · 3 comments

Comments

@pienkowb
Copy link

pienkowb commented Aug 2, 2021

When I try to fetch the block at height 311040 using the Eth.BlockByNumber function, the following error is returned:

math/big: cannot unmarshal "\"0x7a772fbbbc7077ce7f7ffe\"" into a *big.Int

It's worth noting that the function works perfectly fine for other heights.

Example code:

package main

import (
	"context"
	"log"
	"math/big"

	kliento "github.com/celo-org/kliento/client"
)

func main() {
	client, err := kliento.Dial("[NODE URL]")
	if err != nil {
		log.Fatal(err)
	}

	ctx := context.Background()
	height := big.NewInt(311040)

	_, err = client.Eth.BlockByNumber(ctx, height)
	if err != nil {
		log.Fatal(err)
	}
}
@pienkowb
Copy link
Author

pienkowb commented Aug 6, 2021

I think it is related to this issue: celo-org/celo-blockchain#1574

@jpjamipark
Copy link

jpjamipark commented Sep 30, 2021

This bug should be resolved in this PR: celo-org/celo-blockchain#1688.

@pienkowb
Copy link
Author

That solved the issue, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants