crypto-aio / crypto-aio/testing / FakeEndpointOptions
Interface: FakeEndpointOptions ​
Defined in: src/testing/fake-chain.ts:60
How one fake endpoint misbehaves; every option can be changed while a test runs.
Properties ​
acceptThenFail? ​
optionalacceptThenFail?:boolean
Defined in: src/testing/fake-chain.ts:72
Accepts the next broadcast, then answers it with HTTP 504 (an ambiguous send).
down? ​
optionaldown?:boolean
Defined in: src/testing/fake-chain.ts:68
Answers every request with HTTP 503.
forkAbove? ​
optionalforkAbove?:number
Defined in: src/testing/fake-chain.ts:83
A single endpoint lying about blocks: above this height its block reads (fake_getBlock, fake_getBlockHash) serve a private fork, with other hashes and none of the chain's transactions, and fake_getTransaction does not see transactions mined there. Heights, nonces, balances and finality stay honest.
forkFinalized? ​
optionalforkFinalized?:boolean
Defined in: src/testing/fake-chain.ts:76
Serves another finalized block hash, and no finalized transactions.
html? ​
optionalhtml?:boolean
Defined in: src/testing/fake-chain.ts:70
Answers every request with an HTML page and HTTP 200.
identity? ​
optionalidentity?:string
Defined in: src/testing/fake-chain.ts:64
The chain id it answers, to test a misconfigured endpoint.
lag? ​
optionallag?:number
Defined in: src/testing/fake-chain.ts:62
Blocks it stays behind the head.
refuseNext? ​
optionalrefuseNext?:string
Defined in: src/testing/fake-chain.ts:74
Refuses the next broadcast with this message.
seesMempool? ​
optionalseesMempool?:boolean
Defined in: src/testing/fake-chain.ts:66
Whether it sees the mempool (default true).