isBlockhashValid RPC-Methode

Gibt zurück, ob ein Blockhash noch gültig ist oder nicht

Versionseinschränkung

Diese Methode ist nur in solana-core v1.9 oder neuer verfügbar. Bitte verwenden Sie getFeeCalculatorForBlockhash für solana-core v1.8 und älter.

$ curl https://api.devnet.solana.com -s -X \
> POST -H "Content-Type: application/json" -d '
> {
> "jsonrpc": "2.0",
> "id": 45,
> "method": "isBlockhashValid",
> "params": [
> "J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW",
> {
> "commitment": "processed"
> }
> ]
> }
> '

params

stringrequired

Der Blockhash des zu bewertenden Blocks, als base-58 kodierte Zeichenfolge

objectoptional

Konfigurationsobjekt mit den folgenden Feldern:

result

Response
{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 2483 },
"value": false
},
"id": 45
}
bool

Ob der Blockhash noch gültig ist

Is this page helpful?