Skip to content

Commit

Permalink
fix: assign to nil map
Browse files Browse the repository at this point in the history
  • Loading branch information
gazenw committed Jun 10, 2024
1 parent 5eb2380 commit 0172f03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/brc20/processor_inscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ func (p *Processor) updateInscriptionLocation(ctx context.Context, newSatPoint o
p.newInscriptionEntryStates[entry.Id] = entry

// add new transfer to transfersInOutPoints cache
if _, ok := transfersInOutPoints[newSatPoint.OutPoint]; !ok {
transfersInOutPoints[newSatPoint.OutPoint] = make(map[ordinals.SatPoint][]*entity.InscriptionTransfer)
}
transfersInOutPoints[newSatPoint.OutPoint][newSatPoint] = append(transfersInOutPoints[newSatPoint.OutPoint][newSatPoint], transfer)
return nil
}
Expand Down Expand Up @@ -362,6 +365,9 @@ func (p *Processor) updateInscriptionLocation(ctx context.Context, newSatPoint o
p.newInscriptionEntryStates[entry.Id] = entry

// add new transfer to transfersInOutPoints cache
if _, ok := transfersInOutPoints[newSatPoint.OutPoint]; !ok {
transfersInOutPoints[newSatPoint.OutPoint] = make(map[ordinals.SatPoint][]*entity.InscriptionTransfer)
}
transfersInOutPoints[newSatPoint.OutPoint][newSatPoint] = append(transfersInOutPoints[newSatPoint.OutPoint][newSatPoint], transfer)
return nil
}
Expand Down

0 comments on commit 0172f03

Please sign in to comment.