minor fix
This commit is contained in:
parent
8d260d7478
commit
90c2f9dbe2
@ -40,7 +40,7 @@ type bcastDict struct {
|
||||
}
|
||||
|
||||
func (bd *bcastDict) load(key []byte) (*blksInfo, bool) {
|
||||
v, ok := bd.m.Load(key)
|
||||
v, ok := bd.m.Load(string(key))
|
||||
if !ok {
|
||||
return nil, ok
|
||||
}
|
||||
@ -48,11 +48,11 @@ func (bd *bcastDict) load(key []byte) (*blksInfo, bool) {
|
||||
}
|
||||
|
||||
func (bd *bcastDict) store(key []byte, d *blksInfo) {
|
||||
bd.m.Store(key, d)
|
||||
bd.m.Store(string(key), d)
|
||||
}
|
||||
|
||||
func (bd *bcastDict) blkLen(key []byte) int {
|
||||
v, ok := bd.m.Load(key)
|
||||
v, ok := bd.m.Load(string(key))
|
||||
if !ok {
|
||||
return 0
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ func testSimpleDelivery(t *testing.T, cb *bcast.ConsistentBCast, epoch abi.Chain
|
||||
|
||||
func TestSeveralEpochs(t *testing.T) {
|
||||
cb := bcast.NewConsistentBCast(TEST_DELAY)
|
||||
numEpochs := 5
|
||||
numEpochs := 6
|
||||
wg := new(sync.WaitGroup)
|
||||
wg.Add(numEpochs)
|
||||
for i := 0; i < numEpochs; i++ {
|
||||
@ -83,7 +83,7 @@ func TestSeveralEpochs(t *testing.T) {
|
||||
}(i)
|
||||
}
|
||||
wg.Wait()
|
||||
require.Equal(t, cb.Len(), bcast.GcLookback)
|
||||
require.Equal(t, cb.Len(), numEpochs)
|
||||
}
|
||||
|
||||
// bias is expected to be 0-1
|
||||
|
Loading…
Reference in New Issue
Block a user