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

add enable-0x-prefix flag #194

Merged
merged 1 commit into from Dec 9, 2022
Merged

add enable-0x-prefix flag #194

merged 1 commit into from Dec 9, 2022

Conversation

gzliudan
Copy link
Collaborator

@gzliudan gzliudan commented Oct 14, 2022

Add a bool flag --enable-0x-prefix. This default value of this flag is false, and can be set to true when startup. The function MarshalText choose address prefix with this flag:

func (a Address) MarshalText() ([]byte, error) {
	// Handle '0x' or 'xdc' prefix here.
	if (Enable0xPrefix) {
		return hexutil.Bytes(a[:]).MarshalText()
	} else {
		return hexutil.Bytes(a[:]).MarshalXDCText()
	}
}

Copy link
Member

@AnilChinchawale AnilChinchawale left a comment

Choose a reason for hiding this comment

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

LGTM...

@liam-lai liam-lai merged commit 6a768b0 into XinFinOrg:master Dec 9, 2022
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.

None yet

3 participants