mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
lnwallet: remove DestAddresses from lnwallet
With `OutputDetail` now containing the destination addresses, the `DestAddresses` field can be removed from the `lnwallet.TransactionDetail`. It is already populated when needed for backwards compatibility to `lnrpc.TransactionDetail` via `OutputDetail.Addresses`.
This commit is contained in:
@@ -1023,7 +1023,6 @@ func minedTransactionsToDetails(
|
||||
isOurAddress[int(o.Index)] = true
|
||||
}
|
||||
|
||||
var destAddresses []btcutil.Address
|
||||
var outputDetails []lnwallet.OutputDetail
|
||||
for i, txOut := range wireTx.TxOut {
|
||||
var addresses []btcutil.Address
|
||||
@@ -1032,7 +1031,6 @@ func minedTransactionsToDetails(
|
||||
)
|
||||
if err == nil {
|
||||
// Add supported addresses.
|
||||
destAddresses = append(destAddresses, outAddresses...)
|
||||
addresses = outAddresses
|
||||
}
|
||||
|
||||
@@ -1053,7 +1051,6 @@ func minedTransactionsToDetails(
|
||||
BlockHeight: block.Height,
|
||||
Timestamp: block.Timestamp,
|
||||
TotalFees: int64(tx.Fee),
|
||||
DestAddresses: destAddresses,
|
||||
OutputDetails: outputDetails,
|
||||
RawTx: tx.Transaction,
|
||||
Label: tx.Label,
|
||||
@@ -1095,7 +1092,6 @@ func unminedTransactionsToDetail(
|
||||
isOurAddress[int(o.Index)] = true
|
||||
}
|
||||
|
||||
var destAddresses []btcutil.Address
|
||||
var outputDetails []lnwallet.OutputDetail
|
||||
for i, txOut := range wireTx.TxOut {
|
||||
var addresses []btcutil.Address
|
||||
@@ -1104,7 +1100,6 @@ func unminedTransactionsToDetail(
|
||||
)
|
||||
if err == nil {
|
||||
// Add supported addresses.
|
||||
destAddresses = append(destAddresses, outAddresses...)
|
||||
addresses = outAddresses
|
||||
}
|
||||
|
||||
@@ -1122,7 +1117,6 @@ func unminedTransactionsToDetail(
|
||||
Hash: *summary.Hash,
|
||||
TotalFees: int64(summary.Fee),
|
||||
Timestamp: summary.Timestamp,
|
||||
DestAddresses: destAddresses,
|
||||
OutputDetails: outputDetails,
|
||||
RawTx: summary.Transaction,
|
||||
Label: summary.Label,
|
||||
|
Reference in New Issue
Block a user