-
Notifications
You must be signed in to change notification settings - Fork 3
134 remove accounttype #135
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
Conversation
…into 134-remove-accounttype
…into 134-remove-accounttype
…of github.com:zoobc/zoobc-core into 134-remove-accounttype
…into 134-remove-accounttype
mempool not finished, sorry, back to |
Version: 1, | ||
TransactionType: util.ConvertBytesToUint32(txTypeMap["sendMoney"]), | ||
Timestamp: time.Now().Unix(), | ||
SenderAccountAddressLength: uint32(len("BCZnSfqpP5tqFQlMTYkDeBVFWnbyVK7vLr5ORFpTjgtN")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need Address length here? because Account Address is already a string, not bytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we do, it'll not be inserted into database, but we'll need it to parse TransactionBytes
back to Transaction
Object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but here you are passing the length of the "string" not the length of the "bytes of string"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
CREATE TABLE IF NOT EXISTS "account_balance" ( | ||
"account_id" BLOB, | ||
"account_address" VARCHAR(255), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to keep note about this, that max address string length allowed in our system is 255
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @bzpython mentioned one blockchain that uses different encoding format (something like tribit
, that the representation is of 27 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's put this into note and talk about this on our next sprint meeting, in case it changes, it should be as simple as updating the migration
NodeAddress: "10.10.0.1", | ||
LockedBalance: 10000000000, | ||
Poown: poown, | ||
AccountAddressLength: uint32(len("BCZnSfqpP5tqFQlMTYkDeBVFWnbyVK7vLr5ORFpTjgtN")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need address length here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, reason mentioned on previous comment answer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the previous reply
tx.SenderAccountType, | ||
tx.SenderAddress, | ||
), | ||
"account_id": tx.SenderAddress, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be account_address
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, fixing it.
Description
Breaking changes:
REMOVE ACCOUNT TYPE
Breakdown
Reference Issue
Close #134
Step to Test (optional)
go test ./...
go run main.go
as usual