Documentation ¶
Index ¶
- Constants
- Variables
- func Block(height int) (*ctypes.ResultBlock, error)
- func BlockResult(height int) (ctypes.TMResult, error)
- func BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error)
- func BlockchainInfoResult(min, max int) (ctypes.TMResult, error)
- func BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func BroadcastTxAsyncResult(tx []byte) (ctypes.TMResult, error)
- func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func BroadcastTxCommitResult(tx []byte) (ctypes.TMResult, error)
- func BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func BroadcastTxSyncResult(tx []byte) (ctypes.TMResult, error)
- func DialSeeds(seeds []string) (*ctypes.ResultDialSeeds, error)
- func DialSeedsResult(seeds []string) (ctypes.TMResult, error)
- func DumpConsensusState() (*ctypes.ResultDumpConsensusState, error)
- func DumpConsensusStateResult() (ctypes.TMResult, error)
- func Genesis() (*ctypes.ResultGenesis, error)
- func GenesisResult() (ctypes.TMResult, error)
- func NetInfo() (*ctypes.ResultNetInfo, error)
- func NetInfoResult() (ctypes.TMResult, error)
- func NumUnconfirmedTxs() (*ctypes.ResultUnconfirmedTxs, error)
- func NumUnconfirmedTxsResult() (ctypes.TMResult, error)
- func SetBlockStore(bs *bc.BlockStore)
- func SetConfig(c cfg.Config)
- func SetConsensusReactor(cr *consensus.ConsensusReactor)
- func SetConsensusState(cs *consensus.ConsensusState)
- func SetEventSwitch(evsw *events.EventSwitch)
- func SetGenesisDoc(doc *types.GenesisDoc)
- func SetMempoolReactor(mr *mempl.MempoolReactor)
- func SetPrivValidator(pv *types.PrivValidator)
- func SetSwitch(sw *p2p.Switch)
- func Status() (*ctypes.ResultStatus, error)
- func StatusResult() (ctypes.TMResult, error)
- func Subscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultSubscribe, error)
- func SubscribeResult(wsCtx rpctypes.WSRPCContext, event string) (ctypes.TMResult, error)
- func UnconfirmedTxs() (*ctypes.ResultUnconfirmedTxs, error)
- func UnconfirmedTxsResult() (ctypes.TMResult, error)
- func UnsafeFlushMempool() (*ctypes.ResultUnsafeFlushMempool, error)
- func UnsafeFlushMempoolResult() (ctypes.TMResult, error)
- func UnsafeSetConfig(typ, key, value string) (*ctypes.ResultUnsafeSetConfig, error)
- func UnsafeSetConfigResult(typ, key, value string) (ctypes.TMResult, error)
- func UnsafeStartCPUProfiler(filename string) (*ctypes.ResultUnsafeProfile, error)
- func UnsafeStartCPUProfilerResult(filename string) (ctypes.TMResult, error)
- func UnsafeStopCPUProfiler() (*ctypes.ResultUnsafeProfile, error)
- func UnsafeStopCPUProfilerResult() (ctypes.TMResult, error)
- func UnsafeWriteHeapProfile(filename string) (*ctypes.ResultUnsafeProfile, error)
- func UnsafeWriteHeapProfileResult(filename string) (ctypes.TMResult, error)
- func Unsubscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultUnsubscribe, error)
- func UnsubscribeResult(wsCtx rpctypes.WSRPCContext, event string) (ctypes.TMResult, error)
- func Validators() (*ctypes.ResultValidators, error)
- func ValidatorsResult() (ctypes.TMResult, error)
Constants ¶
View Source
const Version = "3" // rpc routes for profiling, setting config
Variables ¶
View Source
var Routes = map[string]*rpc.RPCFunc{ "subscribe": rpc.NewWSRPCFunc(SubscribeResult, "event"), "unsubscribe": rpc.NewWSRPCFunc(UnsubscribeResult, "event"), "status": rpc.NewRPCFunc(StatusResult, ""), "net_info": rpc.NewRPCFunc(NetInfoResult, ""), "dial_seeds": rpc.NewRPCFunc(DialSeedsResult, "seeds"), "blockchain": rpc.NewRPCFunc(BlockchainInfoResult, "minHeight,maxHeight"), "genesis": rpc.NewRPCFunc(GenesisResult, ""), "block": rpc.NewRPCFunc(BlockResult, "height"), "validators": rpc.NewRPCFunc(ValidatorsResult, ""), "dump_consensus_state": rpc.NewRPCFunc(DumpConsensusStateResult, ""), "broadcast_tx_commit": rpc.NewRPCFunc(BroadcastTxCommitResult, "tx"), "broadcast_tx_sync": rpc.NewRPCFunc(BroadcastTxSyncResult, "tx"), "broadcast_tx_async": rpc.NewRPCFunc(BroadcastTxAsyncResult, "tx"), "unconfirmed_txs": rpc.NewRPCFunc(UnconfirmedTxsResult, ""), "num_unconfirmed_txs": rpc.NewRPCFunc(NumUnconfirmedTxsResult, ""), "unsafe_flush_mempool": rpc.NewRPCFunc(UnsafeFlushMempool, ""), "unsafe_set_config": rpc.NewRPCFunc(UnsafeSetConfigResult, "type,key,value"), "unsafe_start_cpu_profiler": rpc.NewRPCFunc(UnsafeStartCPUProfilerResult, "filename"), "unsafe_stop_cpu_profiler": rpc.NewRPCFunc(UnsafeStopCPUProfilerResult, ""), "unsafe_write_heap_profile": rpc.NewRPCFunc(UnsafeWriteHeapProfileResult, "filename"), }
Functions ¶
func BlockchainInfo ¶
func BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error)
func BlockchainInfoResult ¶ added in v0.7.0
func BroadcastTxAsync ¶
func BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
Returns right away, with no response
func BroadcastTxAsyncResult ¶ added in v0.7.0
func BroadcastTxCommit ¶
func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
CONTRACT: returns error==nil iff the tx is included in a block.
If CheckTx fails, return with the response from CheckTx AND an error. Else, block until the tx is included in a block,
and return the result of AppendTx (with no error).
Even if AppendTx fails, so long as the tx is included in a block this function
will not return an error - it is the caller's responsibility to check res.Code.
The function times out after five minutes and returns the result of CheckTx and an error. TODO: smarter timeout logic or someway to cancel (tx not getting committed is a sign of a larger problem!)
func BroadcastTxCommitResult ¶ added in v0.7.0
func BroadcastTxSync ¶
func BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
Returns with the response from CheckTx
func BroadcastTxSyncResult ¶ added in v0.7.0
func DialSeeds ¶ added in v0.7.0
func DialSeeds(seeds []string) (*ctypes.ResultDialSeeds, error)
Dial given list of seeds if we have no outbound peers
func DialSeedsResult ¶ added in v0.7.0
func DumpConsensusState ¶
func DumpConsensusState() (*ctypes.ResultDumpConsensusState, error)
func DumpConsensusStateResult ¶ added in v0.7.0
func Genesis ¶
func Genesis() (*ctypes.ResultGenesis, error)
func GenesisResult ¶ added in v0.7.0
func NetInfo ¶
func NetInfo() (*ctypes.ResultNetInfo, error)
func NetInfoResult ¶ added in v0.7.0
func NumUnconfirmedTxs ¶
func NumUnconfirmedTxs() (*ctypes.ResultUnconfirmedTxs, error)
func NumUnconfirmedTxsResult ¶ added in v0.7.0
func SetBlockStore ¶
func SetBlockStore(bs *bc.BlockStore)
func SetConsensusReactor ¶
func SetConsensusReactor(cr *consensus.ConsensusReactor)
func SetConsensusState ¶
func SetConsensusState(cs *consensus.ConsensusState)
func SetEventSwitch ¶ added in v0.7.0
func SetEventSwitch(evsw *events.EventSwitch)
func SetGenesisDoc ¶
func SetGenesisDoc(doc *types.GenesisDoc)
func SetMempoolReactor ¶ added in v0.7.0
func SetMempoolReactor(mr *mempl.MempoolReactor)
func SetPrivValidator ¶ added in v0.7.0
func SetPrivValidator(pv *types.PrivValidator)
func Status ¶
func Status() (*ctypes.ResultStatus, error)
func StatusResult ¶ added in v0.7.0
func Subscribe ¶
func Subscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultSubscribe, error)
func SubscribeResult ¶ added in v0.7.0
func UnconfirmedTxs ¶
func UnconfirmedTxs() (*ctypes.ResultUnconfirmedTxs, error)
func UnconfirmedTxsResult ¶ added in v0.7.0
func UnsafeFlushMempool ¶
func UnsafeFlushMempool() (*ctypes.ResultUnsafeFlushMempool, error)
func UnsafeFlushMempoolResult ¶ added in v0.7.0
func UnsafeSetConfig ¶ added in v0.7.0
func UnsafeSetConfig(typ, key, value string) (*ctypes.ResultUnsafeSetConfig, error)
func UnsafeSetConfigResult ¶ added in v0.7.0
func UnsafeStartCPUProfiler ¶
func UnsafeStartCPUProfiler(filename string) (*ctypes.ResultUnsafeProfile, error)
func UnsafeStartCPUProfilerResult ¶ added in v0.7.0
func UnsafeStopCPUProfiler ¶
func UnsafeStopCPUProfiler() (*ctypes.ResultUnsafeProfile, error)
func UnsafeStopCPUProfilerResult ¶ added in v0.7.0
func UnsafeWriteHeapProfile ¶
func UnsafeWriteHeapProfile(filename string) (*ctypes.ResultUnsafeProfile, error)
func UnsafeWriteHeapProfileResult ¶ added in v0.7.0
func Unsubscribe ¶
func Unsubscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultUnsubscribe, error)
func UnsubscribeResult ¶ added in v0.7.0
func Validators ¶
func Validators() (*ctypes.ResultValidators, error)
func ValidatorsResult ¶ added in v0.7.0
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.