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

Fix Getter/Setter for Internal Fee Manager #1837

Open
RodrigoVillar opened this issue Dec 16, 2024 · 0 comments · May be fixed by #1838
Open

Fix Getter/Setter for Internal Fee Manager #1837

RodrigoVillar opened this issue Dec 16, 2024 · 0 comments · May be fixed by #1838
Assignees

Comments

@RodrigoVillar
Copy link
Contributor

Currently, the getter/setter functions in the internal fee manager use different sizing for the timestamp variable in manager.Raw. Running the following UT in internal/fees will produce an error:

package fees

import (
	"testing"

	externalfees "github.com/ava-labs/hypersdk/fees"
	"github.com/stretchr/testify/require"
)

func TestManager(t *testing.T) {
	r := require.New(t)
	v := uint64(1)

	m := NewManager([]byte{})
	m.SetLastConsumed(externalfees.Dimension(2), v)

	r.Equal(v, m.LastConsumed(externalfees.Dimension(2)))
}
@RodrigoVillar RodrigoVillar self-assigned this Dec 16, 2024
@RodrigoVillar RodrigoVillar linked a pull request Dec 17, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant