@hyperbridge/sdk 2.8.5 → 2.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8002,7 +8002,15 @@ var IntentsCoprocessor = class _IntentsCoprocessor {
8002
8002
  if (!this.httpApi) {
8003
8003
  const httpUrl = deriveHttpUrl(this.wsEndpoint());
8004
8004
  const api$1 = new api.ApiPromise({
8005
- provider: new api.HttpProvider(httpUrl),
8005
+ // Response cache off (third argument, capacity 0). polkadot-js caches every request that
8006
+ // names a block hash — `chain_getHeader(hash)`, `state_getRuntimeVersion(hash)`, storage
8007
+ // reads at a hash — by storing the request promise itself, a rejected one included, for a
8008
+ // 30s TTL that every hit refreshes. The phantom poll retries the block it failed on with
8009
+ // identical parameters every tick, so one reset connection became the same rejection
8010
+ // replayed from memory on every tick, faster than the TTL could lapse, and the node never
8011
+ // saw a second request. The cache bought nothing here anyway: the poll reads each block
8012
+ // once, and `api.at(hash)` reuses registries at the api layer regardless.
8013
+ provider: new api.HttpProvider(httpUrl, {}, 0),
8006
8014
  typesBundle: HYPERBRIDGE_TYPES_BUNDLE,
8007
8015
  // A second connection to the node the ws api already reported on; its init warnings
8008
8016
  // would just be duplicates.