channel+cnct: remove preimage from channel and resolution
Now that the success resolver preimage field is always populated by the incoming contest resolver, preimage lookups earlier in the process (channel and channel arbitrator) can mostly be removed.
This commit is contained in:
14 files changed
+53
-118
No files matched your search
@@ -10,7 +10,6 @@ import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/btcsuite/btcwallet/wallet/txauthor"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
)
|
||||
|
||||
// AddressType is an enum-like type which denotes the possible address types
|
||||
@@ -294,21 +293,6 @@ type MessageSigner interface {
|
||||
SignMessage(pubKey *btcec.PublicKey, msg []byte) (*btcec.Signature, error)
|
||||
}
|
||||
|
||||
// PreimageCache is an interface that represents a global cache for preimages.
|
||||
// We'll utilize this cache to communicate the discovery of new preimages
|
||||
// across sub-systems.
|
||||
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 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.
|
||||
AddPreimages(preimages ...lntypes.Preimage) error
|
||||
}
|
||||
|
||||
// WalletDriver represents a "driver" for a particular concrete
|
||||
// WalletController implementation. A driver is identified by a globally unique
|
||||
// string identifier along with a 'New()' method which is responsible for
|
||||
|
||||
Reference in new issue
Block a user