Fix amt bug
This commit is contained in:
parent
c544c2b5c5
commit
d5027bfbb2
@ -29,7 +29,7 @@ type StateTree struct {
|
|||||||
|
|
||||||
func NewStateTree(cst cbor.IpldStore) (*StateTree, error) {
|
func NewStateTree(cst cbor.IpldStore) (*StateTree, error) {
|
||||||
return &StateTree{
|
return &StateTree{
|
||||||
root: hamt.NewNode(cst),
|
root: hamt.NewNode(cst, hamt.UseTreeBitWidth(5)),
|
||||||
Store: cst,
|
Store: cst,
|
||||||
actorcache: make(map[address.Address]*types.Actor),
|
actorcache: make(map[address.Address]*types.Actor),
|
||||||
}, nil
|
}, nil
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/filecoin-project/specs-actors/actors/abi/big"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -311,9 +312,12 @@ func mergeGenMiners(a, b genesis.Miner) genesis.Miner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return genesis.Miner{
|
return genesis.Miner{
|
||||||
Owner: a.Owner,
|
Owner: a.Owner,
|
||||||
Worker: a.Worker,
|
Worker: a.Worker,
|
||||||
SectorSize: a.SectorSize,
|
PeerId: "",
|
||||||
Sectors: append(a.Sectors, b.Sectors...),
|
MarketBalance: big.Zero(),
|
||||||
|
PowerBalance: big.Zero(),
|
||||||
|
SectorSize: a.SectorSize,
|
||||||
|
Sectors: append(a.Sectors, b.Sectors...),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,12 +107,13 @@ func PreSeal(maddr address.Address, ssize abi.SectorSize, offset abi.SectorNumbe
|
|||||||
}
|
}
|
||||||
|
|
||||||
miner := &genesis.Miner{
|
miner := &genesis.Miner{
|
||||||
Owner: minerAddr.Address,
|
Owner: minerAddr.Address,
|
||||||
Worker: minerAddr.Address,
|
Worker: minerAddr.Address,
|
||||||
|
PeerId: "",
|
||||||
SectorSize: ssize,
|
MarketBalance: big.Zero(),
|
||||||
|
PowerBalance: big.Zero(),
|
||||||
Sectors: sealedSectors,
|
SectorSize: ssize,
|
||||||
|
Sectors: sealedSectors,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := createDeals(miner, minerAddr, maddr, ssize); err != nil {
|
if err := createDeals(miner, minerAddr, maddr, ssize); err != nil {
|
||||||
|
2
go.mod
2
go.mod
@ -23,7 +23,7 @@ require (
|
|||||||
github.com/filecoin-project/go-paramfetch v0.0.1
|
github.com/filecoin-project/go-paramfetch v0.0.1
|
||||||
github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200210220012-eb75ec747d6b
|
github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200210220012-eb75ec747d6b
|
||||||
github.com/filecoin-project/go-statestore v0.1.0
|
github.com/filecoin-project/go-statestore v0.1.0
|
||||||
github.com/filecoin-project/specs-actors v0.0.0-20200212234534-e2abd13ec4b1
|
github.com/filecoin-project/specs-actors v0.0.0-20200214164743-74b45ccaaff9
|
||||||
github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1
|
github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1
|
||||||
github.com/go-ole/go-ole v1.2.4 // indirect
|
github.com/go-ole/go-ole v1.2.4 // indirect
|
||||||
github.com/gorilla/mux v1.7.3
|
github.com/gorilla/mux v1.7.3
|
||||||
|
2
go.sum
2
go.sum
@ -128,6 +128,8 @@ github.com/filecoin-project/specs-actors v0.0.0-20200211202147-e5d0a86dd8fb h1:6
|
|||||||
github.com/filecoin-project/specs-actors v0.0.0-20200211202147-e5d0a86dd8fb/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
github.com/filecoin-project/specs-actors v0.0.0-20200211202147-e5d0a86dd8fb/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
||||||
github.com/filecoin-project/specs-actors v0.0.0-20200212234534-e2abd13ec4b1 h1:jU0PeLjpsrvDBhVyzVgupcwicSioVvXWreN0NMhuMN0=
|
github.com/filecoin-project/specs-actors v0.0.0-20200212234534-e2abd13ec4b1 h1:jU0PeLjpsrvDBhVyzVgupcwicSioVvXWreN0NMhuMN0=
|
||||||
github.com/filecoin-project/specs-actors v0.0.0-20200212234534-e2abd13ec4b1/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
github.com/filecoin-project/specs-actors v0.0.0-20200212234534-e2abd13ec4b1/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
||||||
|
github.com/filecoin-project/specs-actors v0.0.0-20200214164743-74b45ccaaff9 h1:i6hLXvnse+C7DE2/1anKrlKahBFbusa066LG0K/v8KM=
|
||||||
|
github.com/filecoin-project/specs-actors v0.0.0-20200214164743-74b45ccaaff9/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
||||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0=
|
github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0=
|
||||||
|
Loading…
Reference in New Issue
Block a user