lnwallet+channeldb: update callers to shachain API changes
This commit is contained in:
5 files changed
+28
-31
No files matched your search
+1
-1
@@ -1658,7 +1658,7 @@ func (lc *LightningChannel) ReceiveRevocation(revMsg *lnwire.RevokeAndAck) ([]*P
|
||||
// Ensure that the new pre-image can be placed in preimage store.
|
||||
// TODO(rosbeef): abstract into func
|
||||
store := lc.channelState.RevocationStore
|
||||
if err := store.Store(&pendingRevocation); err != nil {
|
||||
if err := store.AddNextEntry(&pendingRevocation); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ func createTestChannels(revocationWindow int) (*LightningChannel, *LightningChan
|
||||
fundingTxIn := wire.NewTxIn(prevOut, nil, nil)
|
||||
|
||||
bobRoot := deriveRevocationRoot(bobKeyPriv, bobKeyPub, aliceKeyPub)
|
||||
bobPreimageProducer := shachain.NewRevocationProducer(bobRoot)
|
||||
bobPreimageProducer := shachain.NewRevocationProducer(*bobRoot)
|
||||
bobFirstRevoke, err := bobPreimageProducer.AtIndex(0)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
@@ -211,7 +211,7 @@ func createTestChannels(revocationWindow int) (*LightningChannel, *LightningChan
|
||||
bobRevokeKey := DeriveRevocationPubkey(aliceKeyPub, bobFirstRevoke[:])
|
||||
|
||||
aliceRoot := deriveRevocationRoot(aliceKeyPriv, aliceKeyPub, bobKeyPub)
|
||||
alicePreimageProducer := shachain.NewRevocationProducer(aliceRoot)
|
||||
alicePreimageProducer := shachain.NewRevocationProducer(*aliceRoot)
|
||||
aliceFirstRevoke, err := alicePreimageProducer.AtIndex(0)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
|
||||
+2
-2
@@ -762,7 +762,7 @@ func (l *LightningWallet) handleContributionMsg(req *addContributionMsg) {
|
||||
// key for the first version of our commitment transaction. To do so,
|
||||
// we'll first create our root, then produce the first pre-image.
|
||||
root := deriveRevocationRoot(masterElkremRoot, ourKey, theirKey)
|
||||
producer := shachain.NewRevocationProducer(root)
|
||||
producer := shachain.NewRevocationProducer(*root)
|
||||
pendingReservation.partialState.RevocationProducer = producer
|
||||
firstPreimage, err := producer.AtIndex(0)
|
||||
if err != nil {
|
||||
@@ -901,7 +901,7 @@ func (l *LightningWallet) handleSingleContribution(req *addSingleContributionMsg
|
||||
// Now that we know their commitment key, we can create the revocation
|
||||
// key for our version of the initial commitment transaction.
|
||||
root := deriveRevocationRoot(masterElkremRoot, ourKey, theirKey)
|
||||
producer := shachain.NewRevocationProducer(root)
|
||||
producer := shachain.NewRevocationProducer(*root)
|
||||
firstPreimage, err := producer.AtIndex(0)
|
||||
if err != nil {
|
||||
req.err <- err
|
||||
|
||||
Reference in new issue
Block a user