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

Deconflict updated fetch commands. #655

Open
ufocomp opened this issue Nov 5, 2019 · 4 comments
Open

Deconflict updated fetch commands. #655

ufocomp opened this issue Nov 5, 2019 · 4 comments
Assignees

Comments

@ufocomp
Copy link

ufocomp commented Nov 5, 2019

Hello Eric!

Tell me, please, how can I get balance in version 4 of the library, for example, at 13Ft7SkreJY9D823NPm4t6D1cBqLYTJtAe.

Before asking a question, I looked at the code in the file test/commands/fetch-balance.cpp.

There, "0550bf9055a9a10e453f7ee6cf584ab61307f64a62aa0b3dba11068cf4ac7efe" is used as the argument, the result is "object does not exist".

I executed "bx address-to-key 13Ft7SkreJY9D823NPm4t6D1cBqLYTJtAe" received payments search key "0550bf9055a9a10e453f7ee6cf584ab61307f64a62aa0b3dba11068cf4ac7efe".

bx fetch-balance 0550bf9055a9a10e453f7ee6cf584ab61307f64a62aa0b3dba11068cf4ac7efe
object does not exist

Transaction hash:
bx fetch-balance b7354b8b9cc9a856aedaa349cffa289ae9917771f4e06b2386636b3c073df1b5
object does not exist

Please tell me what I'm doing wrong.

@evoskuil
Copy link
Member

evoskuil commented Nov 5, 2019

Hi, you are running a v4 command against an incompatible v3 server. We’ll need to deconflict these better before v4 release.

@evoskuil
Copy link
Member

evoskuil commented Nov 5, 2019

Although I would expect a different error calling a v3 server, as the hash length for an address is 160 vs. 256 bits.

@evoskuil
Copy link
Member

evoskuil commented Nov 5, 2019

We should probably change fetch-history to fetch-payments and fetch-balance to fetch-total, either obsoleting the original commands or retaining them using a compat shim in explorer.

@evoskuil
Copy link
Member

evoskuil commented Nov 5, 2019

It might also be helpful to change the bx “key” encoding from base16, since the key is a 256 bit hash and is easily confused with other hashes.

@evoskuil evoskuil changed the title How get balance Deconflict updated fetch commands. Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants