"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldFailImmediate = shouldFailImmediate;
const svm_1 = require("../../arch/svm");
function shouldFailImmediate(method, error) {
    if (!(0, svm_1.isSolanaError)(error)) {
        return false;
    }
    const { __code: code } = error.context;
    switch (method) {
        case "getBlock":
        case "getBlockTime":
            return [svm_1.SVM_SLOT_SKIPPED, svm_1.SVM_LONG_TERM_STORAGE_SLOT_SKIPPED].includes(code);
        case "sendTransaction":
            return code === svm_1.SVM_TRANSACTION_PREFLIGHT_FAILURE;
        default:
            return false;
    }
}
//# sourceMappingURL=utils.js.map