-
Notifications
You must be signed in to change notification settings - Fork 14
5 Transaction Service
senthil edited this page May 27, 2020
·
1 revision
type transactionService struct {
membershipManager MembershipManager
txQueue TransactionQueue
}
type TransactionService interface {
SubmitTransaction(txEnvelope *pb.Envelope) error
}
type transactionQueue struct {
Queue []*pb.Transaction
mu sync.RWMutex
}
type TransactionQueue interface {
Enqueue(tx *pb.Transaction) error
Dequeue() (tx *pb.Transaction, error)
Peek() (tx *pb.Transaction, error)
Size() uint64
}