5e5a81bf23
* add go linter - "unused" * use _ to name unused but needed padding variable * remove unused code * add queue test to appease unused linter * remove unused code in test * remove unused func * remove unused struct identified by linter * remove unused variable * remove unused code * remove unused file * remove unused struct * remove unused function * remove unused observe peers function in raft * remove unused declareFaults function * annotate nolint:unused on needed methods
30 lines
726 B
Go
30 lines
726 B
Go
package types
|
|
|
|
import (
|
|
"github.com/ipfs/go-cid"
|
|
cbg "github.com/whyrusleeping/cbor-gen"
|
|
|
|
"github.com/filecoin-project/go-address"
|
|
|
|
"github.com/filecoin-project/lotus/chain/actors/aerrors"
|
|
)
|
|
|
|
type Storage interface {
|
|
Put(cbg.CBORMarshaler) (cid.Cid, aerrors.ActorError)
|
|
Get(cid.Cid, cbg.CBORUnmarshaler) aerrors.ActorError
|
|
|
|
GetHead() cid.Cid
|
|
|
|
// Commit sets the new head of the actors state as long as the current
|
|
// state matches 'oldh'
|
|
Commit(oldh cid.Cid, newh cid.Cid) aerrors.ActorError
|
|
}
|
|
|
|
type StateTree interface {
|
|
SetActor(addr address.Address, act *Actor) error
|
|
// GetActor returns the actor from any type of `addr` provided.
|
|
GetActor(addr address.Address) (*Actor, error)
|
|
|
|
Version() StateTreeVersion
|
|
}
|