-
Notifications
You must be signed in to change notification settings - Fork 680
Issue 173: Adding uncle count support #236
Conversation
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.
looks good to me!
test/eth_getUncles.js
Outdated
: "../index.js"); | ||
|
||
describe("Uncle support", function() { | ||
describe("retrieving uncles", function() { |
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.
Is the nested describe
block necessary? Can we combine it to be one describe block? Or for readability and clarity, should it stay nested?
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.
It can be combined but went with the nested route for more readability when running npm test
describe("retrieving uncles", function() { | ||
const services = preloadWeb3(); | ||
|
||
it("by hash", async function() { |
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.
Is there anyway the it
blocks throughout this file could be changed to be more readable like a sentence? For this particular one maybe it("should return result by hash")
or something?
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.
Could definitely go that route but was attempting to keep it concise for quick referencing during an npm test
run.
Sample output would look like
Uncle support
retrieving uncle count
- by hash
- by block number
- by block tag
test/helpers/compile_deploy.js
Outdated
const { gasLimit } = await web3.eth.getBlock("latest"); | ||
const instance = await contract.deploy({ data: bytecode }).send({ from: accounts[0], gas: gasLimit }); | ||
|
||
// TODO: ugly workaround - not sure why this is necessary. |
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.
Curious if this is actually necessary? What happens if we don't have it?
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.
Was planning to remove that code as we refactor more tests. But will remove as it does not break this test.
Removed legacy safety code from compile and deploy module
PR Summary
geth_api_double.js
block_helper.js
forkedblockchain.js
compileAndDeploy.js, pretest_setup.js
develop
rpc.js