• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

razor-network / oracle-node / 10882594019

16 Sep 2024 05:47AM UTC coverage: 80.604% (+0.1%) from 80.5%
10882594019

push

github

web-flow
Releases/v1.2.0 (#1236)

* chore: merge develop to releases/v1.2.0 (#1227)

* feat: Github Migration  (#1146)

* feat: migrate to github actions

* chore: migrate from circle ci

* Update develop.yml (#1148)

* Update develop.yml (#1149)

* Update develop.yml

* Update develop.yml

* Update develop.yml

* Fix go mod tidy

* Replaced curve instance elliptic.P256() with crypto.S256() (#1150)

* fix: Update Dockerfile with version bumps (#1152)

* chore: hotfix missing workflow

* chore: fix dockerfile versions

* Feature/v1.1.0 (#1154)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDi... (continued)

887 of 1091 new or added lines in 40 files covered. (81.3%)

22 existing lines in 6 files now uncovered.

6641 of 8239 relevant lines covered (80.6%)

2524.53 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

68.42
/cache/collectionsCache.go
1
package cache
2

3
import (
4
        "razor/pkg/bindings"
5
        "sync"
6
)
7

8
// CollectionsCache struct to hold collection cache and associated mutex
9
type CollectionsCache struct {
10
        Collections map[uint16]bindings.StructsCollection
11
        Mu          sync.RWMutex
12
}
13

14
// NewCollectionsCache creates a new instance of CollectionsCache
15
func NewCollectionsCache() *CollectionsCache {
13✔
16
        return &CollectionsCache{
13✔
17
                Collections: make(map[uint16]bindings.StructsCollection),
13✔
18
                Mu:          sync.RWMutex{},
13✔
19
        }
13✔
20
}
13✔
21

22
func (c *CollectionsCache) GetCollection(collectionId uint16) (bindings.StructsCollection, bool) {
3✔
23
        c.Mu.RLock()
3✔
24
        defer c.Mu.RUnlock()
3✔
25

3✔
26
        collection, exists := c.Collections[collectionId]
3✔
27
        return collection, exists
3✔
28
}
3✔
29

NEW
30
func (c *CollectionsCache) UpdateCollection(collectionId uint16, updatedCollection bindings.StructsCollection) {
×
NEW
31
        c.Mu.Lock()
×
NEW
32
        defer c.Mu.Unlock()
×
NEW
33

×
NEW
34
        c.Collections[collectionId] = updatedCollection
×
NEW
35
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc