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

Prevent prohibited addresses nits #28

Merged

Conversation

aaronbuchwald
Copy link
Collaborator

This PR adds a few small nits and fixes a small bug in the tests.

@aaronbuchwald aaronbuchwald requested review from patrick-ogrady and ceyonur and removed request for patrick-ogrady February 25, 2022 18:09
Copy link
Collaborator

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

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

My humble suggestion to simplify it even further:

var (
	prohibitedAddressesSet = map[common.Address]struct{}{
		constants.BlackholeAddr: struct{}{},
	}
)

func init() {
	for _, addr := range precompile.PrecompileAddresses {
		prohibitedAddressesSet[addr] = struct{}{}
	}
}

Otherwise LGTM.

// (c) 2021-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package constants
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@patrick-ogrady
Copy link
Contributor

image

Need to fix these ^^

@patrick-ogrady patrick-ogrady merged commit fe180ed into prevent-prohibited-addresses Feb 26, 2022
@patrick-ogrady patrick-ogrady deleted the prevent-prohibited-addresses-nits branch February 26, 2022 00:49
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.

3 participants