From 63419c187014987626417c1f5325d93c492606cd Mon Sep 17 00:00:00 2001 From: Andras Banki-Horvath Date: Tue, 14 Apr 2020 17:53:43 +0200 Subject: [PATCH] lnd: remove dead code from nursery_store --- nursery_store.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/nursery_store.go b/nursery_store.go index bc20d1bc..83f54067 100644 --- a/nursery_store.go +++ b/nursery_store.go @@ -1145,32 +1145,6 @@ func (ns *nurseryStore) createHeightChanBucket(tx kvdb.RwTx, return hghtBucket.CreateBucketIfNotExists(chanBytes) } -// getHeightChanBucket retrieves an existing height-channel bucket from the -// nursery store, using the provided block height and channel point. if the -// bucket does not exist, or any bucket along its path does not exist, a nil -// value is returned. -func (ns *nurseryStore) getHeightChanBucket(tx kvdb.ReadTx, // nolint:unused - height uint32, chanPoint *wire.OutPoint) kvdb.ReadBucket { - - // Retrieve the existing height bucket from this nursery store. - hghtBucket := ns.getHeightBucket(tx, height) - if hghtBucket == nil { - return nil - } - - // Serialize the provided channel point, which generates the key for - // looking up the proper height-channel bucket inside the height bucket. - var chanBuffer bytes.Buffer - if err := writeOutpoint(&chanBuffer, chanPoint); err != nil { - return nil - } - chanBytes := chanBuffer.Bytes() - - // Finally, return the height bucket specified by the serialized channel - // point. - return hghtBucket.NestedReadBucket(chanBytes) -} - // getHeightChanBucketWrite retrieves an existing height-channel bucket from the // nursery store, using the provided block height and channel point. if the // bucket does not exist, or any bucket along its path does not exist, a nil