Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parlia: Some updates of the miner worker #1182

Merged
merged 2 commits into from
Nov 16, 2022

Commits on Nov 15, 2022

  1. parlia: Delay() with DelayLeftOver

    Right now, DelayLeftOver is used to reserve time for block finalize, not block
    broadcast. And the code does not work as expected.
    
    The general block generation could be described as:
    |- fillTransactions -|- finalize a block -|- wait until the period(3s) reached -|- broadcast -|
    setunapo committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    c80586c View commit details
    Browse the repository at this point in the history
  2. worker: no need to add more transaction if not mining

    It could be a very old PoW logic, which try to add more transaction
    into the pending block when mining is stopped.
    Mining can be stopped when:
      1.download started.
      2.manually stopped by RPC.
    It is unnecessary to add more transaction into the pending block if a validator is stopped.
    And updateSnapshot() is not needed as well, it is to get the pending mining snapshot.
    setunapo committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    4c7f004 View commit details
    Browse the repository at this point in the history