From ce8be70c741a26d6b03b47ba003e599fe49963ca Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 5 Nov 2015 12:34:11 -0800 Subject: [PATCH] add funding limbo to store pending channel opens --- wallet/wallet.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/wallet/wallet.go b/wallet/wallet.go index b7b8cb9e..1e4940f1 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -81,8 +81,12 @@ type LightningWallet struct { msgChan chan interface{} - //lockedInputs []*LockedPrevOut - //lockedOutputs []*LockedOutPoint + // TODO(roasbeef): zombie garbage collection routine to solve + // lost-object/starvation problem/attack. + limboMtx sync.RWMutex + nextFundingID uint64 // TODO(roasbeef): monotonic or random? + fundingLimbo map[uint64]*partialFundingState + keyPool *multiSigKeyPool started int32 @@ -93,6 +97,12 @@ type LightningWallet struct { wg sync.WaitGroup } +// NewLightningWallet... +// TODO(roasbeef): fin... +func NewLightningWallet() (*LightningWallet, error) { + return nil, nil +} + // Start... func (l *LightningWallet) Start() error { // Already started?