Documentation ¶
Index ¶
- type Applier
- type StateTransfer
- type SyncEntry
- func (se *SyncEntry) Configure(vp *viper.Viper) error
- func (se *SyncEntry) FromTopStrategy(l *ledger.Ledger, h uint64, blockh []byte) *syncStrategyFromTop
- func (*SyncEntry) Start()
- func (*SyncEntry) Stop()
- func (*SyncEntry) SyncToTarget(blockNumber uint64, blockHash []byte, peerIDs []*pb.PeerID) (error, bool)
- func (se *SyncEntry) SyncTransactions(ctx context.Context, txids []string) ([]*pb.Transaction, []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Applier ¶
any strategy applier has two simple entrances: one for blocks only and another for blocks and the full world-state, by anymeans except for executing txs in blocks (e.g. sync state directly or statedelta) each method will just block until the process finish strategy may left partial syncing results after encounter any error
type StateTransfer ¶
type StateTransfer interface { Start() // Start the block transfer go routine Stop() // Stop up the block transfer go routine // SyncToTarget attempts to move the state to the given target, returning an error, and whether this target might succeed if attempted at a later time SyncToTarget(blockNumber uint64, blockHash []byte, peerIDs []*pb.PeerID) (error, bool) }
type SyncEntry ¶
type SyncEntry struct {
// contains filtered or unexported fields
}
func GetSyncStrategyEntry ¶
func GetSyncStrategyEntry(sstub *pb.StreamStub) *SyncEntry
func (*SyncEntry) FromTopStrategy ¶
func (*SyncEntry) SyncToTarget ¶
func (*SyncEntry) SyncTransactions ¶
func (se *SyncEntry) SyncTransactions(ctx context.Context, txids []string) ([]*pb.Transaction, []string)
a base implement, should have no alter way...
Click to show internal directories.
Click to hide internal directories.