Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Make RPC output same as Geth's for 2 RPC functions #5866

Merged
merged 3 commits into from
Dec 10, 2019
Merged

Conversation

halfalicious
Copy link
Contributor

@halfalicious halfalicious commented Dec 6, 2019

Fix #5856

Make RPC output conform to Geth's output for debug_accountRange and eth_getTransactionCount.

@halfalicious
Copy link
Contributor Author

Tested getTransactionCount but don't know how to call debug_accountRangeAt (function doesn't appear to be available in Geth's JS console) so would appreciate it if @gumb0 or @winsvega could give it a quick test.

@codecov-io
Copy link

codecov-io commented Dec 6, 2019

Codecov Report

Merging #5866 into master will decrease coverage by 0.03%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5866      +/-   ##
=========================================
- Coverage   64.03%     64%   -0.04%     
=========================================
  Files         364     364              
  Lines       30970   30970              
  Branches     3434    3434              
=========================================
- Hits        19832   19822      -10     
- Misses       9913    9921       +8     
- Partials     1225    1227       +2

libweb3jsonrpc/Debug.cpp Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@gumb0
Copy link
Member

gumb0 commented Dec 6, 2019

To check debug_accountRange run scripts/dopple.py and use something like on Linux

curl http://127.0.0.1:8545 -X POST -d '{"jsonrpc":"2.0","method":"debug_accountRange","params":["1", 0, "0x0", 10],"id":68}'

or in Windows powershell

curl http://localhost:8545 -Method Post -Body '{"jsonrpc":"2.0","method":"debug_accountRange","params":["1", 0, "0x0", 10],"id":68}'

Make RPC output conform to Geth's output for debug_accountRange and
eth_getTransactionCount.
@halfalicious
Copy link
Contributor Author

e.py and use s

To check debug_accountRange run scripts/dopple.py and use something like on Linux

curl http://127.0.0.1:8545 -X POST -d '{"jsonrpc":"2.0","method":"debug_accountRange","params":["1", 0, "0x0", 10],"id":68}'

or in Windows powershell

curl http://localhost:8545 -Method Post -Body '{"jsonrpc":"2.0","method":"debug_accountRange","params":["1", 0, "0x0", 10],"id":68}'

Ah thanks for the tip, i haven't been able to get dopple.py working on Windows but will give it a shot on Linux.

@gumb0
Copy link
Member

gumb0 commented Dec 6, 2019

Unit tests need fixing

@halfalicious
Copy link
Contributor Author

Unit tests need fixing

Yup, there was a test which verified the string format. Fixed.

@halfalicious
Copy link
Contributor Author

cc @gumb0

@halfalicious halfalicious merged commit 423170a into master Dec 10, 2019
@halfalicious halfalicious deleted the rpc-output branch December 10, 2019 17:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hexadecimal addresses without 0x in debug_accountRange result
3 participants