Set hamt bitwidth

This commit is contained in:
Łukasz Magiera
2020-02-14 15:14:39 +01:00
parent 48c5494cf9
commit c544c2b5c5
13 changed files with 47 additions and 28 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ func resolveOnce(bs blockstore.Blockstore) func(ctx context.Context, ds ipld.Nod
if strings.HasPrefix(names[0], "@H:") {
cst := cbor.NewCborStore(bs)
h, err := hamt.LoadNode(ctx, cst, nd.Cid())
h, err := hamt.LoadNode(ctx, cst, nd.Cid(), hamt.UseTreeBitWidth(5))
if err != nil {
return nil, nil, xerrors.Errorf("resolving hamt link: %w", err)
}
+4 -4
View File
@@ -254,11 +254,11 @@ func (a *StateAPI) StateMarketParticipants(ctx context.Context, ts *types.TipSet
return nil, err
}
cst := cbor.NewCborStore(a.StateManager.ChainStore().Blockstore())
escrow, err := hamt.LoadNode(ctx, cst, state.EscrowTable)
escrow, err := hamt.LoadNode(ctx, cst, state.EscrowTable, hamt.UseTreeBitWidth(5)) // todo: adt map
if err != nil {
return nil, err
}
locked, err := hamt.LoadNode(ctx, cst, state.EscrowTable)
locked, err := hamt.LoadNode(ctx, cst, state.EscrowTable, hamt.UseTreeBitWidth(5))
if err != nil {
return nil, err
}
@@ -338,12 +338,12 @@ func (a *StateAPI) StateMarketStorageDeal(ctx context.Context, dealId abi.DealID
func (a *StateAPI) StateChangedActors(ctx context.Context, old cid.Cid, new cid.Cid) (map[string]types.Actor, error) {
cst := cbor.NewCborStore(a.Chain.Blockstore())
nh, err := hamt.LoadNode(ctx, cst, new)
nh, err := hamt.LoadNode(ctx, cst, new, hamt.UseTreeBitWidth(5))
if err != nil {
return nil, err
}
oh, err := hamt.LoadNode(ctx, cst, old)
oh, err := hamt.LoadNode(ctx, cst, old, hamt.UseTreeBitWidth(5))
if err != nil {
return nil, err
}