Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Can not get the number of peers connected to #422

Closed
hujw77 opened this issue Dec 29, 2020 · 8 comments · Fixed by #463
Closed

Can not get the number of peers connected to #422

hujw77 opened this issue Dec 29, 2020 · 8 comments · Fixed by #463
Assignees
Labels
C-EVM [Component] Something about EVM

Comments

@hujw77
Copy link
Contributor

hujw77 commented Dec 29, 2020

Test

dvm-test branch

mocha  test-rpc-net.js

Test output

  Test Net API
    ✓ should get current network ID
    ✓ should check if the node is listening for peer
    1) should get the number of peers connected to


  2 passing (15ms)
  1 failing

  1) Test Net API
       should get the number of peers connected to:
     Error: Given value "0" is not a valid hex string.
@hujw77
Copy link
Contributor Author

hujw77 commented Dec 29, 2020

Test

mocha 0_test-rpc-block.js

Test output

  Test Block RPC
    ✓ The block number should not be zero
    ✓ Should return the genesis block (44ms)
    ✓ should have empty uncles and correct sha3Uncles (42ms)
    ✓ should have empty transactions and correct transactionRoot (53ms)
    ✓ get block by hash
    ✓ get block by number (42ms)
    ✓ should include previous block hash as parent
    ✓ should have valid timestamp after block production
    ✓ should get transactions count by block number
    ✓ should get transactions count by earliest block
    ✓ should get transactions count by latest block
    1) should get transactions count by pending block
    ✓ should return null if the block doesnt exist
    ✓ should return null when no uncle was found


  13 passing (270ms)
  1 failing

  1) Test Block RPC
       should get transactions count by pending block:
     AssertionError: expected null to equal 0

@boundless-forest
Copy link
Member

boundless-forest commented Jan 4, 2021

To fix test-rpc-net.js, waiting for polkadot-evm/frontier#263

@boundless-forest boundless-forest changed the title [Dvm] should get transactions count by pending block Can not get the number of peers connected to Jan 4, 2021
@boundless-forest
Copy link
Member

To fix 0_test-rpc-block.js(should get transactions count by pending block), since the DVM module can not strive pending block from the substrate chain now, the returned result is null. Change the assert line to make the test workable.

expect(await web3.eth.getBlockTransactionCount("pending")).to.equal(null);

@hujw77 hujw77 closed this as completed Jan 4, 2021
@aurexav
Copy link
Member

aurexav commented Jan 4, 2021

@AsceticBear Should we close this now?

@boundless-forest
Copy link
Member

boundless-forest commented Jan 4, 2021

@AsceticBear Should we close this now?

It's would be better to wait for the frontier pull request merged. Keep it open now.

@hujw77
Copy link
Contributor Author

hujw77 commented Jan 4, 2021

May I skip the test to make the test workable?

@boundless-forest boundless-forest added the C-EVM [Component] Something about EVM label Jan 4, 2021
@boundless-forest
Copy link
Member

May I skip the test to make the test workable?

For should get the number of peers connected to, skip temporarily.
For should get transactions count by pending block, change 0 to null.

@boundless-forest
Copy link
Member

This issue related to #362, will be fixed in the next DVM upgrade.

@boundless-forest boundless-forest linked a pull request Jan 26, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-EVM [Component] Something about EVM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants