Remove unused var totalInputs

This commit is contained in:
Ori Newman 2022-10-02 15:33:49 +03:00
parent 46584fa65a
commit 2da22d6d14

View File

@ -74,8 +74,6 @@ func (btb *blockTemplateBuilder) selectTransactions(candidateTxs []*candidateTx)
usedP += candidateTx.p usedP += candidateTx.p
} }
totalInputs := 0
selectedTxs := make([]*candidateTx, 0) selectedTxs := make([]*candidateTx, 0)
for len(candidateTxs)-usedCount > 0 { for len(candidateTxs)-usedCount > 0 {
// Rebalance the candidates if it's required // Rebalance the candidates if it's required
@ -145,7 +143,6 @@ func (btb *blockTemplateBuilder) selectTransactions(candidateTxs []*candidateTx)
// save the masses, fees, and signature operation counts to the // save the masses, fees, and signature operation counts to the
// result. // result.
selectedTxs = append(selectedTxs, selectedTx) selectedTxs = append(selectedTxs, selectedTx)
totalInputs += len(selectedTx.Inputs)
txsForBlockTemplate.totalMass += selectedTx.Mass txsForBlockTemplate.totalMass += selectedTx.Mass
txsForBlockTemplate.totalFees += selectedTx.Fee txsForBlockTemplate.totalFees += selectedTx.Fee