From 173317e82da8ec49dd3e0ad948765d6a804c0aa9 Mon Sep 17 00:00:00 2001 From: scorpiotzh <835598264@qq.com> Date: Thu, 9 Nov 2023 12:16:05 +0800 Subject: [PATCH] feat: Update dp --- dascache/das_cache.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dascache/das_cache.go b/dascache/das_cache.go index ecdca65..d814ad7 100644 --- a/dascache/das_cache.go +++ b/dascache/das_cache.go @@ -39,6 +39,17 @@ func (d *DasCache) AddOutPoint(outPoint []string) { } } +func (d *DasCache) AddBlockOutPoint(outPoint []string) { + if len(outPoint) == 0 { + return + } + d.rw.Lock() + defer d.rw.Unlock() + for _, v := range outPoint { + d.mapOutPoint[v] = 0 + } +} + func (d *DasCache) clearExpiredOutPoint(t time.Duration) { d.rw.Lock() defer d.rw.Unlock()