8000 Accept decimal block number for debug_setHead API by blukat29 · Pull Request #1697 · klaytn/klaytn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Accept decimal block number for debug_setHead API #1697

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

blukat29
Copy link
Contributor

Proposed changes

  • Replace debug_setHead API argument type from hexutil.Uint64 to rpc.BlockNumber.
  • Allows hex and decimal inputs, like other block-number-taking APIs.
  • Before this PR
     debug.setHead("0x40") // ok
     debug.setHead(0x40)   // Error: json: cannot unmarshal non-string into Go value of type hexutil.Uint64
     debug.setHead("64")   // Error: json: cannot unmarshal hex string without 0x prefix into Go value of type hexutil.Uint64
     debug.setHead(64)     // Error: json: cannot unmarshal non-string into Go value of type hexutil.Uint64
    
  • After this PR
     debug.setHead("0x40") // ok
     debug.setHead(0x40)   // ok
     debug.setHead("64")   // ok
     debug.setHead(64)     // ok
    

Types of changes

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

Further comments

@blukat29 blukat29 self-assigned this Nov 15, 2022
@blukat29 blukat29 added this to the v1.10 (Kore) milestone Nov 15, 2022
@blukat29 blukat29 marked this pull request as ready for review November 15, 2022 10:04
@blukat29 blukat29 merged commit 25a58a1 into klaytn:dev Nov 15, 2022
@blukat29 blukat29 deleted the sethead-num-decimal branch November 16, 2022 02:19
@blukat29 blukat29 mentioned this pull request Nov 17, 2022
31 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0