Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ function endBlockFactory(
}, `${rsResponse.proposersPaidCount} masternodes were paid for epoch #${rsResponse.paidEpochIndex}`);
}

if (rsResponse.refundedEpochsCount) {
consensusLogger.debug({
currentEpochIndex,
refundedEpochsCount: rsResponse.refundedEpochsCount,
}, `${rsResponse.refundedEpochsCount} epochs were refunded`);
}

const consensusParamUpdates = await createConsensusParamUpdate(height, round, consensusLogger);

const validatorSetUpdate = await rotateAndCreateValidatorSetUpdate(
Expand Down
3 changes: 3 additions & 0 deletions packages/rs-drive-abci/src/abci/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ pub struct BlockEndResponse {
pub proposers_paid_count: Option<u16>,
/// Index of the last epoch that marked as paid
pub paid_epoch_index: Option<u16>,
/// A number of epochs which had refunded
pub refunded_epochs_count: Option<usize>,
}

impl BlockEndResponse {
Expand All @@ -136,6 +138,7 @@ impl BlockEndResponse {
Self {
proposers_paid_count,
paid_epoch_index,
refunded_epochs_count: process_block_fees_result.refunded_epochs_count,
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ mod tests {
proposer_payouts,
Some(ProposersPayouts {
proposers_paid_count: 50,
paid_epoch_index: 0
paid_epoch_index: 0,
})
));
}
Expand Down Expand Up @@ -611,7 +611,7 @@ mod tests {
proposer_payouts,
Some(ProposersPayouts {
proposers_paid_count: 100,
paid_epoch_index: 0
paid_epoch_index: 0,
})
));
}
Expand Down Expand Up @@ -713,7 +713,7 @@ mod tests {
proposer_payouts,
Some(ProposersPayouts {
proposers_paid_count: 150,
paid_epoch_index: 0
paid_epoch_index: 0,
})
));
}
Expand Down Expand Up @@ -875,7 +875,7 @@ mod tests {
proposer_payouts,
Some(ProposersPayouts {
proposers_paid_count: proposers_count,
paid_epoch_index: 0
paid_epoch_index: 0,
})
));

Expand Down
1 change: 1 addition & 0 deletions packages/rs-drive-nodejs/Drive.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ Drive.calculateStorageFeeDistributionAmountAndLeftovers = calculateStorageFeeDis
* @typedef BlockEndResponse
* @property {number} [proposersPaidCount]
* @property {number} [paidEpochIndex]
* @property {number} [refundedEpochsCount]
*/

/**
Expand Down
1 change: 1 addition & 0 deletions packages/rs-drive-nodejs/test/Drive.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ describe('Drive', () => {

expect(response).to.have.property('proposersPaidCount');
expect(response).to.have.property('paidEpochIndex');
expect(response).to.have.property('refundedEpochsCount');
});
});

Expand Down