utxonursery: update serialization, API usage for recent SignDescriptor changes

This commit is contained in:
Olaoluwa Osuntokun 2017-07-30 15:54:22 -07:00
parent 07212588fc
commit 458138f6fa
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
2 changed files with 7 additions and 7 deletions

View File

@ -243,7 +243,7 @@ func (u *utxoNursery) reloadPreschool(heightHint uint32) error {
// graduateMissedBlocks is called during the startup of the UTXO Nursery.
func (u *utxoNursery) catchUpKindergarten(lastGraduatedHeight uint32) error {
// Get the most recently mined block
_, bestHeight, err := u.wallet.ChainIO.GetBestBlock()
_, bestHeight, err := u.wallet.Cfg.ChainIO.GetBestBlock()
if err != nil {
return err
}
@ -823,7 +823,7 @@ func fetchGraduatingOutputs(db *channeldb.DB, wallet *lnwallet.LightningWallet,
// output or not.
for _, kgtnOutput := range kgtnOutputs {
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
}
if err := wire.WriteVarBytes(w, 0, kid.signDescriptor.PrivateTweak); err != nil {
if err := wire.WriteVarBytes(w, 0, kid.signDescriptor.SingleTweak); err != nil {
return err
}
@ -1124,7 +1124,7 @@ func deserializeKidOutput(r io.Reader) (*kidOutput, error) {
if err != nil {
return nil, err
}
kid.signDescriptor.PrivateTweak = descPrivateTweak
kid.signDescriptor.SingleTweak = descPrivateTweak
descWitnessScript, err := wire.ReadVarBytes(r, 0, 100, "witnessScript")
if err != nil {

View File

@ -72,7 +72,7 @@ var (
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,
@ -102,7 +102,7 @@ var (
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,
@ -132,7 +132,7 @@ var (
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,