Newer
Older
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/account"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/types"
ep "github.com/eris-ltd/eris-db/erisdb/pipe"
td "github.com/eris-ltd/eris-db/test/testdata/testdata"
accounts ep.Accounts
blockchain ep.Blockchain
consensus ep.Consensus
func NewMockPipe(td *td.TestData) ep.Pipe {
accounts := &accounts{td}
blockchain := &blockchain{td}
consensus := &consensus{td}
events := &events{td}
net := &net{td}
transactor := &transactor{td}
}
}
// Create a mock pipe with default mock data.
func NewDefaultMockPipe() ep.Pipe {
}
func (this *MockPipe) Accounts() ep.Accounts {
return this.accounts
}
func (this *MockPipe) Blockchain() ep.Blockchain {
return this.blockchain
}
func (this *MockPipe) Consensus() ep.Consensus {
return this.consensus
}
return this.events
}
func (this *MockPipe) Net() ep.Net {
return this.net
}
func (this *MockPipe) Transactor() ep.Transactor {
return this.transactor
}
func (this *accounts) GenPrivAccount() (*account.PrivAccount, error) {
}
func (this *accounts) GenPrivAccountFromKey(key []byte) (*account.PrivAccount, error) {
}
func (this *accounts) Accounts([]*ep.FilterData) (*ep.AccountList, error) {
}
func (this *accounts) Account(address []byte) (*account.Account, error) {
}
func (this *accounts) Storage(address []byte) (*ep.Storage, error) {
}
func (this *accounts) StorageAt(address, key []byte) (*ep.StorageItem, error) {
}
func (this *blockchain) Info() (*ep.BlockchainInfo, error) {
}
func (this *blockchain) GenesisHash() ([]byte, error) {
func (this *blockchain) LatestBlockHeight() (int, error) {
return this.testData.GetLatestBlockHeight.Output.Height, nil
}
func (this *blockchain) LatestBlock() (*types.Block, error) {
}
func (this *blockchain) Blocks([]*ep.FilterData) (*ep.Blocks, error) {
func (this *blockchain) Block(height int) (*types.Block, error) {
}
func (this *consensus) State() (*ep.ConsensusState, error) {
}
func (this *consensus) Validators() (*ep.ValidatorList, error) {
}
func (this *events) Subscribe(subId, event string, callback func(interface{})) (bool, error) {
return true, nil
}
func (this *events) Unsubscribe(subId string) (bool, error) {
return this.testData.GetClientVersion.Output.ClientVersion, nil
}
func (this *net) Peer(address string) (*ep.Peer, error) {
func (this *transactor) Call(address, data []byte) (*ep.Call, error) {
func (this *transactor) CallCode(code, data []byte) (*ep.Call, error) {
func (this *transactor) BroadcastTx(tx types.Tx) (*ep.Receipt, error) {
func (this *transactor) UnconfirmedTxs() (*ep.UnconfirmedTxs, error) {
func (this *transactor) Transact(privKey, address, data []byte, gasLimit, fee int64) (*ep.Receipt, error) {
if address == nil || len(address) == 0 {
func (this *transactor) SignTx(tx types.Tx, privAccounts []*account.PrivAccount) (types.Tx, error) {