@atomiqlabs/chain-solana
Advanced tools
Comparing version 7.3.2 to 7.3.3
@@ -433,11 +433,15 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const tipData = yield this.getTipData(); | ||
const currBlockheight = tipData.blockheight; | ||
const blockheightDelta = requiredBlockheight - currBlockheight; | ||
if (blockheightDelta <= 0) | ||
return new BN(0); | ||
const synchronizationFee = new BN(blockheightDelta).mul(yield this.getFeePerBlock(feeRate)); | ||
this.logger.debug("estimateSynchronizeFee(): required blockheight: " + requiredBlockheight + | ||
" blockheight delta: " + blockheightDelta + " fee: " + synchronizationFee.toString(10)); | ||
return synchronizationFee; | ||
// const tipData = await this.getTipData(); | ||
// const currBlockheight = tipData.blockheight; | ||
// | ||
// const blockheightDelta = requiredBlockheight-currBlockheight; | ||
// | ||
// if(blockheightDelta<=0) return new BN(0); | ||
// | ||
// const synchronizationFee = new BN(blockheightDelta).mul(await this.getFeePerBlock(feeRate)); | ||
// this.logger.debug("estimateSynchronizeFee(): required blockheight: "+requiredBlockheight+ | ||
// " blockheight delta: "+blockheightDelta+" fee: "+synchronizationFee.toString(10)); | ||
// | ||
// return synchronizationFee; | ||
return new BN(5000000); | ||
}); | ||
@@ -444,0 +448,0 @@ } |
{ | ||
"name": "@atomiqlabs/chain-solana", | ||
"version": "7.3.2", | ||
"version": "7.3.3", | ||
"description": "Solana specific base implementation", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -544,14 +544,15 @@ import {AnchorProvider} from "@coral-xyz/anchor"; | ||
public async estimateSynchronizeFee(requiredBlockheight: number, feeRate?: string): Promise<BN> { | ||
const tipData = await this.getTipData(); | ||
const currBlockheight = tipData.blockheight; | ||
const blockheightDelta = requiredBlockheight-currBlockheight; | ||
if(blockheightDelta<=0) return new BN(0); | ||
const synchronizationFee = new BN(blockheightDelta).mul(await this.getFeePerBlock(feeRate)); | ||
this.logger.debug("estimateSynchronizeFee(): required blockheight: "+requiredBlockheight+ | ||
" blockheight delta: "+blockheightDelta+" fee: "+synchronizationFee.toString(10)); | ||
return synchronizationFee; | ||
// const tipData = await this.getTipData(); | ||
// const currBlockheight = tipData.blockheight; | ||
// | ||
// const blockheightDelta = requiredBlockheight-currBlockheight; | ||
// | ||
// if(blockheightDelta<=0) return new BN(0); | ||
// | ||
// const synchronizationFee = new BN(blockheightDelta).mul(await this.getFeePerBlock(feeRate)); | ||
// this.logger.debug("estimateSynchronizeFee(): required blockheight: "+requiredBlockheight+ | ||
// " blockheight delta: "+blockheightDelta+" fee: "+synchronizationFee.toString(10)); | ||
// | ||
// return synchronizationFee; | ||
return new BN(5000000); | ||
} | ||
@@ -558,0 +559,0 @@ |
780333
19995