Documentation ¶
Index ¶
- type CrossState
- type IBlockStore
- type MockCrossState
- func (_m *MockCrossState) AddSpecialTx(txs []types.Tx)
- func (_m *MockCrossState) GetTxValidators(height uint64) ([]*types.Validator, error)
- func (_m *MockCrossState) SaveTxEntry(block *types.Block, txsResult *types.TxsResult)
- func (_m *MockCrossState) SaveTxValidators(height uint64, validators []*types.Validator)
- func (_m *MockCrossState) Sync()
- type Service
- func (s *Service) AddSpecialTx(txs []types.Tx)
- func (s *Service) DeleteTxEntry(block *types.Block)
- func (s *Service) GetMultiSignersInfo(txtype types.SupportType) *types.SignersInfo
- func (s *Service) GetTxEntry(hash common.Hash) *types.TxEntry
- func (s *Service) NewDbBatch() dbm.Batch
- func (s *Service) SaveTxEntry(block *types.Block, txsResult *types.TxsResult)
- func (s *Service) SetLogger(l log.Logger)
- func (s *Service) Sync()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrossState ¶
type CrossState interface { //txentry GetTxEntry(hash common.Hash) *types.TxEntry SaveTxEntry(block *types.Block, txsResult *types.TxsResult) DeleteTxEntry(block *types.Block) //specialtx AddSpecialTx(txs []types.Tx) //MultiSign GetMultiSignersInfo(txtype types.SupportType) *types.SignersInfo //new db batch NewDbBatch() dbm.Batch //flush db Sync() }
CrossState an interface for txmgr.
type IBlockStore ¶
type IBlockStore interface { LoadBlockCommit(height uint64) *types.Commit LoadBlock(height uint64) *types.Block GetTxFromBlock(block *types.Block, hash common.Hash) types.Tx }
IBlockStore interface to avoid cycling reference.
type MockCrossState ¶
MockCrossState is an autogenerated mock type for the CrossState type
func (*MockCrossState) AddSpecialTx ¶
func (_m *MockCrossState) AddSpecialTx(txs []types.Tx)
AddSpecialTx provides a mock function with given fields: txs
func (*MockCrossState) GetTxValidators ¶
func (_m *MockCrossState) GetTxValidators(height uint64) ([]*types.Validator, error)
GetTxValidators provides a mock function with given fields: height
func (*MockCrossState) SaveTxEntry ¶
func (_m *MockCrossState) SaveTxEntry(block *types.Block, txsResult *types.TxsResult)
SaveTxEntry provides a mock function with given fields: block, txsResult
func (*MockCrossState) SaveTxValidators ¶
func (_m *MockCrossState) SaveTxValidators(height uint64, validators []*types.Validator)
SaveTxValidators provides a mock function with given fields: height, validators
func (*MockCrossState) Sync ¶
func (_m *MockCrossState) Sync()
Sync provides a mock function with given fields:
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manage special Txs.
func NewCrossState ¶
func NewCrossState(db dbm.DB, bs IBlockStore) *Service
NewCrossState new a Service object with db blockstore.
func (*Service) AddSpecialTx ¶
AddSpecialTx handles MultiSignAccountTx
func (*Service) DeleteTxEntry ¶
func (*Service) GetMultiSignersInfo ¶
func (s *Service) GetMultiSignersInfo(txtype types.SupportType) *types.SignersInfo
GetMultiSignersInfo return the SignersInfo of txtype setted in MultiSignAccountTx
func (*Service) GetTxEntry ¶
GetTxEntry return TxEntry from given hash
func (*Service) NewDbBatch ¶
func (*Service) SaveTxEntry ¶
SaveTxEntry save all txEntry of the block