Documentation
¶
Index ¶
- Constants
- func GasEstimateCallWithGas(ctx context.Context, cstore ChainStoreAPI, smgr StateManagerAPI, ...) (*api.InvocResult, []types.ChainMsg, *types.TipSet, error)
- func GasEstimateFeeCap(cstore ChainStoreAPI, msg *types.Message, maxqueueblks int64) (types.BigInt, error)
- func GasEstimateGasLimit(ctx context.Context, cstore ChainStoreAPI, smgr StateManagerAPI, ...) (int64, error)
- func GasEstimateGasPremium(ctx context.Context, cstore ChainStoreAPI, cache *GasPriceCache, ...) (types.BigInt, error)
- type ChainStoreAPI
- type GasMeta
- type GasPriceCache
- type MessagePoolAPI
- type StateManagerAPI
Constants ¶
View Source
const MaxSpendOnFeeDenom = 100
View Source
const MinGasPremium = 100e3
Variables ¶
This section is empty.
Functions ¶
func GasEstimateCallWithGas ¶
func GasEstimateCallWithGas( ctx context.Context, cstore ChainStoreAPI, smgr StateManagerAPI, mpool MessagePoolAPI, msgIn *types.Message, currTs *types.TipSet, ) (*api.InvocResult, []types.ChainMsg, *types.TipSet, error)
GasEstimateCallWithGas invokes a message "msgIn" on the earliest available tipset with pending messages in the message pool. The function returns the result of the message invocation, the pending messages, the tipset used for the invocation, and an error if occurred. The returned information can be used to make subsequent calls to CallWithGas with the same parameters.
func GasEstimateFeeCap ¶
func GasEstimateGasLimit ¶
func GasEstimateGasLimit( ctx context.Context, cstore ChainStoreAPI, smgr StateManagerAPI, mpool *messagepool.MessagePool, msgIn *types.Message, currTs *types.TipSet, ) (int64, error)
func GasEstimateGasPremium ¶
func GasEstimateGasPremium(ctx context.Context, cstore ChainStoreAPI, cache *GasPriceCache, nblocksincl uint64) (types.BigInt, error)
Types ¶
type ChainStoreAPI ¶
type ChainStoreAPI interface { GetHeaviestTipSet() *types.TipSet GetTipSetFromKey(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error) LoadTipSet(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error) MessagesForTipset(ctx context.Context, ts *types.TipSet) ([]types.ChainMsg, error) }
type GasPriceCache ¶
type GasPriceCache struct {
// contains filtered or unexported fields
}
func NewGasPriceCache ¶
func NewGasPriceCache() *GasPriceCache
func (*GasPriceCache) GetTSGasStats ¶
func (g *GasPriceCache) GetTSGasStats(ctx context.Context, cstore ChainStoreAPI, ts *types.TipSet) ([]GasMeta, error)
type MessagePoolAPI ¶
type StateManagerAPI ¶
type StateManagerAPI interface { ParentState(ts *types.TipSet) (*state.StateTree, error) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ts *types.TipSet, applyTsMessages bool) (*api.InvocResult, error) ResolveToDeterministicAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) }
Click to show internal directories.
Click to hide internal directories.