Documentation ¶
Index ¶
- Constants
- func AssertBlock(t *testing.T, blk module.Block, version int, height int64, id []byte, ...)
- func AssertBlockInBM(t *testing.T, bm module.BlockManager, version int, height int64, id []byte, ...)
- func AssertLastBlock(t *testing.T, bm module.BlockManager, height int64, prevID []byte, version int)
- func FinalizeBlock(t *testing.T, bm module.BlockManager, bc module.BlockCandidate)
- func GetLastBlock(t *testing.T, bm module.BlockManager) module.Block
- func Go(f func())
- func ImportBlock(t *testing.T, bm module.BlockManager, bc module.BlockCandidate, flag int) (resBc module.BlockCandidate, err error, cbErr error)
- func ImportBlockByReader(t *testing.T, bm module.BlockManager, r io.Reader, flag int) (resBc module.BlockCandidate, err error, cbErr error)
- func NewRegulator() module.Regulator
- func NodeInterconnect(nodes []*Node)
- func PeerConnect(p1 Peer, p2 Peer)
- func ProposeBlock(bm module.BlockManager, prevID []byte, votes module.CommitVoteSet) (bc module.BlockCandidate, err error, cbError error)
- func RegisterTransactionFactory()
- func ResetJobChan()
- type Chain
- func (c *Chain) Backup(file string, extra []string) error
- func (c *Chain) BlockManager() module.BlockManager
- func (c *Chain) CID() int
- func (c *Chain) Channel() string
- func (c *Chain) ChildrenLimit() int
- func (c *Chain) CommitVoteSetDecoder() module.CommitVoteSetDecoder
- func (c *Chain) ConcurrencyLevel() int
- func (c *Chain) Consensus() module.Consensus
- func (c *Chain) Database() db.Database
- func (c *Chain) DefaultWaitTimeout() time.Duration
- func (c *Chain) Genesis() []byte
- func (c *Chain) GenesisStorage() module.GenesisStorage
- func (c *Chain) Import(src string, height int64) error
- func (c *Chain) Init() error
- func (c *Chain) IsStarted() bool
- func (c *Chain) IsStopped() bool
- func (c *Chain) Logger() log.Logger
- func (c *Chain) MaxBlockTxBytes() int
- func (c *Chain) MaxWaitTimeout() time.Duration
- func (c *Chain) MetricContext() context.Context
- func (c *Chain) NID() int
- func (c *Chain) NephewsLimit() int
- func (c *Chain) NetID() int
- func (c *Chain) NetworkManager() module.NetworkManager
- func (c *Chain) NormalTxPoolSize() int
- func (c *Chain) PatchDecoder() module.PatchDecoder
- func (c *Chain) PatchTxPoolSize() int
- func (c *Chain) Prune(gs string, dbt string, height int64) error
- func (c *Chain) Regulator() module.Regulator
- func (c *Chain) Reset() error
- func (c *Chain) RunTask(task string, params json.RawMessage) error
- func (c *Chain) ServiceManager() module.ServiceManager
- func (c *Chain) SetBlockManager(bm module.BlockManager)
- func (c *Chain) SetServiceManager(sm module.ServiceManager)
- func (c *Chain) Start() error
- func (c *Chain) State() (string, int64, error)
- func (c *Chain) Stop() error
- func (c *Chain) Term() error
- func (c *Chain) TransactionTimeout() time.Duration
- func (c *Chain) ValidateTxOnSend() bool
- func (c *Chain) Verify() error
- func (c *Chain) Wallet() module.Wallet
- type Fixture
- type FixtureConfig
- type FixtureOption
- type NetworkManager
- func (n *NetworkManager) Connect(n2 *NetworkManager)
- func (n *NetworkManager) GetPeers() []module.PeerID
- func (n *NetworkManager) ID() module.PeerID
- func (n *NetworkManager) NewPeerFor(mpi module.ProtocolInfo) (*SimplePeer, *SimplePeerHandler)
- func (n *NetworkManager) RegisterReactor(name string, mpi module.ProtocolInfo, reactor module.Reactor, ...) (module.ProtocolHandler, error)
- func (n *NetworkManager) RegisterReactorForStreams(name string, pi module.ProtocolInfo, reactor module.Reactor, ...) (module.ProtocolHandler, error)
- func (n *NetworkManager) SetRole(version int64, role module.Role, peers ...module.PeerID)
- func (n *NetworkManager) UnregisterReactor(reactor module.Reactor) error
- type Node
- func (t *Node) Address() module.Address
- func (t *Node) AssertLastBlock(prev module.Block, version int)
- func (t *Node) Close()
- func (t *Node) FinalizeBlock(bc module.BlockCandidate)
- func (t *Node) GetLastBlock() module.Block
- func (t *Node) ImportBlock(bc module.BlockCandidate, flag int)
- func (t *Node) ImportBlockByReader(r io.Reader, flag int) module.BlockCandidate
- func (t *Node) ImportFinalizeBlockByReader(r io.Reader)
- func (t *Node) NewVoteListForLastBlock() module.CommitVoteSet
- func (t *Node) ProposeBlock(votes module.CommitVoteSet) module.BlockCandidate
- func (t *Node) ProposeFinalizeBlock(votes module.CommitVoteSet)
- func (t *Node) ProposeFinalizeBlockWithTX(votes module.CommitVoteSet, txJson string)
- func (t *Node) ProposeImportFinalizeBlock(votes module.CommitVoteSet)
- func (t *Node) ProposeImportFinalizeBlockWithTX(votes module.CommitVoteSet, txJson string)
- type NodeContext
- type Packet
- type Peer
- type SendType
- type ServiceManager
- func (sm *ServiceManager) CreateInitialTransition(result []byte, nextValidators module.ValidatorList) (module.Transition, error)
- func (sm *ServiceManager) CreateSyncTransition(transition module.Transition, result []byte, vlHash []byte) module.Transition
- func (sm *ServiceManager) CreateTransition(parent module.Transition, txs module.TransactionList, bi module.BlockInfo, ...) (module.Transition, error)
- func (sm *ServiceManager) ExportResult(result []byte, vh []byte, dst db.Database) error
- func (sm *ServiceManager) Finalize(transition module.Transition, opt int) error
- func (sm *ServiceManager) GenesisTransactionFromBytes(b []byte, blockVersion int) (module.Transaction, error)
- func (sm *ServiceManager) GetChainID(result []byte) (int64, error)
- func (sm *ServiceManager) GetMembers(result []byte) (module.MemberList, error)
- func (sm *ServiceManager) GetMinimizeBlockGen(result []byte) bool
- func (sm *ServiceManager) GetNetworkID(result []byte) (int64, error)
- func (sm *ServiceManager) GetNextBlockVersion(result []byte) int
- func (sm *ServiceManager) GetPatches(parent module.Transition, bi module.BlockInfo) module.TransactionList
- func (sm *ServiceManager) GetRoundLimit(result []byte, vl int) int64
- func (sm *ServiceManager) ImportResult(result []byte, vh []byte, src db.Database) error
- func (sm *ServiceManager) PatchTransition(transition module.Transition, patches module.TransactionList, ...) module.Transition
- func (sm *ServiceManager) ProposeTransition(parent module.Transition, bi module.BlockInfo, csi module.ConsensusInfo) (module.Transition, error)
- func (sm *ServiceManager) ReceiptListFromResult(result []byte, g module.TransactionGroup) (module.ReceiptList, error)
- func (sm *ServiceManager) SendTransaction(result []byte, height int64, tx interface{}) ([]byte, error)
- func (sm *ServiceManager) SendTransactionAndWait(result []byte, height int64, tx interface{}) ([]byte, <-chan interface{}, error)
- func (sm *ServiceManager) TransactionFromBytes(b []byte, blockVersion int) (module.Transaction, error)
- func (sm *ServiceManager) TransactionListFromHash(hash []byte) module.TransactionList
- func (sm *ServiceManager) TransactionListFromSlice(txs []module.Transaction, version int) module.TransactionList
- func (sm *ServiceManager) ValidatorListFromHash(hash []byte) module.ValidatorList
- func (sm *ServiceManager) WaitForTransaction(parent module.Transition, bi module.BlockInfo, cb func()) bool
- func (sm *ServiceManager) WaitTransactionResult(id []byte) (<-chan interface{}, error)
- type SimplePeer
- type SimplePeerHandler
- func (h *SimplePeerHandler) Address() module.Address
- func (h *SimplePeerHandler) AssertReceiveUnicast(pi module.ProtocolInfo, m interface{})
- func (h *SimplePeerHandler) Broadcast(pi module.ProtocolInfo, m interface{}, btype module.BroadcastType, ...)
- func (h *SimplePeerHandler) Multicast(pi module.ProtocolInfo, m interface{}, role module.Role, cb func(bool, error))
- func (h *SimplePeerHandler) Peer() *SimplePeer
- func (h *SimplePeerHandler) Receive(pi module.ProtocolInfo, expMsg interface{}, outMsg interface{}) *Packet
- func (h *SimplePeerHandler) Unicast(pi module.ProtocolInfo, m interface{}, cb func(bool, error))
- func (h *SimplePeerHandler) Wallet() module.Wallet
- type Transaction
- func (t *Transaction) Bytes() []byte
- func (t *Transaction) ClearCache()
- func (t *Transaction) Dispose()
- func (t *Transaction) Equal(object trie.Object) bool
- func (t *Transaction) Execute(ctx contract.Context, estimate bool) (txresult.Receipt, error)
- func (t *Transaction) Flush() error
- func (t *Transaction) From() module.Address
- func (t *Transaction) GetHandler(cm contract.ContractManager) (transaction.Handler, error)
- func (t *Transaction) Group() module.TransactionGroup
- func (t *Transaction) Hash() []byte
- func (t *Transaction) ID() []byte
- func (t *Transaction) IsSkippable() bool
- func (t *Transaction) Nonce() *big.Int
- func (t *Transaction) PreValidate(wc state.WorldContext, update bool) error
- func (t *Transaction) Prepare(ctx contract.Context) (state.WorldContext, error)
- func (t *Transaction) Reset(s db.Database, k []byte) error
- func (t *Transaction) Resolve(builder merkle.Builder) error
- func (t *Transaction) SetNextBlockVersion(v *int32) *Transaction
- func (t *Transaction) SetValidators(addrs ...module.Address) *Transaction
- func (t *Transaction) SetValidatorsAddresser(addrs ...addresser) *Transaction
- func (t *Transaction) SetValidatorsNode(addrs ...*Node) *Transaction
- func (t *Transaction) SetVarTest(v *string) *Transaction
- func (t Transaction) String() string
- func (t *Transaction) Timestamp() int64
- func (t *Transaction) To() module.Address
- func (t *Transaction) ToJSON(version module.JSONVersion) (interface{}, error)
- func (t *Transaction) ValidateNetwork(nid int) bool
- func (t *Transaction) Verify() error
- func (t *Transaction) Version() int
- type WAL
- type WALReader
- type WALWriter
Constants ¶
View Source
const ( SendTypeUnicast = SendType(iota) SendTypeMulticast SendTypeBroadcast )
View Source
const VarTest = "test"
Variables ¶
This section is empty.
Functions ¶
func AssertBlock ¶ added in v0.9.10
func AssertBlockInBM ¶ added in v0.9.10
func AssertLastBlock ¶ added in v0.9.10
func FinalizeBlock ¶ added in v0.9.10
func FinalizeBlock( t *testing.T, bm module.BlockManager, bc module.BlockCandidate, )
func GetLastBlock ¶ added in v0.9.10
func ImportBlock ¶ added in v0.9.10
func ImportBlock( t *testing.T, bm module.BlockManager, bc module.BlockCandidate, flag int, ) (resBc module.BlockCandidate, err error, cbErr error)
func ImportBlockByReader ¶ added in v0.9.10
func NewRegulator ¶ added in v0.9.10
func NodeInterconnect ¶ added in v0.9.10
func NodeInterconnect(nodes []*Node)
func PeerConnect ¶ added in v0.9.10
func ProposeBlock ¶ added in v0.9.10
func ProposeBlock( bm module.BlockManager, prevID []byte, votes module.CommitVoteSet, ) (bc module.BlockCandidate, err error, cbError error)
func RegisterTransactionFactory ¶ added in v0.9.10
func RegisterTransactionFactory()
func ResetJobChan ¶ added in v0.9.10
func ResetJobChan()
Types ¶
type Chain ¶ added in v0.9.10
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) BlockManager ¶ added in v0.9.10
func (c *Chain) BlockManager() module.BlockManager
func (*Chain) ChildrenLimit ¶ added in v1.0.0
func (*Chain) CommitVoteSetDecoder ¶ added in v0.9.10
func (c *Chain) CommitVoteSetDecoder() module.CommitVoteSetDecoder
func (*Chain) ConcurrencyLevel ¶ added in v0.9.10
func (*Chain) DefaultWaitTimeout ¶ added in v0.9.10
func (*Chain) GenesisStorage ¶ added in v0.9.10
func (c *Chain) GenesisStorage() module.GenesisStorage
func (*Chain) MaxBlockTxBytes ¶ added in v0.9.10
func (*Chain) MaxWaitTimeout ¶ added in v0.9.10
func (*Chain) MetricContext ¶ added in v0.9.10
func (*Chain) NephewsLimit ¶ added in v1.0.0
func (*Chain) NetworkManager ¶ added in v0.9.10
func (c *Chain) NetworkManager() module.NetworkManager
func (*Chain) NormalTxPoolSize ¶ added in v0.9.10
func (*Chain) PatchDecoder ¶ added in v0.9.10
func (c *Chain) PatchDecoder() module.PatchDecoder
func (*Chain) PatchTxPoolSize ¶ added in v0.9.10
func (*Chain) RunTask ¶ added in v0.9.10
func (c *Chain) RunTask(task string, params json.RawMessage) error
func (*Chain) ServiceManager ¶ added in v0.9.10
func (c *Chain) ServiceManager() module.ServiceManager
func (*Chain) SetBlockManager ¶ added in v0.9.10
func (c *Chain) SetBlockManager(bm module.BlockManager)
func (*Chain) SetServiceManager ¶ added in v0.9.10
func (c *Chain) SetServiceManager(sm module.ServiceManager)
func (*Chain) TransactionTimeout ¶ added in v0.9.10
func (*Chain) ValidateTxOnSend ¶ added in v1.1.1
type Fixture ¶ added in v0.9.10
type Fixture struct { // default node *Node BaseConfig *FixtureConfig // all nodes Nodes []*Node }
func NewFixture ¶ added in v0.9.10
func NewFixture(t *testing.T, o ...FixtureOption) *Fixture
func (*Fixture) AddNode ¶ added in v0.9.10
func (f *Fixture) AddNode(o ...FixtureOption) *Node
type FixtureConfig ¶ added in v0.9.10
type FixtureConfig struct { T *testing.T MerkleRoot []byte MerkleLeaves int64 MerkleLastVotes []byte Prefix string Dbase func() db.Database CVSD module.CommitVoteSetDecoder NewPlatform func(ctx *NodeContext) base.Platform NewSM func(ctx *NodeContext) module.ServiceManager NewBM func(ctx *NodeContext) module.BlockManager NewCS func(ctx *NodeContext) module.Consensus AddValidatorNodes int Genesis string Wallet module.Wallet AddDefaultNode *bool }
func NewFixtureConfig ¶ added in v0.9.10
func NewFixtureConfig(t *testing.T, o ...FixtureOption) *FixtureConfig
func (*FixtureConfig) ApplyOption ¶ added in v0.9.10
func (cf *FixtureConfig) ApplyOption(o ...FixtureOption) *FixtureConfig
func (*FixtureConfig) Override ¶ added in v0.9.10
func (cf *FixtureConfig) Override(cf2 *FixtureConfig) *FixtureConfig
type FixtureOption ¶ added in v0.9.10
type FixtureOption func(cf *FixtureConfig) *FixtureConfig
func AddDefaultNode ¶ added in v0.9.10
func AddDefaultNode(v bool) FixtureOption
func AddValidatorNodes ¶ added in v0.9.10
func AddValidatorNodes(n int) FixtureOption
AddValidatorNodes option makes n validators and the first validator becomes default node
func UseConfig ¶ added in v0.9.10
func UseConfig(cf2 *FixtureConfig) FixtureOption
func UseDB ¶ added in v0.9.10
func UseDB(dbase db.Database) FixtureOption
func UseGenesis ¶ added in v0.9.10
func UseGenesis(gs string) FixtureOption
func UseWallet ¶ added in v0.9.10
func UseWallet(w module.Wallet) FixtureOption
type NetworkManager ¶ added in v0.9.10
type NetworkManager struct { module.NetworkManager // contains filtered or unexported fields }
func NewNetworkManager ¶ added in v0.9.10
func NewNetworkManager(t *testing.T, a module.Address) *NetworkManager
func (*NetworkManager) Connect ¶ added in v0.9.10
func (n *NetworkManager) Connect(n2 *NetworkManager)
func (*NetworkManager) GetPeers ¶ added in v0.9.10
func (n *NetworkManager) GetPeers() []module.PeerID
func (*NetworkManager) ID ¶ added in v0.9.10
func (n *NetworkManager) ID() module.PeerID
func (*NetworkManager) NewPeerFor ¶ added in v0.9.10
func (n *NetworkManager) NewPeerFor(mpi module.ProtocolInfo) (*SimplePeer, *SimplePeerHandler)
func (*NetworkManager) RegisterReactor ¶ added in v0.9.10
func (n *NetworkManager) RegisterReactor(name string, mpi module.ProtocolInfo, reactor module.Reactor, piList []module.ProtocolInfo, priority uint8) (module.ProtocolHandler, error)
func (*NetworkManager) RegisterReactorForStreams ¶ added in v0.9.10
func (n *NetworkManager) RegisterReactorForStreams(name string, pi module.ProtocolInfo, reactor module.Reactor, piList []module.ProtocolInfo, priority uint8) (module.ProtocolHandler, error)
func (*NetworkManager) UnregisterReactor ¶ added in v0.9.10
func (n *NetworkManager) UnregisterReactor(reactor module.Reactor) error
type Node ¶ added in v0.9.10
type Node struct { *testing.T Chain *Chain Base string NM *NetworkManager SM module.ServiceManager BM module.BlockManager CS module.Consensus PrevBlock module.Block LastBlock module.Block Platform base.Platform // contains filtered or unexported fields }
func (*Node) AssertLastBlock ¶ added in v0.9.10
func (*Node) FinalizeBlock ¶ added in v0.9.10
func (t *Node) FinalizeBlock(bc module.BlockCandidate)
func (*Node) GetLastBlock ¶ added in v0.9.10
func (*Node) ImportBlock ¶ added in v0.9.10
func (t *Node) ImportBlock(bc module.BlockCandidate, flag int)
func (*Node) ImportBlockByReader ¶ added in v0.9.10
func (*Node) ImportFinalizeBlockByReader ¶ added in v0.9.10
func (*Node) NewVoteListForLastBlock ¶ added in v0.9.10
func (t *Node) NewVoteListForLastBlock() module.CommitVoteSet
func (*Node) ProposeBlock ¶ added in v0.9.10
func (t *Node) ProposeBlock( votes module.CommitVoteSet, ) module.BlockCandidate
func (*Node) ProposeFinalizeBlock ¶ added in v0.9.10
func (t *Node) ProposeFinalizeBlock(votes module.CommitVoteSet)
func (*Node) ProposeFinalizeBlockWithTX ¶ added in v0.9.10
func (t *Node) ProposeFinalizeBlockWithTX( votes module.CommitVoteSet, txJson string, )
func (*Node) ProposeImportFinalizeBlock ¶ added in v0.9.10
func (t *Node) ProposeImportFinalizeBlock( votes module.CommitVoteSet, )
func (*Node) ProposeImportFinalizeBlockWithTX ¶ added in v0.9.10
func (t *Node) ProposeImportFinalizeBlockWithTX( votes module.CommitVoteSet, txJson string, )
type NodeContext ¶ added in v0.9.10
type NodeContext struct { C *Chain Config *FixtureConfig Base string Platform base.Platform CM contract.ContractManager EM eeproxy.Manager }
type Packet ¶ added in v0.9.10
type Packet struct { SendType SendType Src module.PeerID // DstSpec specifies destination. // DstSpec is PeerID if SendType is SendTypeUnicast. // DstSpec is Role if SendType is SendTypeMulticast. // DstSpec is BroadcastType if SendType is SendTypeBroadcast. DstSpec interface{} MPI module.ProtocolInfo PI module.ProtocolInfo Data []byte }
type ServiceManager ¶ added in v0.9.10
type ServiceManager struct { module.ServiceManager // contains filtered or unexported fields }
func NewServiceManager ¶ added in v0.9.10
func NewServiceManager( c *Chain, plt base.Platform, cm contract.ContractManager, em eeproxy.Manager, ) *ServiceManager
func (*ServiceManager) CreateInitialTransition ¶ added in v0.9.10
func (sm *ServiceManager) CreateInitialTransition( result []byte, nextValidators module.ValidatorList, ) (module.Transition, error)
func (*ServiceManager) CreateSyncTransition ¶ added in v0.9.10
func (sm *ServiceManager) CreateSyncTransition(transition module.Transition, result []byte, vlHash []byte) module.Transition
func (*ServiceManager) CreateTransition ¶ added in v0.9.10
func (sm *ServiceManager) CreateTransition(parent module.Transition, txs module.TransactionList, bi module.BlockInfo, csi module.ConsensusInfo, validated bool) (module.Transition, error)
func (*ServiceManager) ExportResult ¶ added in v0.9.10
func (*ServiceManager) Finalize ¶ added in v0.9.10
func (sm *ServiceManager) Finalize(transition module.Transition, opt int) error
func (*ServiceManager) GenesisTransactionFromBytes ¶ added in v0.9.10
func (sm *ServiceManager) GenesisTransactionFromBytes(b []byte, blockVersion int) (module.Transaction, error)
func (*ServiceManager) GetChainID ¶ added in v0.9.10
func (sm *ServiceManager) GetChainID(result []byte) (int64, error)
func (*ServiceManager) GetMembers ¶ added in v0.9.10
func (sm *ServiceManager) GetMembers(result []byte) (module.MemberList, error)
func (*ServiceManager) GetMinimizeBlockGen ¶ added in v0.9.10
func (sm *ServiceManager) GetMinimizeBlockGen(result []byte) bool
func (*ServiceManager) GetNetworkID ¶ added in v0.9.10
func (sm *ServiceManager) GetNetworkID(result []byte) (int64, error)
func (*ServiceManager) GetNextBlockVersion ¶ added in v0.9.10
func (sm *ServiceManager) GetNextBlockVersion(result []byte) int
func (*ServiceManager) GetPatches ¶ added in v0.9.10
func (sm *ServiceManager) GetPatches(parent module.Transition, bi module.BlockInfo) module.TransactionList
func (*ServiceManager) GetRoundLimit ¶ added in v0.9.10
func (sm *ServiceManager) GetRoundLimit(result []byte, vl int) int64
func (*ServiceManager) ImportResult ¶ added in v0.9.10
func (*ServiceManager) PatchTransition ¶ added in v0.9.10
func (sm *ServiceManager) PatchTransition(transition module.Transition, patches module.TransactionList, bi module.BlockInfo) module.Transition
func (*ServiceManager) ProposeTransition ¶ added in v0.9.10
func (sm *ServiceManager) ProposeTransition(parent module.Transition, bi module.BlockInfo, csi module.ConsensusInfo) (module.Transition, error)
func (*ServiceManager) ReceiptListFromResult ¶ added in v0.9.10
func (sm *ServiceManager) ReceiptListFromResult(result []byte, g module.TransactionGroup) (module.ReceiptList, error)
func (*ServiceManager) SendTransaction ¶ added in v0.9.10
func (sm *ServiceManager) SendTransaction(result []byte, height int64, tx interface{}) ([]byte, error)
func (*ServiceManager) SendTransactionAndWait ¶ added in v0.9.10
func (sm *ServiceManager) SendTransactionAndWait(result []byte, height int64, tx interface{}) ([]byte, <-chan interface{}, error)
func (*ServiceManager) TransactionFromBytes ¶ added in v0.9.10
func (sm *ServiceManager) TransactionFromBytes(b []byte, blockVersion int) (module.Transaction, error)
func (*ServiceManager) TransactionListFromHash ¶ added in v0.9.10
func (sm *ServiceManager) TransactionListFromHash(hash []byte) module.TransactionList
func (*ServiceManager) TransactionListFromSlice ¶ added in v0.9.10
func (sm *ServiceManager) TransactionListFromSlice(txs []module.Transaction, version int) module.TransactionList
func (*ServiceManager) ValidatorListFromHash ¶ added in v0.9.10
func (sm *ServiceManager) ValidatorListFromHash(hash []byte) module.ValidatorList
func (*ServiceManager) WaitForTransaction ¶ added in v0.9.10
func (sm *ServiceManager) WaitForTransaction(parent module.Transition, bi module.BlockInfo, cb func()) bool
func (*ServiceManager) WaitTransactionResult ¶ added in v0.9.10
func (sm *ServiceManager) WaitTransactionResult(id []byte) (<-chan interface{}, error)
type SimplePeer ¶ added in v0.9.10
type SimplePeer struct {
// contains filtered or unexported fields
}
func NewPeer ¶ added in v0.9.10
func NewPeer(t *testing.T) *SimplePeer
func NewPeerWithAddress ¶ added in v0.9.10
func NewPeerWithAddress(t *testing.T, w module.Wallet) *SimplePeer
func (*SimplePeer) Address ¶ added in v0.9.10
func (p *SimplePeer) Address() module.Address
func (*SimplePeer) Connect ¶ added in v0.9.10
func (p *SimplePeer) Connect(p2 Peer) *SimplePeer
func (*SimplePeer) ID ¶ added in v0.9.10
func (p *SimplePeer) ID() module.PeerID
func (*SimplePeer) RegisterProto ¶ added in v0.9.10
func (p *SimplePeer) RegisterProto(mpi module.ProtocolInfo) *SimplePeerHandler
func (*SimplePeer) Wallet ¶ added in v0.9.10
func (p *SimplePeer) Wallet() module.Wallet
type SimplePeerHandler ¶ added in v0.9.10
type SimplePeerHandler struct {
// contains filtered or unexported fields
}
func (*SimplePeerHandler) Address ¶ added in v0.9.10
func (h *SimplePeerHandler) Address() module.Address
func (*SimplePeerHandler) AssertReceiveUnicast ¶ added in v0.9.10
func (h *SimplePeerHandler) AssertReceiveUnicast(pi module.ProtocolInfo, m interface{})
func (*SimplePeerHandler) Broadcast ¶ added in v0.9.10
func (h *SimplePeerHandler) Broadcast( pi module.ProtocolInfo, m interface{}, btype module.BroadcastType, cb func(bool, error), )
func (*SimplePeerHandler) Multicast ¶ added in v0.9.10
func (h *SimplePeerHandler) Multicast( pi module.ProtocolInfo, m interface{}, role module.Role, cb func(bool, error), )
func (*SimplePeerHandler) Peer ¶ added in v0.9.10
func (h *SimplePeerHandler) Peer() *SimplePeer
func (*SimplePeerHandler) Receive ¶ added in v0.9.10
func (h *SimplePeerHandler) Receive( pi module.ProtocolInfo, expMsg interface{}, outMsg interface{}, ) *Packet
func (*SimplePeerHandler) Unicast ¶ added in v0.9.10
func (h *SimplePeerHandler) Unicast( pi module.ProtocolInfo, m interface{}, cb func(bool, error), )
func (*SimplePeerHandler) Wallet ¶ added in v0.9.10
func (h *SimplePeerHandler) Wallet() module.Wallet
type Transaction ¶ added in v0.9.10
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶ added in v0.9.10
func NewTransaction() *Transaction
func NewTx ¶ added in v0.9.10
func NewTx() *Transaction
func (*Transaction) Bytes ¶ added in v0.9.10
func (t *Transaction) Bytes() []byte
func (*Transaction) ClearCache ¶ added in v0.9.10
func (t *Transaction) ClearCache()
func (*Transaction) Dispose ¶ added in v0.9.10
func (t *Transaction) Dispose()
func (*Transaction) Flush ¶ added in v0.9.10
func (t *Transaction) Flush() error
func (*Transaction) From ¶ added in v0.9.10
func (t *Transaction) From() module.Address
func (*Transaction) GetHandler ¶ added in v0.9.10
func (t *Transaction) GetHandler(cm contract.ContractManager) (transaction.Handler, error)
func (*Transaction) Group ¶ added in v0.9.10
func (t *Transaction) Group() module.TransactionGroup
func (*Transaction) Hash ¶ added in v0.9.10
func (t *Transaction) Hash() []byte
func (*Transaction) ID ¶ added in v0.9.10
func (t *Transaction) ID() []byte
func (*Transaction) IsSkippable ¶ added in v0.9.10
func (t *Transaction) IsSkippable() bool
func (*Transaction) Nonce ¶ added in v0.9.10
func (t *Transaction) Nonce() *big.Int
func (*Transaction) PreValidate ¶ added in v0.9.10
func (t *Transaction) PreValidate(wc state.WorldContext, update bool) error
func (*Transaction) Prepare ¶ added in v0.9.10
func (t *Transaction) Prepare(ctx contract.Context) (state.WorldContext, error)
func (*Transaction) Reset ¶ added in v0.9.10
func (t *Transaction) Reset(s db.Database, k []byte) error
func (*Transaction) Resolve ¶ added in v0.9.10
func (t *Transaction) Resolve(builder merkle.Builder) error
func (*Transaction) SetNextBlockVersion ¶ added in v0.9.10
func (t *Transaction) SetNextBlockVersion(v *int32) *Transaction
func (*Transaction) SetValidators ¶ added in v0.9.10
func (t *Transaction) SetValidators(addrs ...module.Address) *Transaction
func (*Transaction) SetValidatorsAddresser ¶ added in v0.9.10
func (t *Transaction) SetValidatorsAddresser(addrs ...addresser) *Transaction
func (*Transaction) SetValidatorsNode ¶ added in v0.9.10
func (t *Transaction) SetValidatorsNode(addrs ...*Node) *Transaction
func (*Transaction) SetVarTest ¶ added in v0.9.10
func (t *Transaction) SetVarTest(v *string) *Transaction
func (Transaction) String ¶ added in v0.9.10
func (t Transaction) String() string
func (*Transaction) Timestamp ¶ added in v0.9.10
func (t *Transaction) Timestamp() int64
func (*Transaction) To ¶ added in v0.9.10
func (t *Transaction) To() module.Address
func (*Transaction) ToJSON ¶ added in v0.9.10
func (t *Transaction) ToJSON(version module.JSONVersion) (interface{}, error)
func (*Transaction) ValidateNetwork ¶ added in v0.9.10
func (t *Transaction) ValidateNetwork(nid int) bool
func (*Transaction) Verify ¶ added in v0.9.10
func (t *Transaction) Verify() error
func (*Transaction) Version ¶ added in v0.9.10
func (t *Transaction) Version() int
type WAL ¶ added in v0.9.10
type WAL struct {
// contains filtered or unexported fields
}
func (*WAL) OpenForRead ¶ added in v0.9.10
type WALReader ¶ added in v0.9.10
type WALReader struct {
// contains filtered or unexported fields
}
func (*WALReader) CloseAndRepair ¶ added in v0.9.10
Source Files ¶
Click to show internal directories.
Click to hide internal directories.