cnct+lnwl+hswc: use lntypes.Preimage for witness beacon

This commit is contained in:
Conner Fromknecht committed 2019-02-19 17:06:00 -08:00
1 parent 2d8bc99d9e
commit 29f07a58cb
16 files changed
+126 -114

No files matched your search

+3 -5
View File
@@ -9,6 +9,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/lntypes"
)
// AddressType is an enum-like type which denotes the possible address types
@@ -272,15 +273,12 @@ type PreimageCache interface {
// LookupPreimage attempts to look up a preimage according to its hash.
// If found, the preimage is returned along with true for the second
// argument. Otherwise, it'll return false.
LookupPreimage(hash []byte) ([]byte, bool)
LookupPreimage(hash lntypes.Hash) (lntypes.Preimage, bool)
// AddPreimages adds a batch of newly discovered preimages to the global
// cache, and also signals any subscribers of the newly discovered
// witness.
//
// NOTE: The backing slice of MUST NOT be modified, otherwise the
// subscribers may be notified of the incorrect preimages.
AddPreimages(preimages ...[]byte) error
AddPreimages(preimages ...lntypes.Preimage) error
}
// WalletDriver represents a "driver" for a particular concrete