utxonursery: update serialization, API usage for recent SignDescriptor changes
This commit is contained in:
parent
07212588fc
commit
458138f6fa
@ -243,7 +243,7 @@ func (u *utxoNursery) reloadPreschool(heightHint uint32) error {
|
|||||||
// graduateMissedBlocks is called during the startup of the UTXO Nursery.
|
// graduateMissedBlocks is called during the startup of the UTXO Nursery.
|
||||||
func (u *utxoNursery) catchUpKindergarten(lastGraduatedHeight uint32) error {
|
func (u *utxoNursery) catchUpKindergarten(lastGraduatedHeight uint32) error {
|
||||||
// Get the most recently mined block
|
// Get the most recently mined block
|
||||||
_, bestHeight, err := u.wallet.ChainIO.GetBestBlock()
|
_, bestHeight, err := u.wallet.Cfg.ChainIO.GetBestBlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -823,7 +823,7 @@ func fetchGraduatingOutputs(db *channeldb.DB, wallet *lnwallet.LightningWallet,
|
|||||||
// output or not.
|
// output or not.
|
||||||
for _, kgtnOutput := range kgtnOutputs {
|
for _, kgtnOutput := range kgtnOutputs {
|
||||||
kgtnOutput.witnessFunc = kgtnOutput.witnessType.generateFunc(
|
kgtnOutput.witnessFunc = kgtnOutput.witnessType.generateFunc(
|
||||||
&wallet.Signer, kgtnOutput.signDescriptor,
|
&wallet.Cfg.Signer, kgtnOutput.signDescriptor,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1054,7 +1054,7 @@ func serializeKidOutput(w io.Writer, kid *kidOutput) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := wire.WriteVarBytes(w, 0, kid.signDescriptor.PrivateTweak); err != nil {
|
if err := wire.WriteVarBytes(w, 0, kid.signDescriptor.SingleTweak); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1124,7 +1124,7 @@ func deserializeKidOutput(r io.Reader) (*kidOutput, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
kid.signDescriptor.PrivateTweak = descPrivateTweak
|
kid.signDescriptor.SingleTweak = descPrivateTweak
|
||||||
|
|
||||||
descWitnessScript, err := wire.ReadVarBytes(r, 0, 100, "witnessScript")
|
descWitnessScript, err := wire.ReadVarBytes(r, 0, 100, "witnessScript")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -72,7 +72,7 @@ var (
|
|||||||
|
|
||||||
signDescriptors = []lnwallet.SignDescriptor{
|
signDescriptors = []lnwallet.SignDescriptor{
|
||||||
{
|
{
|
||||||
PrivateTweak: []byte{
|
SingleTweak: []byte{
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
@ -102,7 +102,7 @@ var (
|
|||||||
HashType: txscript.SigHashAll,
|
HashType: txscript.SigHashAll,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
PrivateTweak: []byte{
|
SingleTweak: []byte{
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
@ -132,7 +132,7 @@ var (
|
|||||||
HashType: txscript.SigHashAll,
|
HashType: txscript.SigHashAll,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
PrivateTweak: []byte{
|
SingleTweak: []byte{
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||||
|
Loading…
Reference in New Issue
Block a user