@atomiqlabs/chain-starknet 7.0.21 → 7.0.23
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.
|
@@ -62,9 +62,9 @@ class StarknetBtcRelay extends StarknetContractBase_1.StarknetContractBase {
|
|
|
62
62
|
}
|
|
63
63
|
constructor(chainInterface, bitcoinRpc, bitcoinNetwork, contractAddress = btcRelayAddreses[bitcoinNetwork]) {
|
|
64
64
|
super(chainInterface, contractAddress, BtcRelayAbi_1.BtcRelayAbi);
|
|
65
|
-
this.maxHeadersPerTx =
|
|
66
|
-
this.maxForkHeadersPerTx =
|
|
67
|
-
this.maxShortForkHeadersPerTx =
|
|
65
|
+
this.maxHeadersPerTx = 40;
|
|
66
|
+
this.maxForkHeadersPerTx = 30;
|
|
67
|
+
this.maxShortForkHeadersPerTx = 40;
|
|
68
68
|
this.bitcoinRpc = bitcoinRpc;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -22,10 +22,9 @@ class StarknetBlocks extends StarknetModule_1.StarknetModule {
|
|
|
22
22
|
block: blockPromise,
|
|
23
23
|
timestamp
|
|
24
24
|
};
|
|
25
|
-
blockPromise.catch(
|
|
25
|
+
blockPromise.catch(() => {
|
|
26
26
|
if (this.blockCache[blockTagStr] != null && this.blockCache[blockTagStr].block === blockPromise)
|
|
27
27
|
delete this.blockCache[blockTagStr];
|
|
28
|
-
throw e;
|
|
29
28
|
});
|
|
30
29
|
return {
|
|
31
30
|
block: blockPromise,
|
package/package.json
CHANGED
|
@@ -93,9 +93,9 @@ export class StarknetBtcRelay<B extends BtcBlock>
|
|
|
93
93
|
|
|
94
94
|
bitcoinRpc: BitcoinRpc<B>;
|
|
95
95
|
|
|
96
|
-
readonly maxHeadersPerTx: number =
|
|
97
|
-
readonly maxForkHeadersPerTx: number =
|
|
98
|
-
readonly maxShortForkHeadersPerTx: number =
|
|
96
|
+
readonly maxHeadersPerTx: number = 40;
|
|
97
|
+
readonly maxForkHeadersPerTx: number = 30;
|
|
98
|
+
readonly maxShortForkHeadersPerTx: number = 40;
|
|
99
99
|
|
|
100
100
|
constructor(
|
|
101
101
|
chainInterface: StarknetChainInterface,
|
|
@@ -33,10 +33,9 @@ export class StarknetBlocks extends StarknetModule {
|
|
|
33
33
|
block: blockPromise,
|
|
34
34
|
timestamp
|
|
35
35
|
};
|
|
36
|
-
blockPromise.catch(
|
|
36
|
+
blockPromise.catch(() => {
|
|
37
37
|
if(this.blockCache[blockTagStr]!=null && this.blockCache[blockTagStr].block===blockPromise) delete this.blockCache[blockTagStr];
|
|
38
|
-
|
|
39
|
-
})
|
|
38
|
+
});
|
|
40
39
|
return {
|
|
41
40
|
block: blockPromise,
|
|
42
41
|
timestamp
|