@atomiqlabs/chain-evm 1.0.0-dev.71 → 1.0.0-dev.72
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.
|
@@ -160,7 +160,7 @@ class EVMBtcRelay extends EVMContractBase_1.EVMContractBase {
|
|
|
160
160
|
const blockHashString = blockHash == null ? null : "0x" + Buffer.from([...blockHash]).reverse().toString("hex");
|
|
161
161
|
if (blockHashString != null && this.blockHashCache.has(blockHashString)) {
|
|
162
162
|
logger.debug("getBlock(): Returning block from block hash cache: ", blockHashString);
|
|
163
|
-
const storedBlockheader = this.blockHashCache.get(
|
|
163
|
+
const storedBlockheader = this.blockHashCache.get(blockHashString);
|
|
164
164
|
return Promise.resolve([storedBlockheader, storedBlockheader.getCommitHash()]);
|
|
165
165
|
}
|
|
166
166
|
return this.Events.findInContractEvents(["StoreHeader", "StoreForkHeader"], [
|
package/package.json
CHANGED
|
@@ -202,7 +202,7 @@ export class EVMBtcRelay<B extends BtcBlock>
|
|
|
202
202
|
const blockHashString = blockHash==null ? null : "0x"+Buffer.from([...blockHash]).reverse().toString("hex");
|
|
203
203
|
if(blockHashString!=null && this.blockHashCache.has(blockHashString)) {
|
|
204
204
|
logger.debug("getBlock(): Returning block from block hash cache: ", blockHashString);
|
|
205
|
-
const storedBlockheader = this.blockHashCache.get(
|
|
205
|
+
const storedBlockheader = this.blockHashCache.get(blockHashString);
|
|
206
206
|
return Promise.resolve([storedBlockheader, storedBlockheader.getCommitHash()]);
|
|
207
207
|
}
|
|
208
208
|
|