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

Remake AccountInfo struct #368

Open
12 tasks done
kastolars opened this issue Oct 10, 2019 · 0 comments
Open
12 tasks done

Remake AccountInfo struct #368

kastolars opened this issue Oct 10, 2019 · 0 comments
Labels
Level: 2 Priority: Low Type: Maintenance Structure, reorganization, etc.

Comments

@kastolars
Copy link
Member

kastolars commented Oct 10, 2019

  • accountinfo.go

  • Add a WalletAddress string field to AccountInfo

  • New should take a first parameter walletAddress string and add it into the &AccountInfo{} return statement.

  • Serialize should call hex.DecodeString on accInfo.WalletAddress and prepend it to the converted Balance bytes

  • Deserialize should call hex.EncodeToString on the portion of the byte array that is the wallet address

  • accountinfo_test.go

  • Make all tests pass with new changes

  • producer_test.go

  • Remove the TestResponseToAccoutnInfoRequest test completely

  • accountstable.go

  • Modify GetAccountInfo to first convert the the pkhash parameter to a string using hex.EncodeToString, then correct the return statement with the missing field

  • accountstable_test.go

  • Correct the TestAccountInfo test to make it pass now

  • handlers.go

  • In HandleAccountInfoRequest, remove the AccountInfo struct definition

  • In the same function, refactor var accInfo AccountInfo to use accountinfo.AccountInfo instead

  • This correct may need to made after the if ok { branch

handlers_test.go

  • Make sure tests are passing

Guidance:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Level: 2 Priority: Low Type: Maintenance Structure, reorganization, etc.
Projects
None yet
Development

No branches or pull requests

2 participants