Skip to content

Conversation

ARR4N
Copy link
Contributor

@ARR4N ARR4N commented Jul 17, 2024

Why this should be merged

How this works

How this was tested

How is this documented

Copy link

@darioush darioush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like an improvement so far, could we add the context/motivation to the description?

default:
return false
}
// IsValid returns whether or not `r` is a valid value.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: while ` is more broadly used avalanche code bases use [] for this type of notation.

IsUint64() bool
}

// RoleFromBig converts `u.Uint64()` into a [Role] if `u.IsUint64()` is true.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
// RoleFromBig converts `u.Uint64()` into a [Role] if `u.IsUint64()` is true.
// RoleFromBig converts `b.Uint64()` into a [Role] if `b.IsUint64()` is true.

return Role(state.GetState(precompileAddr, addressKey))
r, err := RoleFromHash(state.GetState(precompileAddr, addressKey))
if err != nil {
panic(err) // DO NOT MERGE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should the actual behavior be in this case?

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 this pull request may close these issues.

2 participants