Skip to content

55 genesis txs #74

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

Merged
merged 19 commits into from
Jul 18, 2019
Merged

55 genesis txs #74

merged 19 commits into from
Jul 18, 2019

Conversation

andy-shi88
Copy link
Contributor

@andy-shi88 andy-shi88 commented Jul 17, 2019

Description

Add genesis txs to genesis block.

Breakdown

  • Add list of genesis tx
  • Add genesis txs to genesis block
  • update send money logic
  • fix GetTransactionType not injecting complete dep
  • fix AccountBalanceQuery balance not update.
  • update smithing delay time to 60

breakdown after merge from develop

  • save to tx table
  • changes to push block logic, there is if err != nil logic flaw
  • fix tx query fields
  • add version to tx table
  • inject query executor to tx type
  • fix mempool query fields naming

Reference Issue

Close #55

may affect #14

need #65 to be merged for some block fields and transaction save method.

Step to Test (optional)

  • go test ./..
  • go run main.go account balance should be distributed according to genesis txs

@andy-shi88 andy-shi88 added the FEATURE New feature or request label Jul 17, 2019
@andy-shi88 andy-shi88 self-assigned this Jul 17, 2019
@andy-shi88 andy-shi88 mentioned this pull request Jul 17, 2019
5 tasks
@andy-shi88 andy-shi88 marked this pull request as ready for review July 17, 2019 12:12
@andy-shi88
Copy link
Contributor Author

ready for review 👍

@andy-shi88 andy-shi88 added the WIP label Jul 17, 2019
@andy-shi88
Copy link
Contributor Author

sorry, put back to WIP, will need to update some tests.

@andy-shi88 andy-shi88 removed the WIP label Jul 18, 2019
@@ -19,6 +19,8 @@ type (
GetAccountBalanceByAccountID() string
UpdateAccountBalance(fields, causedFields map[string]interface{}) (str string, args []interface{})
InsertAccountBalance(accountBalance *model.AccountBalance) (str string, args []interface{})
AddAccountBalance(balance int64, causedFields map[string]interface{}) (str string, args []interface{})
AddAccountUnconfirmedBalance(balance int64, causedFields map[string]interface{}) (str string, args []interface{})
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we use SpendableBalance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

q.TableName, balance, balance), []interface{}{causedFields["account_id"]}
}

func (q *AccountBalanceQuery) AddAccountUnconfirmedBalance(balance int64, causedFields map[string]interface{}) (
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we use SpendableBalance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah right, updating

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@astaphobia astaphobia merged commit 1c18161 into zoobc:develop Jul 18, 2019
@astaphobia astaphobia deleted the 55-genesis-txs branch July 18, 2019 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEATURE New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tech: Genesis Transaction
4 participants