Don't send back difficulty adjustment info
This commit is contained in:
parent
5f60cb821a
commit
edfbede704
@ -211,6 +211,7 @@ class WebsocketHandler {
|
|||||||
if (!_blocks) {
|
if (!_blocks) {
|
||||||
_blocks = blocks.getBlocks().slice(-config.MEMPOOL.INITIAL_BLOCKS_AMOUNT);
|
_blocks = blocks.getBlocks().slice(-config.MEMPOOL.INITIAL_BLOCKS_AMOUNT);
|
||||||
}
|
}
|
||||||
|
const da = difficultyAdjustment.getDifficultyAdjustment();
|
||||||
return {
|
return {
|
||||||
'mempoolInfo': memPool.getMempoolInfo(),
|
'mempoolInfo': memPool.getMempoolInfo(),
|
||||||
'vBytesPerSecond': memPool.getVBytesPerSecond(),
|
'vBytesPerSecond': memPool.getVBytesPerSecond(),
|
||||||
@ -220,7 +221,7 @@ class WebsocketHandler {
|
|||||||
'transactions': memPool.getLatestTransactions(),
|
'transactions': memPool.getLatestTransactions(),
|
||||||
'backendInfo': backendInfo.getBackendInfo(),
|
'backendInfo': backendInfo.getBackendInfo(),
|
||||||
'loadingIndicators': loadingIndicators.getLoadingIndicators(),
|
'loadingIndicators': loadingIndicators.getLoadingIndicators(),
|
||||||
'da': difficultyAdjustment.getDifficultyAdjustment(),
|
'da': da?.previousTime ? da : undefined,
|
||||||
'fees': feeApi.getRecommendedFee(),
|
'fees': feeApi.getRecommendedFee(),
|
||||||
...this.extraInitProperties
|
...this.extraInitProperties
|
||||||
};
|
};
|
||||||
@ -278,7 +279,9 @@ class WebsocketHandler {
|
|||||||
response['mempoolInfo'] = mempoolInfo;
|
response['mempoolInfo'] = mempoolInfo;
|
||||||
response['vBytesPerSecond'] = vBytesPerSecond;
|
response['vBytesPerSecond'] = vBytesPerSecond;
|
||||||
response['transactions'] = newTransactions.slice(0, 6).map((tx) => Common.stripTransaction(tx));
|
response['transactions'] = newTransactions.slice(0, 6).map((tx) => Common.stripTransaction(tx));
|
||||||
response['da'] = da;
|
if (da?.previousTime) {
|
||||||
|
response['da'] = da;
|
||||||
|
}
|
||||||
response['fees'] = recommendedFees;
|
response['fees'] = recommendedFees;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,7 +508,7 @@ class WebsocketHandler {
|
|||||||
const response = {
|
const response = {
|
||||||
'block': block,
|
'block': block,
|
||||||
'mempoolInfo': memPool.getMempoolInfo(),
|
'mempoolInfo': memPool.getMempoolInfo(),
|
||||||
'da': da,
|
'da': da?.previousTime ? da : undefined,
|
||||||
'fees': fees,
|
'fees': fees,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -309,9 +309,11 @@ export interface IDifficultyAdjustment {
|
|||||||
remainingBlocks: number;
|
remainingBlocks: number;
|
||||||
remainingTime: number;
|
remainingTime: number;
|
||||||
previousRetarget: number;
|
previousRetarget: number;
|
||||||
|
previousTime: number;
|
||||||
nextRetargetHeight: number;
|
nextRetargetHeight: number;
|
||||||
timeAvg: number;
|
timeAvg: number;
|
||||||
timeOffset: number;
|
timeOffset: number;
|
||||||
|
expectedBlocks: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IndexedDifficultyAdjustment {
|
export interface IndexedDifficultyAdjustment {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user