actors: fix miner constructor
This commit is contained in:
parent
4ad63d9b63
commit
3e4ebd6c9d
@ -94,6 +94,11 @@ func MakeInitialStateTree(ctx context.Context, bs bstore.Blockstore, template ge
|
|||||||
// Create empty state tree
|
// Create empty state tree
|
||||||
|
|
||||||
cst := cbor.NewCborStore(bs)
|
cst := cbor.NewCborStore(bs)
|
||||||
|
_, err := cst.Put(context.TODO(), []struct{}{})
|
||||||
|
if err != nil {
|
||||||
|
return nil, xerrors.Errorf("putting empty object: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
state, err := state.NewStateTree(cst)
|
state, err := state.NewStateTree(cst)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Errorf("making new state tree: %w", err)
|
return nil, xerrors.Errorf("making new state tree: %w", err)
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
cst := cbor.NewMemCborStore()
|
cst := cbor.NewMemCborStore()
|
||||||
emptyobject, err := cst.Put(context.TODO(), map[string]string{})
|
emptyobject, err := cst.Put(context.TODO(), []struct{}{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
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-20200217084223-58b973dc2c1f
|
github.com/filecoin-project/specs-actors v0.0.0-20200217171557-6190f3bd509b
|
||||||
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
@ -136,6 +136,8 @@ github.com/filecoin-project/specs-actors v0.0.0-20200217082309-eacd01300b6d h1:6
|
|||||||
github.com/filecoin-project/specs-actors v0.0.0-20200217082309-eacd01300b6d/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
github.com/filecoin-project/specs-actors v0.0.0-20200217082309-eacd01300b6d/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
||||||
github.com/filecoin-project/specs-actors v0.0.0-20200217084223-58b973dc2c1f h1:YGhskEZ/N8rKrU85BvUgRuubhykawibsNluzqZSosHE=
|
github.com/filecoin-project/specs-actors v0.0.0-20200217084223-58b973dc2c1f h1:YGhskEZ/N8rKrU85BvUgRuubhykawibsNluzqZSosHE=
|
||||||
github.com/filecoin-project/specs-actors v0.0.0-20200217084223-58b973dc2c1f/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
github.com/filecoin-project/specs-actors v0.0.0-20200217084223-58b973dc2c1f/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
|
||||||
|
github.com/filecoin-project/specs-actors v0.0.0-20200217171557-6190f3bd509b h1:7TpLVtW0BBiTacx4Vnjn8dX/Ahfl9gLl/XPHN5dxcig=
|
||||||
|
github.com/filecoin-project/specs-actors v0.0.0-20200217171557-6190f3bd509b/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