- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for newSMT (0.25 sec)
-
pkg/ledger/smt_test.go
"istio.io/istio/pkg/cache" "istio.io/istio/pkg/test/util/assert" ) func TestSmtEmptyTrie(t *testing.T) { smt := newSMT(hasher, nil, time.Minute) if !bytes.Equal([]byte{}, smt.root) { t.Fatal("empty trie root hash not correct") } } func TestSmtUpdateAndGet(t *testing.T) { smt := newSMT(hasher, nil, time.Minute) smt.atomicUpdate = false // Add data to empty trie keys := getFreshData(10)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 08 16:43:05 UTC 2023 - 7.9K bytes - Viewed (0) -
pkg/ledger/ledger_test.go
"github.com/spaolacci/murmur3" "golang.org/x/sync/errgroup" "istio.io/istio/pkg/test/util/assert" ) func TestLongKeys(t *testing.T) { longKey := "virtual-service/frontend/default" l := smtLedger{tree: newSMT(hasher, nil, time.Minute)} _, err := l.Put(longKey+"1", "1") assert.NoError(t, err) _, err = l.Put(longKey+"2", "2") assert.NoError(t, err) res, err := l.Get(longKey + "1") assert.NoError(t, err)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jul 12 16:12:59 UTC 2023 - 4K bytes - Viewed (0) -
pkg/ledger/smt.go
// rollover, causing an immediate expiration (ironic, eh?) const forever time.Duration = 1<<(63-1) - 1 // newSMT creates a new smt given a keySize, hash function, cache (nil will be defaulted to TTLCache), and retention // duration for old nodes. func newSMT(hash func(data ...[]byte) []byte, updateCache cache.ExpiringCache, retentionDuration time.Duration) *smt { if updateCache == nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 08 16:43:05 UTC 2023 - 14K bytes - Viewed (0)