File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1157,7 +1157,13 @@ func fetchFinalHtlcsBucketRw(tx kvdb.RwTx,
1157
1157
func (c * OpenChannel ) fullSync (tx kvdb.RwTx ) error {
1158
1158
// Fetch the outpoint bucket and check if the outpoint already exists.
1159
1159
opBucket := tx .ReadWriteBucket (outpointBucket )
1160
+ if opBucket == nil {
1161
+ return ErrNoChanDBExists
1162
+ }
1160
1163
cidBucket := tx .ReadWriteBucket (chanIDBucket )
1164
+ if cidBucket == nil {
1165
+ return ErrNoChanDBExists
1166
+ }
1161
1167
1162
1168
var chanPointBuf bytes.Buffer
1163
1169
if err := writeOutpoint (& chanPointBuf , & c .FundingOutpoint ); err != nil {
@@ -3513,6 +3519,9 @@ func (c *OpenChannel) CloseChannel(summary *ChannelCloseSummary,
3513
3519
// Fetch the outpoint bucket to see if the outpoint exists or
3514
3520
// not.
3515
3521
opBucket := tx .ReadWriteBucket (outpointBucket )
3522
+ if opBucket == nil {
3523
+ return ErrNoChanDBExists
3524
+ }
3516
3525
3517
3526
// Add the closed outpoint to our outpoint index. This should
3518
3527
// replace an open outpoint in the index.
You can’t perform that action at this time.
0 commit comments