Class: MigrateTXCountTimeIndex

MigrateTXCountTimeIndex(options)

Applies to WalletDB v3. Migrate TX Count Time Index.

  • Adds time to the block entries (layout.wdb.h)
  • ...

Constructor

new MigrateTXCountTimeIndex(options)

Create TX Count Time Index migration object.

Parameters:
Name Type Description
options WalletMigratorOptions
Source:

Members

options :WalletMigratorOptions

Type:
  • WalletMigratorOptions
Source:

Methods

(async) check() → {Promise.<MigrationType>}

TX Count Time Index migration check. It will always migrate.

Source:
Returns:
Type
Promise.<MigrationType>

encodeTXCount(txCount) → {Buffer}

Encode TXCount.

Parameters:
Name Type Description
txCount Object
Properties
Name Type Description
height Number
index Number
Source:
Returns:
Type
Buffer

(async) getAccount(wid, coin) → {Promise.<Number>}

Get path for the coin.

Parameters:
Name Type Description
wid Number
coin Coin | Output
Source:
Returns:
  • account index
Type
Promise.<Number>

(async) getMedianTime(height, lastHash) → {Promise.<Number>}

Get median time for the block.

Parameters:
Name Type Description
height Number
lastHash Hash
Source:
Returns:
Type
Promise.<Number>

(async) migrate(b) → {Promise}

Migrate TX Count Time Index. Needs fullnode to be available via http.

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

(async) migrateConfirmed(wid) → {Promise}

Migrate confirmed transactions.

Parameters:
Name Type Description
wid Number
Source:
Returns:
Type
Promise

(async) migrateHeaders() → {Promise}

Migrate headers in the walletdb. Add time entry.

Source:
Returns:
Type
Promise

(async) migrateTX(bucket, wid, txHash, blockopt, extraopt) → {Promise}

Migrate specific transaction. Index by count and time.

Parameters:
Name Type Attributes Description
bucket Bucket
wid Number
txHash Hash

txhash.

block Object <optional>
Properties
Name Type Description
height Number
time Number
extra BlockExtraInfo <optional>
Source:
Returns:
Type
Promise

(async) migrateUnconfirmed(wid) → {Promise}

Migrate unconfirmed transactions.

Parameters:
Name Type Description
wid Number
Source:
Returns:
Type
Promise

(async) verifyTimeEntries(wid) → {Promise}

Verify time entries have been removed.

Parameters:
Name Type Description
wid Number
Source:
Returns:
Type
Promise