Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to like github.com/holiman/uint256 #3

Closed
karalabe opened this issue Feb 24, 2023 · 1 comment
Closed

Doesn't seem to like github.com/holiman/uint256 #3

karalabe opened this issue Feb 24, 2023 · 1 comment

Comments

@karalabe
Copy link
Collaborator

I've implemented the necessary interface on the uint256 library in holiman/uint256#126, but running this generator against a struct containing those types generates invalid code, trying to cast these types into []uint64 instead of calling the interface methods. No idea what's happening, can't parse this code with 0 comments.

/github.com/ethereum/go-ethereum/core/types/tx_blob_enc.go:66:29: cannot convert c.Value (variable of type *uint256.Int) to type []uint64
	// Field 6: Value
	if len([]uint64(c.Value)) != 4 {
		return nil, ssz.ErrBytesLength
	}
	for _, o := range []uint64(c.Value) {
		dst = ssz.MarshalUint64(dst, o)
	}

No idea why the above happens, it should just call MarshalSSZTo?

@karalabe
Copy link
Collaborator Author

This was fixed by #9

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

No branches or pull requests

1 participant