Documentation ¶
Overview ¶
Package tests is a generated GoMock package.
Package tests is a generated GoMock package.
Package tests is a generated GoMock package.
Package tests is a generated GoMock package.
Package tests is a generated GoMock package.
Package tests is a generated GoMock package.
Index ¶
- func AssertCommonVal(val ledger.Validator, tx *ledger.Transaction)
- func CreateGenesisTransaction(balance float64) (*ledger.Transaction, *address.Address)
- func CreateNonEmptyMemoryStore() *keyvaluestore.MemoryKeyValueStore
- func DumpTxChain(txChain []*ledger.Transaction)
- func SendFunds(ld ledger.Ledger, sendAddr *address.Address, prevSendTx *ledger.Transaction, ...) (*ledger.Transaction, *ledger.Transaction)
- type MockConsensus
- type MockConsensusClient
- func (m *MockConsensusClient) Accept(arg0 context.Context, arg1 *consensus.AcceptRequest, arg2 ...grpc.CallOption) (*consensus.AcceptResult, error)
- func (m *MockConsensusClient) EXPECT() *MockConsensusClientMockRecorder
- func (m *MockConsensusClient) Vote(arg0 context.Context, arg1 *consensus.VoteRequest, arg2 ...grpc.CallOption) (*consensus.VoteResult, error)
- type MockConsensusClientMockRecorder
- type MockConsensusMockRecorder
- type MockDiscoverer
- type MockDiscovererMockRecorder
- type MockLedger
- func (m *MockLedger) EXPECT() *MockLedgerMockRecorder
- func (m *MockLedger) GetAddressStatement(arg0 string) ([]*ledger.Transaction, error)
- func (m *MockLedger) GetLastTransaction(arg0 string) (*ledger.Transaction, error)
- func (m *MockLedger) GetTransaction(arg0 string) (*ledger.Transaction, error)
- func (m *MockLedger) Initialize(arg0 *ledger.Transaction) error
- func (m *MockLedger) Register(arg0, arg1 *ledger.Transaction) error
- func (m *MockLedger) Verify(arg0, arg1 *ledger.Transaction) error
- func (m *MockLedger) VerifyTransaction(arg0 *ledger.Transaction, arg1 bool) error
- type MockLedgerClient
- func (m *MockLedgerClient) EXPECT() *MockLedgerClientMockRecorder
- func (m *MockLedgerClient) GetAddressStatement(arg0 context.Context, arg1 *ledger.GetAddressStatementRequest, ...) (*ledger.GetAddressStatementResult, error)
- func (m *MockLedgerClient) GetLastTransaction(arg0 context.Context, arg1 *ledger.GetLastTransactionRequest, ...) (*ledger.GetLastTransactionResult, error)
- func (m *MockLedgerClient) GetTransaction(arg0 context.Context, arg1 *ledger.GetTransactionRequest, ...) (*ledger.GetTransactionResult, error)
- func (m *MockLedgerClient) Register(arg0 context.Context, arg1 *ledger.RegisterRequest, arg2 ...grpc.CallOption) (*ledger.RegisterResult, error)
- func (m *MockLedgerClient) Verify(arg0 context.Context, arg1 *ledger.VerifyRequest, arg2 ...grpc.CallOption) (*ledger.VerifyResult, error)
- func (m *MockLedgerClient) VerifyTransaction(arg0 context.Context, arg1 *ledger.VerifyTransactionRequest, ...) (*ledger.VerifyTransactionResult, error)
- type MockLedgerClientMockRecorder
- func (mr *MockLedgerClientMockRecorder) GetAddressStatement(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockLedgerClientMockRecorder) GetLastTransaction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockLedgerClientMockRecorder) GetTransaction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockLedgerClientMockRecorder) Register(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockLedgerClientMockRecorder) Verify(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockLedgerClientMockRecorder) VerifyTransaction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- type MockLedgerMockRecorder
- func (mr *MockLedgerMockRecorder) GetAddressStatement(arg0 interface{}) *gomock.Call
- func (mr *MockLedgerMockRecorder) GetLastTransaction(arg0 interface{}) *gomock.Call
- func (mr *MockLedgerMockRecorder) GetTransaction(arg0 interface{}) *gomock.Call
- func (mr *MockLedgerMockRecorder) Initialize(arg0 interface{}) *gomock.Call
- func (mr *MockLedgerMockRecorder) Register(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLedgerMockRecorder) Verify(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLedgerMockRecorder) VerifyTransaction(arg0, arg1 interface{}) *gomock.Call
- type MockListener
- type MockListenerMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertCommonVal ¶
func AssertCommonVal(val ledger.Validator, tx *ledger.Transaction)
func CreateGenesisTransaction ¶
func CreateGenesisTransaction(balance float64) (*ledger.Transaction, *address.Address)
func CreateNonEmptyMemoryStore ¶
func CreateNonEmptyMemoryStore() *keyvaluestore.MemoryKeyValueStore
func DumpTxChain ¶
func DumpTxChain(txChain []*ledger.Transaction)
func SendFunds ¶
func SendFunds(ld ledger.Ledger, sendAddr *address.Address, prevSendTx *ledger.Transaction, prevReceiveTx *ledger.Transaction, receiveAddr *address.Address, amount float64) (*ledger.Transaction, *ledger.Transaction)
Types ¶
type MockConsensus ¶
type MockConsensus struct {
// contains filtered or unexported fields
}
MockConsensus is a mock of Consensus interface
func NewMockConsensus ¶
func NewMockConsensus(ctrl *gomock.Controller) *MockConsensus
NewMockConsensus creates a new mock instance
func (*MockConsensus) Accept ¶
func (m *MockConsensus) Accept(arg0 *consensus.AcceptRequest) (*consensus.AcceptResult, error)
Accept mocks base method
func (*MockConsensus) EXPECT ¶
func (m *MockConsensus) EXPECT() *MockConsensusMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockConsensus) Vote ¶
func (m *MockConsensus) Vote(arg0 *consensus.VoteRequest) (*consensus.VoteResult, error)
Vote mocks base method
type MockConsensusClient ¶
type MockConsensusClient struct {
// contains filtered or unexported fields
}
MockConsensusClient is a mock of ConsensusClient interface
func NewMockConsensusClient ¶
func NewMockConsensusClient(ctrl *gomock.Controller) *MockConsensusClient
NewMockConsensusClient creates a new mock instance
func (*MockConsensusClient) Accept ¶
func (m *MockConsensusClient) Accept(arg0 context.Context, arg1 *consensus.AcceptRequest, arg2 ...grpc.CallOption) (*consensus.AcceptResult, error)
Accept mocks base method
func (*MockConsensusClient) EXPECT ¶
func (m *MockConsensusClient) EXPECT() *MockConsensusClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockConsensusClient) Vote ¶
func (m *MockConsensusClient) Vote(arg0 context.Context, arg1 *consensus.VoteRequest, arg2 ...grpc.CallOption) (*consensus.VoteResult, error)
Vote mocks base method
type MockConsensusClientMockRecorder ¶
type MockConsensusClientMockRecorder struct {
// contains filtered or unexported fields
}
MockConsensusClientMockRecorder is the mock recorder for MockConsensusClient
func (*MockConsensusClientMockRecorder) Accept ¶
func (mr *MockConsensusClientMockRecorder) Accept(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Accept indicates an expected call of Accept
func (*MockConsensusClientMockRecorder) Vote ¶
func (mr *MockConsensusClientMockRecorder) Vote(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Vote indicates an expected call of Vote
type MockConsensusMockRecorder ¶
type MockConsensusMockRecorder struct {
// contains filtered or unexported fields
}
MockConsensusMockRecorder is the mock recorder for MockConsensus
func (*MockConsensusMockRecorder) Accept ¶
func (mr *MockConsensusMockRecorder) Accept(arg0 interface{}) *gomock.Call
Accept indicates an expected call of Accept
func (*MockConsensusMockRecorder) Vote ¶
func (mr *MockConsensusMockRecorder) Vote(arg0 interface{}) *gomock.Call
Vote indicates an expected call of Vote
type MockDiscoverer ¶
type MockDiscoverer struct {
// contains filtered or unexported fields
}
MockDiscoverer is a mock of Discoverer interface
func NewMockDiscoverer ¶
func NewMockDiscoverer(ctrl *gomock.Controller) *MockDiscoverer
NewMockDiscoverer creates a new mock instance
func (*MockDiscoverer) EXPECT ¶
func (m *MockDiscoverer) EXPECT() *MockDiscovererMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDiscoverer) Peers ¶
func (m *MockDiscoverer) Peers() ([]consensus.ConsensusClient, error)
Peers mocks base method
type MockDiscovererMockRecorder ¶
type MockDiscovererMockRecorder struct {
// contains filtered or unexported fields
}
MockDiscovererMockRecorder is the mock recorder for MockDiscoverer
func (*MockDiscovererMockRecorder) Init ¶
func (mr *MockDiscovererMockRecorder) Init() *gomock.Call
Init indicates an expected call of Init
func (*MockDiscovererMockRecorder) Peers ¶
func (mr *MockDiscovererMockRecorder) Peers() *gomock.Call
Peers indicates an expected call of Peers
type MockLedger ¶
type MockLedger struct {
// contains filtered or unexported fields
}
MockLedger is a mock of Ledger interface
func NewMockLedger ¶
func NewMockLedger(ctrl *gomock.Controller) *MockLedger
NewMockLedger creates a new mock instance
func (*MockLedger) EXPECT ¶
func (m *MockLedger) EXPECT() *MockLedgerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockLedger) GetAddressStatement ¶
func (m *MockLedger) GetAddressStatement(arg0 string) ([]*ledger.Transaction, error)
GetAddressStatement mocks base method
func (*MockLedger) GetLastTransaction ¶
func (m *MockLedger) GetLastTransaction(arg0 string) (*ledger.Transaction, error)
GetLastTransaction mocks base method
func (*MockLedger) GetTransaction ¶
func (m *MockLedger) GetTransaction(arg0 string) (*ledger.Transaction, error)
GetTransaction mocks base method
func (*MockLedger) Initialize ¶
func (m *MockLedger) Initialize(arg0 *ledger.Transaction) error
Initialize mocks base method
func (*MockLedger) Register ¶
func (m *MockLedger) Register(arg0, arg1 *ledger.Transaction) error
Register mocks base method
func (*MockLedger) Verify ¶
func (m *MockLedger) Verify(arg0, arg1 *ledger.Transaction) error
Verify mocks base method
func (*MockLedger) VerifyTransaction ¶
func (m *MockLedger) VerifyTransaction(arg0 *ledger.Transaction, arg1 bool) error
VerifyTransaction mocks base method
type MockLedgerClient ¶
type MockLedgerClient struct {
// contains filtered or unexported fields
}
MockLedgerClient is a mock of LedgerClient interface
func NewMockLedgerClient ¶
func NewMockLedgerClient(ctrl *gomock.Controller) *MockLedgerClient
NewMockLedgerClient creates a new mock instance
func (*MockLedgerClient) EXPECT ¶
func (m *MockLedgerClient) EXPECT() *MockLedgerClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockLedgerClient) GetAddressStatement ¶
func (m *MockLedgerClient) GetAddressStatement(arg0 context.Context, arg1 *ledger.GetAddressStatementRequest, arg2 ...grpc.CallOption) (*ledger.GetAddressStatementResult, error)
GetAddressStatement mocks base method
func (*MockLedgerClient) GetLastTransaction ¶
func (m *MockLedgerClient) GetLastTransaction(arg0 context.Context, arg1 *ledger.GetLastTransactionRequest, arg2 ...grpc.CallOption) (*ledger.GetLastTransactionResult, error)
GetLastTransaction mocks base method
func (*MockLedgerClient) GetTransaction ¶
func (m *MockLedgerClient) GetTransaction(arg0 context.Context, arg1 *ledger.GetTransactionRequest, arg2 ...grpc.CallOption) (*ledger.GetTransactionResult, error)
GetTransaction mocks base method
func (*MockLedgerClient) Register ¶
func (m *MockLedgerClient) Register(arg0 context.Context, arg1 *ledger.RegisterRequest, arg2 ...grpc.CallOption) (*ledger.RegisterResult, error)
Register mocks base method
func (*MockLedgerClient) Verify ¶
func (m *MockLedgerClient) Verify(arg0 context.Context, arg1 *ledger.VerifyRequest, arg2 ...grpc.CallOption) (*ledger.VerifyResult, error)
Verify mocks base method
func (*MockLedgerClient) VerifyTransaction ¶
func (m *MockLedgerClient) VerifyTransaction(arg0 context.Context, arg1 *ledger.VerifyTransactionRequest, arg2 ...grpc.CallOption) (*ledger.VerifyTransactionResult, error)
VerifyTransaction mocks base method
type MockLedgerClientMockRecorder ¶
type MockLedgerClientMockRecorder struct {
// contains filtered or unexported fields
}
MockLedgerClientMockRecorder is the mock recorder for MockLedgerClient
func (*MockLedgerClientMockRecorder) GetAddressStatement ¶
func (mr *MockLedgerClientMockRecorder) GetAddressStatement(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetAddressStatement indicates an expected call of GetAddressStatement
func (*MockLedgerClientMockRecorder) GetLastTransaction ¶
func (mr *MockLedgerClientMockRecorder) GetLastTransaction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetLastTransaction indicates an expected call of GetLastTransaction
func (*MockLedgerClientMockRecorder) GetTransaction ¶
func (mr *MockLedgerClientMockRecorder) GetTransaction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetTransaction indicates an expected call of GetTransaction
func (*MockLedgerClientMockRecorder) Register ¶
func (mr *MockLedgerClientMockRecorder) Register(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Register indicates an expected call of Register
func (*MockLedgerClientMockRecorder) Verify ¶
func (mr *MockLedgerClientMockRecorder) Verify(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Verify indicates an expected call of Verify
func (*MockLedgerClientMockRecorder) VerifyTransaction ¶
func (mr *MockLedgerClientMockRecorder) VerifyTransaction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
VerifyTransaction indicates an expected call of VerifyTransaction
type MockLedgerMockRecorder ¶
type MockLedgerMockRecorder struct {
// contains filtered or unexported fields
}
MockLedgerMockRecorder is the mock recorder for MockLedger
func (*MockLedgerMockRecorder) GetAddressStatement ¶
func (mr *MockLedgerMockRecorder) GetAddressStatement(arg0 interface{}) *gomock.Call
GetAddressStatement indicates an expected call of GetAddressStatement
func (*MockLedgerMockRecorder) GetLastTransaction ¶
func (mr *MockLedgerMockRecorder) GetLastTransaction(arg0 interface{}) *gomock.Call
GetLastTransaction indicates an expected call of GetLastTransaction
func (*MockLedgerMockRecorder) GetTransaction ¶
func (mr *MockLedgerMockRecorder) GetTransaction(arg0 interface{}) *gomock.Call
GetTransaction indicates an expected call of GetTransaction
func (*MockLedgerMockRecorder) Initialize ¶
func (mr *MockLedgerMockRecorder) Initialize(arg0 interface{}) *gomock.Call
Initialize indicates an expected call of Initialize
func (*MockLedgerMockRecorder) Register ¶
func (mr *MockLedgerMockRecorder) Register(arg0, arg1 interface{}) *gomock.Call
Register indicates an expected call of Register
func (*MockLedgerMockRecorder) Verify ¶
func (mr *MockLedgerMockRecorder) Verify(arg0, arg1 interface{}) *gomock.Call
Verify indicates an expected call of Verify
func (*MockLedgerMockRecorder) VerifyTransaction ¶
func (mr *MockLedgerMockRecorder) VerifyTransaction(arg0, arg1 interface{}) *gomock.Call
VerifyTransaction indicates an expected call of VerifyTransaction
type MockListener ¶
type MockListener struct {
// contains filtered or unexported fields
}
MockListener is a mock of Listener interface
func NewMockListener ¶
func NewMockListener(ctrl *gomock.Controller) *MockListener
NewMockListener creates a new mock instance
func (*MockListener) Accept ¶
func (m *MockListener) Accept() (net.Conn, error)
Accept mocks base method
func (*MockListener) EXPECT ¶
func (m *MockListener) EXPECT() *MockListenerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockListenerMockRecorder ¶
type MockListenerMockRecorder struct {
// contains filtered or unexported fields
}
MockListenerMockRecorder is the mock recorder for MockListener
func (*MockListenerMockRecorder) Accept ¶
func (mr *MockListenerMockRecorder) Accept() *gomock.Call
Accept indicates an expected call of Accept
func (*MockListenerMockRecorder) Addr ¶
func (mr *MockListenerMockRecorder) Addr() *gomock.Call
Addr indicates an expected call of Addr
func (*MockListenerMockRecorder) Close ¶
func (mr *MockListenerMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close