Skip to content

Commit

Permalink
blockchain: Remove unused trsy enabled param.
Browse files Browse the repository at this point in the history
This removes the isTreasuryEnabled paramter from the blockchain
getStakeBaseAmounts func since it is no longer used and updates the only
caller accordingly.
  • Loading branch information
davecgh committed Aug 25, 2023
1 parent 5365a7b commit ba7e40f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/blockchain/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3609,7 +3609,7 @@ func checkStakeBaseAmounts(subsidyCache *standalone.SubsidyCache, height int64,
// getStakeBaseAmounts calculates the total amount given as subsidy from the
// collective stakebase transactions (votes) within a block. This function
// skips a ton of checks already performed by CheckTransactionInputs.
func getStakeBaseAmounts(txs []*dcrutil.Tx, view *UtxoViewpoint, isTreasuryEnabled bool) (int64, error) {
func getStakeBaseAmounts(txs []*dcrutil.Tx, view *UtxoViewpoint) (int64, error) {
totalInputs := int64(0)
totalOutputs := int64(0)
for _, tx := range txs {
Expand Down Expand Up @@ -3812,7 +3812,7 @@ func (b *BlockChain) checkTransactionsAndConnect(inputFees dcrutil.Amount,
// mining the block. It is safe to ignore overflow and out of range
// errors here because those error conditions would have already been
// caught by the transaction sanity checks.
if !stakeTree { //TxTreeRegular
if !stakeTree { // TxTreeRegular
// Apply penalty to fees if we're at stake validation height.
if node.height >= b.chainParams.StakeValidationHeight {
totalFees *= int64(node.voters)
Expand Down Expand Up @@ -3900,8 +3900,7 @@ func (b *BlockChain) checkTransactionsAndConnect(inputFees dcrutil.Amount,
return err
}

totalAtomOutStake, err := getStakeBaseAmounts(txs, view,
isTreasuryEnabled)
totalAtomOutStake, err := getStakeBaseAmounts(txs, view)
if err != nil {
return err
}
Expand Down

0 comments on commit ba7e40f

Please sign in to comment.