Skip to content

fix: print value instead of pointer in ConfigCompatError#2391

Merged
zzzckck merged 1 commit intobnb-chain:developfrom
buddh0:fix_print_ConfigCompatError
Apr 15, 2024
Merged

fix: print value instead of pointer in ConfigCompatError#2391
zzzckck merged 1 commit intobnb-chain:developfrom
buddh0:fix_print_ConfigCompatError

Conversation

@buddh0
Copy link
Copy Markdown
Contributor

@buddh0 buddh0 commented Apr 11, 2024

Description

fix: print value instead of pointer in ConfigCompatError

Rationale

two errors in func ConfigCompatError as error info in the above picture

  1. RewindToTime overflow
    for dev testnet, often set timebased hardfork to 0, so they will be enabled same with London Block at genesis
    for example in genesis.json
    "shanghaiTime": 0,
    then we change it
    "shanghaiTime": 1712889032,
    and run `geth --datadir ./ init ./genesis.json, then RewindToTime will overflow to the max of uint64 type

  2. err.StoredTime and err.NewTime are pointers, print them is meaningless, their value are desired

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@buddh0 buddh0 requested a review from zzzckck as a code owner April 11, 2024 11:48
@buddh0 buddh0 marked this pull request as draft April 12, 2024 02:12
@buddh0 buddh0 marked this pull request as ready for review April 12, 2024 02:47
@zzzckck zzzckck merged commit b4fb2f6 into bnb-chain:develop Apr 15, 2024
@buddh0 buddh0 deleted the fix_print_ConfigCompatError branch May 7, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants