Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Use last irriversable block for transaction headers #599

@jcalfee

Description

@jcalfee

Version of EOSJS
v20

Describe the feature
In your options, you support: blocksBehind, consider adding lastIrriversableBlock: true

Expected behavior
This will lookup the block num and prefix from the last irreversible block (instead of blocks behind the head block) and use those values in the transaction TAPOS headers.

Additional context
The blocksBehind option is used to try and avoid casting transactions on short-lived forks (micro-forks). This is only a guess though, a fork could be longer than 3 blocks (example from the README). If you instead use the last irreversible block then you'll never try to create a transaction that is pointed to a fork.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions