Class: MigrateChainState

MigrateChainState(options)

Migrate chain state and correct total supply. Applies to ChainDB v1

Constructor

new MigrateChainState(options)

Create migration chain state

Parameters:
Name Type Description
options ChainMigrator
Source:

Methods

(async) check() → {Promise}

Check if the migration applies to the database

Source:
Returns:
Type
Promise

(async) getBlock(hash) → {Promise}

Get Block (old layout)

Parameters:
Name Type Description
hash Hash
Source:
Returns:
  • Block
Type
Promise

(async) getBlockView(hash) → {Promise}

Get block view (old layout)

Parameters:
Name Type Description
hash Hash
Source:
Returns:
  • UndoCoins
Type
Promise

(async) migrate(b) → {Promise}

Actual migration

Parameters:
Name Type Description
b Batch
Source:
Returns:
Type
Promise

warning()

Log warnings when skipped.

Source: