Skip to content

Commit

Permalink
Dev/jgough/9419 LogID instead of TenantID (#172)
Browse files Browse the repository at this point in the history
* Move the trie key format to H(domain || logid || appid)

re: AB#9419

---------

Co-authored-by: jgough <[email protected]>
  • Loading branch information
honourfish and jgough authored May 7, 2024
1 parent 71beb07 commit bb9489e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mmrtesting/testgenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ type TestGeneratorConfig struct {
// carries just enough to successfully call AddLeafEntry on a MassifContext The
// leaf generator is free to decide on appropriate values
type AddLeafArgs struct {
Id uint64
AppIndex []byte
Value []byte
TenantId string
Id uint64
AppId []byte
Value []byte
LogId []byte
}

type LeafGenerator func(tenantIdentity string, base, i uint64) AddLeafArgs
Expand Down Expand Up @@ -90,10 +90,10 @@ func (g *TestGenerator) GenerateNumberedLeafBatch(tenantIdentity string, base, c
HashWriteUint64(h, base+i)
args := g.leafGenerator(tenantIdentity, base, i)
return AddLeafArgs{
Id: args.Id,
AppIndex: args.AppIndex,
Value: h.Sum(nil),
TenantId: tenantIdentity,
Id: args.Id,
AppId: args.AppId,
Value: h.Sum(nil),
LogId: []byte(tenantIdentity),
}
})
}
Expand Down

0 comments on commit bb9489e

Please sign in to comment.