utxonursery: remove unused report fields
This commit is contained in:
parent
9abe06f3c8
commit
288fc6f065
@ -494,9 +494,7 @@ func (u *utxoNursery) NurseryReport(
|
||||
utxnLog.Infof("NurseryReport: building nursery report for channel %v",
|
||||
chanPoint)
|
||||
|
||||
report := &contractMaturityReport{
|
||||
chanPoint: *chanPoint,
|
||||
}
|
||||
report := &contractMaturityReport{}
|
||||
|
||||
if err := u.cfg.Store.ForChanOutputs(chanPoint, func(k, v []byte) error {
|
||||
switch {
|
||||
@ -1051,10 +1049,6 @@ func (u *utxoNursery) waitForPreschoolConf(kid *kidOutput,
|
||||
// contractMaturityReport is a report that details the maturity progress of a
|
||||
// particular force closed contract.
|
||||
type contractMaturityReport struct {
|
||||
// chanPoint is the channel point of the original contract that is now
|
||||
// awaiting maturity within the utxoNursery.
|
||||
chanPoint wire.OutPoint
|
||||
|
||||
// limboBalance is the total number of frozen coins within this
|
||||
// contract.
|
||||
limboBalance btcutil.Amount
|
||||
@ -1063,16 +1057,6 @@ type contractMaturityReport struct {
|
||||
// back to the user's wallet.
|
||||
recoveredBalance btcutil.Amount
|
||||
|
||||
// localAmount is the local value of the commitment output.
|
||||
localAmount btcutil.Amount
|
||||
|
||||
// confHeight is the block height that this output originally confirmed.
|
||||
confHeight uint32
|
||||
|
||||
// maturityRequirement is the input age required for this output to
|
||||
// reach maturity.
|
||||
maturityRequirement uint32
|
||||
|
||||
// maturityHeight is the absolute block height that this output will
|
||||
// mature at.
|
||||
maturityHeight uint32
|
||||
@ -1090,13 +1074,6 @@ type htlcMaturityReport struct {
|
||||
// amount is the final value that will be swept in back to the wallet.
|
||||
amount btcutil.Amount
|
||||
|
||||
// confHeight is the block height that this output originally confirmed.
|
||||
confHeight uint32
|
||||
|
||||
// maturityRequirement is the input age required for this output to
|
||||
// reach maturity.
|
||||
maturityRequirement uint32
|
||||
|
||||
// maturityHeight is the absolute block height that this output will
|
||||
// mature at.
|
||||
maturityHeight uint32
|
||||
@ -1113,10 +1090,6 @@ type htlcMaturityReport struct {
|
||||
func (c *contractMaturityReport) AddLimboCommitment(kid *kidOutput) {
|
||||
c.limboBalance += kid.Amount()
|
||||
|
||||
c.localAmount += kid.Amount()
|
||||
c.confHeight = kid.ConfHeight()
|
||||
c.maturityRequirement = kid.BlocksToMaturity()
|
||||
|
||||
// If the confirmation height is set, then this means the contract has
|
||||
// been confirmed, and we know the final maturity height.
|
||||
if kid.ConfHeight() != 0 {
|
||||
@ -1129,9 +1102,6 @@ func (c *contractMaturityReport) AddLimboCommitment(kid *kidOutput) {
|
||||
func (c *contractMaturityReport) AddRecoveredCommitment(kid *kidOutput) {
|
||||
c.recoveredBalance += kid.Amount()
|
||||
|
||||
c.localAmount += kid.Amount()
|
||||
c.confHeight = kid.ConfHeight()
|
||||
c.maturityRequirement = kid.BlocksToMaturity()
|
||||
c.maturityHeight = kid.BlocksToMaturity() + kid.ConfHeight()
|
||||
}
|
||||
|
||||
@ -1144,7 +1114,6 @@ func (c *contractMaturityReport) AddLimboStage1TimeoutHtlc(baby *babyOutput) {
|
||||
c.htlcs = append(c.htlcs, htlcMaturityReport{
|
||||
outpoint: *baby.OutPoint(),
|
||||
amount: baby.Amount(),
|
||||
confHeight: baby.ConfHeight(),
|
||||
maturityHeight: baby.expiry,
|
||||
stage: 1,
|
||||
})
|
||||
@ -1159,7 +1128,6 @@ func (c *contractMaturityReport) AddLimboDirectHtlc(kid *kidOutput) {
|
||||
htlcReport := htlcMaturityReport{
|
||||
outpoint: *kid.OutPoint(),
|
||||
amount: kid.Amount(),
|
||||
confHeight: kid.ConfHeight(),
|
||||
maturityHeight: kid.absoluteMaturity,
|
||||
stage: 2,
|
||||
}
|
||||
@ -1176,8 +1144,6 @@ func (c *contractMaturityReport) AddLimboStage1SuccessHtlc(kid *kidOutput) {
|
||||
c.htlcs = append(c.htlcs, htlcMaturityReport{
|
||||
outpoint: *kid.OutPoint(),
|
||||
amount: kid.Amount(),
|
||||
confHeight: kid.ConfHeight(),
|
||||
maturityRequirement: kid.BlocksToMaturity(),
|
||||
stage: 1,
|
||||
})
|
||||
}
|
||||
@ -1190,8 +1156,6 @@ func (c *contractMaturityReport) AddLimboStage2Htlc(kid *kidOutput) {
|
||||
htlcReport := htlcMaturityReport{
|
||||
outpoint: *kid.OutPoint(),
|
||||
amount: kid.Amount(),
|
||||
confHeight: kid.ConfHeight(),
|
||||
maturityRequirement: kid.BlocksToMaturity(),
|
||||
stage: 2,
|
||||
}
|
||||
|
||||
@ -1213,8 +1177,6 @@ func (c *contractMaturityReport) AddRecoveredHtlc(kid *kidOutput) {
|
||||
c.htlcs = append(c.htlcs, htlcMaturityReport{
|
||||
outpoint: *kid.OutPoint(),
|
||||
amount: kid.Amount(),
|
||||
confHeight: kid.ConfHeight(),
|
||||
maturityRequirement: kid.BlocksToMaturity(),
|
||||
maturityHeight: kid.ConfHeight() + kid.BlocksToMaturity(),
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user