mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-19 20:25:51 +01:00
utxonursery: store the chanPoint of the source channel in kidOutput
This commit adds an additional field to the kidOutput struct: the outpoint of the channel that originally created the output. This field is now needed in order to add some additional indexes that are required to enable callers to query the internal state of the utxoNursery.
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
@@ -166,23 +165,29 @@ var (
|
||||
|
||||
kidOutputs = []kidOutput{
|
||||
{
|
||||
originChanPoint: outPoints[1],
|
||||
amt: btcutil.Amount(13e7),
|
||||
outPoint: outPoints[0],
|
||||
blocksToMaturity: uint32(100),
|
||||
witnessType: commitmentTimeLock,
|
||||
confHeight: uint32(1770001),
|
||||
},
|
||||
|
||||
{
|
||||
originChanPoint: outPoints[0],
|
||||
amt: btcutil.Amount(24e7),
|
||||
outPoint: outPoints[1],
|
||||
blocksToMaturity: uint32(50),
|
||||
witnessType: commitmentTimeLock,
|
||||
confHeight: uint32(22342321),
|
||||
},
|
||||
|
||||
{
|
||||
originChanPoint: outPoints[2],
|
||||
amt: btcutil.Amount(2e5),
|
||||
outPoint: outPoints[2],
|
||||
blocksToMaturity: uint32(12),
|
||||
witnessType: commitmentTimeLock,
|
||||
confHeight: uint32(34241),
|
||||
},
|
||||
}
|
||||
@@ -236,7 +241,7 @@ func TestSerializeKidOutput(t *testing.T) {
|
||||
|
||||
deserializedKid, err := deserializeKidOutput(&b)
|
||||
if err != nil {
|
||||
fmt.Printf(err.Error())
|
||||
t.Fatalf(err.Error())
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(kid, deserializedKid) {
|
||||
|
||||
Reference in New Issue
Block a user