is Blockhash Valid
Checks whether a blockhash is still recent enough to be accepted by the network.
isBlockhashValid checks whether a blockhash is still within the network's acceptance window, without tracking block heights independently.
A false result on a pending transaction's blockhash means no amount of waiting or rebroadcasting will help; only a new transaction with a fresh blockhash succeeds.
Parameters
params is a JSON array, with values in this order: blockhash, config.
The blockhash to check, base-58 encoded.
Optional configuration.
Show propertiesProperties
Bank state to check the blockhash against.
finalizedconfirmedprocessedMinimum slot the node must have processed before answering.
Result
Whether the blockhash is still valid, wrapped with context.
Show propertiesProperties
Show propertiesProperties
True if the blockhash is still recent enough to be accepted; false if it has expired.
Notes
- A blockhash is valid for about 150 blocks, roughly a minute, from when it was produced. Both examples use the same blockhash: the second call ran seconds after fetching it (
true), the first long enough later to have expired (false). - This says nothing about a transaction's status;
getSignatureStatuses, considered alongside it, informs whether to give up or resubmit.