github.com/true-sqn/fabric@v2.1.1+incompatible/orderer/consensus/mocks/mock_consenter_support.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package mocks
     3  
     4  import (
     5  	"sync"
     6  
     7  	"github.com/hyperledger/fabric-protos-go/common"
     8  	"github.com/hyperledger/fabric/common/channelconfig"
     9  	"github.com/hyperledger/fabric/orderer/common/blockcutter"
    10  	"github.com/hyperledger/fabric/orderer/common/msgprocessor"
    11  	"github.com/hyperledger/fabric/orderer/consensus"
    12  	"github.com/hyperledger/fabric/protoutil"
    13  )
    14  
    15  type FakeConsenterSupport struct {
    16  	AppendStub        func(*common.Block) error
    17  	appendMutex       sync.RWMutex
    18  	appendArgsForCall []struct {
    19  		arg1 *common.Block
    20  	}
    21  	appendReturns struct {
    22  		result1 error
    23  	}
    24  	appendReturnsOnCall map[int]struct {
    25  		result1 error
    26  	}
    27  	BlockStub        func(uint64) *common.Block
    28  	blockMutex       sync.RWMutex
    29  	blockArgsForCall []struct {
    30  		arg1 uint64
    31  	}
    32  	blockReturns struct {
    33  		result1 *common.Block
    34  	}
    35  	blockReturnsOnCall map[int]struct {
    36  		result1 *common.Block
    37  	}
    38  	BlockCutterStub        func() blockcutter.Receiver
    39  	blockCutterMutex       sync.RWMutex
    40  	blockCutterArgsForCall []struct {
    41  	}
    42  	blockCutterReturns struct {
    43  		result1 blockcutter.Receiver
    44  	}
    45  	blockCutterReturnsOnCall map[int]struct {
    46  		result1 blockcutter.Receiver
    47  	}
    48  	ChannelConfigStub        func() channelconfig.Channel
    49  	channelConfigMutex       sync.RWMutex
    50  	channelConfigArgsForCall []struct {
    51  	}
    52  	channelConfigReturns struct {
    53  		result1 channelconfig.Channel
    54  	}
    55  	channelConfigReturnsOnCall map[int]struct {
    56  		result1 channelconfig.Channel
    57  	}
    58  	ChannelIDStub        func() string
    59  	channelIDMutex       sync.RWMutex
    60  	channelIDArgsForCall []struct {
    61  	}
    62  	channelIDReturns struct {
    63  		result1 string
    64  	}
    65  	channelIDReturnsOnCall map[int]struct {
    66  		result1 string
    67  	}
    68  	ClassifyMsgStub        func(*common.ChannelHeader) msgprocessor.Classification
    69  	classifyMsgMutex       sync.RWMutex
    70  	classifyMsgArgsForCall []struct {
    71  		arg1 *common.ChannelHeader
    72  	}
    73  	classifyMsgReturns struct {
    74  		result1 msgprocessor.Classification
    75  	}
    76  	classifyMsgReturnsOnCall map[int]struct {
    77  		result1 msgprocessor.Classification
    78  	}
    79  	CreateNextBlockStub        func([]*common.Envelope) *common.Block
    80  	createNextBlockMutex       sync.RWMutex
    81  	createNextBlockArgsForCall []struct {
    82  		arg1 []*common.Envelope
    83  	}
    84  	createNextBlockReturns struct {
    85  		result1 *common.Block
    86  	}
    87  	createNextBlockReturnsOnCall map[int]struct {
    88  		result1 *common.Block
    89  	}
    90  	HeightStub        func() uint64
    91  	heightMutex       sync.RWMutex
    92  	heightArgsForCall []struct {
    93  	}
    94  	heightReturns struct {
    95  		result1 uint64
    96  	}
    97  	heightReturnsOnCall map[int]struct {
    98  		result1 uint64
    99  	}
   100  	ProcessConfigMsgStub        func(*common.Envelope) (*common.Envelope, uint64, error)
   101  	processConfigMsgMutex       sync.RWMutex
   102  	processConfigMsgArgsForCall []struct {
   103  		arg1 *common.Envelope
   104  	}
   105  	processConfigMsgReturns struct {
   106  		result1 *common.Envelope
   107  		result2 uint64
   108  		result3 error
   109  	}
   110  	processConfigMsgReturnsOnCall map[int]struct {
   111  		result1 *common.Envelope
   112  		result2 uint64
   113  		result3 error
   114  	}
   115  	ProcessConfigUpdateMsgStub        func(*common.Envelope) (*common.Envelope, uint64, error)
   116  	processConfigUpdateMsgMutex       sync.RWMutex
   117  	processConfigUpdateMsgArgsForCall []struct {
   118  		arg1 *common.Envelope
   119  	}
   120  	processConfigUpdateMsgReturns struct {
   121  		result1 *common.Envelope
   122  		result2 uint64
   123  		result3 error
   124  	}
   125  	processConfigUpdateMsgReturnsOnCall map[int]struct {
   126  		result1 *common.Envelope
   127  		result2 uint64
   128  		result3 error
   129  	}
   130  	ProcessNormalMsgStub        func(*common.Envelope) (uint64, error)
   131  	processNormalMsgMutex       sync.RWMutex
   132  	processNormalMsgArgsForCall []struct {
   133  		arg1 *common.Envelope
   134  	}
   135  	processNormalMsgReturns struct {
   136  		result1 uint64
   137  		result2 error
   138  	}
   139  	processNormalMsgReturnsOnCall map[int]struct {
   140  		result1 uint64
   141  		result2 error
   142  	}
   143  	SequenceStub        func() uint64
   144  	sequenceMutex       sync.RWMutex
   145  	sequenceArgsForCall []struct {
   146  	}
   147  	sequenceReturns struct {
   148  		result1 uint64
   149  	}
   150  	sequenceReturnsOnCall map[int]struct {
   151  		result1 uint64
   152  	}
   153  	SerializeStub        func() ([]byte, error)
   154  	serializeMutex       sync.RWMutex
   155  	serializeArgsForCall []struct {
   156  	}
   157  	serializeReturns struct {
   158  		result1 []byte
   159  		result2 error
   160  	}
   161  	serializeReturnsOnCall map[int]struct {
   162  		result1 []byte
   163  		result2 error
   164  	}
   165  	SharedConfigStub        func() channelconfig.Orderer
   166  	sharedConfigMutex       sync.RWMutex
   167  	sharedConfigArgsForCall []struct {
   168  	}
   169  	sharedConfigReturns struct {
   170  		result1 channelconfig.Orderer
   171  	}
   172  	sharedConfigReturnsOnCall map[int]struct {
   173  		result1 channelconfig.Orderer
   174  	}
   175  	SignStub        func([]byte) ([]byte, error)
   176  	signMutex       sync.RWMutex
   177  	signArgsForCall []struct {
   178  		arg1 []byte
   179  	}
   180  	signReturns struct {
   181  		result1 []byte
   182  		result2 error
   183  	}
   184  	signReturnsOnCall map[int]struct {
   185  		result1 []byte
   186  		result2 error
   187  	}
   188  	VerifyBlockSignatureStub        func([]*protoutil.SignedData, *common.ConfigEnvelope) error
   189  	verifyBlockSignatureMutex       sync.RWMutex
   190  	verifyBlockSignatureArgsForCall []struct {
   191  		arg1 []*protoutil.SignedData
   192  		arg2 *common.ConfigEnvelope
   193  	}
   194  	verifyBlockSignatureReturns struct {
   195  		result1 error
   196  	}
   197  	verifyBlockSignatureReturnsOnCall map[int]struct {
   198  		result1 error
   199  	}
   200  	WriteBlockStub        func(*common.Block, []byte)
   201  	writeBlockMutex       sync.RWMutex
   202  	writeBlockArgsForCall []struct {
   203  		arg1 *common.Block
   204  		arg2 []byte
   205  	}
   206  	WriteConfigBlockStub        func(*common.Block, []byte)
   207  	writeConfigBlockMutex       sync.RWMutex
   208  	writeConfigBlockArgsForCall []struct {
   209  		arg1 *common.Block
   210  		arg2 []byte
   211  	}
   212  	invocations      map[string][][]interface{}
   213  	invocationsMutex sync.RWMutex
   214  }
   215  
   216  func (fake *FakeConsenterSupport) Append(arg1 *common.Block) error {
   217  	fake.appendMutex.Lock()
   218  	ret, specificReturn := fake.appendReturnsOnCall[len(fake.appendArgsForCall)]
   219  	fake.appendArgsForCall = append(fake.appendArgsForCall, struct {
   220  		arg1 *common.Block
   221  	}{arg1})
   222  	fake.recordInvocation("Append", []interface{}{arg1})
   223  	fake.appendMutex.Unlock()
   224  	if fake.AppendStub != nil {
   225  		return fake.AppendStub(arg1)
   226  	}
   227  	if specificReturn {
   228  		return ret.result1
   229  	}
   230  	fakeReturns := fake.appendReturns
   231  	return fakeReturns.result1
   232  }
   233  
   234  func (fake *FakeConsenterSupport) AppendCallCount() int {
   235  	fake.appendMutex.RLock()
   236  	defer fake.appendMutex.RUnlock()
   237  	return len(fake.appendArgsForCall)
   238  }
   239  
   240  func (fake *FakeConsenterSupport) AppendCalls(stub func(*common.Block) error) {
   241  	fake.appendMutex.Lock()
   242  	defer fake.appendMutex.Unlock()
   243  	fake.AppendStub = stub
   244  }
   245  
   246  func (fake *FakeConsenterSupport) AppendArgsForCall(i int) *common.Block {
   247  	fake.appendMutex.RLock()
   248  	defer fake.appendMutex.RUnlock()
   249  	argsForCall := fake.appendArgsForCall[i]
   250  	return argsForCall.arg1
   251  }
   252  
   253  func (fake *FakeConsenterSupport) AppendReturns(result1 error) {
   254  	fake.appendMutex.Lock()
   255  	defer fake.appendMutex.Unlock()
   256  	fake.AppendStub = nil
   257  	fake.appendReturns = struct {
   258  		result1 error
   259  	}{result1}
   260  }
   261  
   262  func (fake *FakeConsenterSupport) AppendReturnsOnCall(i int, result1 error) {
   263  	fake.appendMutex.Lock()
   264  	defer fake.appendMutex.Unlock()
   265  	fake.AppendStub = nil
   266  	if fake.appendReturnsOnCall == nil {
   267  		fake.appendReturnsOnCall = make(map[int]struct {
   268  			result1 error
   269  		})
   270  	}
   271  	fake.appendReturnsOnCall[i] = struct {
   272  		result1 error
   273  	}{result1}
   274  }
   275  
   276  func (fake *FakeConsenterSupport) Block(arg1 uint64) *common.Block {
   277  	fake.blockMutex.Lock()
   278  	ret, specificReturn := fake.blockReturnsOnCall[len(fake.blockArgsForCall)]
   279  	fake.blockArgsForCall = append(fake.blockArgsForCall, struct {
   280  		arg1 uint64
   281  	}{arg1})
   282  	fake.recordInvocation("Block", []interface{}{arg1})
   283  	fake.blockMutex.Unlock()
   284  	if fake.BlockStub != nil {
   285  		return fake.BlockStub(arg1)
   286  	}
   287  	if specificReturn {
   288  		return ret.result1
   289  	}
   290  	fakeReturns := fake.blockReturns
   291  	return fakeReturns.result1
   292  }
   293  
   294  func (fake *FakeConsenterSupport) BlockCallCount() int {
   295  	fake.blockMutex.RLock()
   296  	defer fake.blockMutex.RUnlock()
   297  	return len(fake.blockArgsForCall)
   298  }
   299  
   300  func (fake *FakeConsenterSupport) BlockCalls(stub func(uint64) *common.Block) {
   301  	fake.blockMutex.Lock()
   302  	defer fake.blockMutex.Unlock()
   303  	fake.BlockStub = stub
   304  }
   305  
   306  func (fake *FakeConsenterSupport) BlockArgsForCall(i int) uint64 {
   307  	fake.blockMutex.RLock()
   308  	defer fake.blockMutex.RUnlock()
   309  	argsForCall := fake.blockArgsForCall[i]
   310  	return argsForCall.arg1
   311  }
   312  
   313  func (fake *FakeConsenterSupport) BlockReturns(result1 *common.Block) {
   314  	fake.blockMutex.Lock()
   315  	defer fake.blockMutex.Unlock()
   316  	fake.BlockStub = nil
   317  	fake.blockReturns = struct {
   318  		result1 *common.Block
   319  	}{result1}
   320  }
   321  
   322  func (fake *FakeConsenterSupport) BlockReturnsOnCall(i int, result1 *common.Block) {
   323  	fake.blockMutex.Lock()
   324  	defer fake.blockMutex.Unlock()
   325  	fake.BlockStub = nil
   326  	if fake.blockReturnsOnCall == nil {
   327  		fake.blockReturnsOnCall = make(map[int]struct {
   328  			result1 *common.Block
   329  		})
   330  	}
   331  	fake.blockReturnsOnCall[i] = struct {
   332  		result1 *common.Block
   333  	}{result1}
   334  }
   335  
   336  func (fake *FakeConsenterSupport) BlockCutter() blockcutter.Receiver {
   337  	fake.blockCutterMutex.Lock()
   338  	ret, specificReturn := fake.blockCutterReturnsOnCall[len(fake.blockCutterArgsForCall)]
   339  	fake.blockCutterArgsForCall = append(fake.blockCutterArgsForCall, struct {
   340  	}{})
   341  	fake.recordInvocation("BlockCutter", []interface{}{})
   342  	fake.blockCutterMutex.Unlock()
   343  	if fake.BlockCutterStub != nil {
   344  		return fake.BlockCutterStub()
   345  	}
   346  	if specificReturn {
   347  		return ret.result1
   348  	}
   349  	fakeReturns := fake.blockCutterReturns
   350  	return fakeReturns.result1
   351  }
   352  
   353  func (fake *FakeConsenterSupport) BlockCutterCallCount() int {
   354  	fake.blockCutterMutex.RLock()
   355  	defer fake.blockCutterMutex.RUnlock()
   356  	return len(fake.blockCutterArgsForCall)
   357  }
   358  
   359  func (fake *FakeConsenterSupport) BlockCutterCalls(stub func() blockcutter.Receiver) {
   360  	fake.blockCutterMutex.Lock()
   361  	defer fake.blockCutterMutex.Unlock()
   362  	fake.BlockCutterStub = stub
   363  }
   364  
   365  func (fake *FakeConsenterSupport) BlockCutterReturns(result1 blockcutter.Receiver) {
   366  	fake.blockCutterMutex.Lock()
   367  	defer fake.blockCutterMutex.Unlock()
   368  	fake.BlockCutterStub = nil
   369  	fake.blockCutterReturns = struct {
   370  		result1 blockcutter.Receiver
   371  	}{result1}
   372  }
   373  
   374  func (fake *FakeConsenterSupport) BlockCutterReturnsOnCall(i int, result1 blockcutter.Receiver) {
   375  	fake.blockCutterMutex.Lock()
   376  	defer fake.blockCutterMutex.Unlock()
   377  	fake.BlockCutterStub = nil
   378  	if fake.blockCutterReturnsOnCall == nil {
   379  		fake.blockCutterReturnsOnCall = make(map[int]struct {
   380  			result1 blockcutter.Receiver
   381  		})
   382  	}
   383  	fake.blockCutterReturnsOnCall[i] = struct {
   384  		result1 blockcutter.Receiver
   385  	}{result1}
   386  }
   387  
   388  func (fake *FakeConsenterSupport) ChannelConfig() channelconfig.Channel {
   389  	fake.channelConfigMutex.Lock()
   390  	ret, specificReturn := fake.channelConfigReturnsOnCall[len(fake.channelConfigArgsForCall)]
   391  	fake.channelConfigArgsForCall = append(fake.channelConfigArgsForCall, struct {
   392  	}{})
   393  	fake.recordInvocation("ChannelConfig", []interface{}{})
   394  	fake.channelConfigMutex.Unlock()
   395  	if fake.ChannelConfigStub != nil {
   396  		return fake.ChannelConfigStub()
   397  	}
   398  	if specificReturn {
   399  		return ret.result1
   400  	}
   401  	fakeReturns := fake.channelConfigReturns
   402  	return fakeReturns.result1
   403  }
   404  
   405  func (fake *FakeConsenterSupport) ChannelConfigCallCount() int {
   406  	fake.channelConfigMutex.RLock()
   407  	defer fake.channelConfigMutex.RUnlock()
   408  	return len(fake.channelConfigArgsForCall)
   409  }
   410  
   411  func (fake *FakeConsenterSupport) ChannelConfigCalls(stub func() channelconfig.Channel) {
   412  	fake.channelConfigMutex.Lock()
   413  	defer fake.channelConfigMutex.Unlock()
   414  	fake.ChannelConfigStub = stub
   415  }
   416  
   417  func (fake *FakeConsenterSupport) ChannelConfigReturns(result1 channelconfig.Channel) {
   418  	fake.channelConfigMutex.Lock()
   419  	defer fake.channelConfigMutex.Unlock()
   420  	fake.ChannelConfigStub = nil
   421  	fake.channelConfigReturns = struct {
   422  		result1 channelconfig.Channel
   423  	}{result1}
   424  }
   425  
   426  func (fake *FakeConsenterSupport) ChannelConfigReturnsOnCall(i int, result1 channelconfig.Channel) {
   427  	fake.channelConfigMutex.Lock()
   428  	defer fake.channelConfigMutex.Unlock()
   429  	fake.ChannelConfigStub = nil
   430  	if fake.channelConfigReturnsOnCall == nil {
   431  		fake.channelConfigReturnsOnCall = make(map[int]struct {
   432  			result1 channelconfig.Channel
   433  		})
   434  	}
   435  	fake.channelConfigReturnsOnCall[i] = struct {
   436  		result1 channelconfig.Channel
   437  	}{result1}
   438  }
   439  
   440  func (fake *FakeConsenterSupport) ChannelID() string {
   441  	fake.channelIDMutex.Lock()
   442  	ret, specificReturn := fake.channelIDReturnsOnCall[len(fake.channelIDArgsForCall)]
   443  	fake.channelIDArgsForCall = append(fake.channelIDArgsForCall, struct {
   444  	}{})
   445  	fake.recordInvocation("ChannelID", []interface{}{})
   446  	fake.channelIDMutex.Unlock()
   447  	if fake.ChannelIDStub != nil {
   448  		return fake.ChannelIDStub()
   449  	}
   450  	if specificReturn {
   451  		return ret.result1
   452  	}
   453  	fakeReturns := fake.channelIDReturns
   454  	return fakeReturns.result1
   455  }
   456  
   457  func (fake *FakeConsenterSupport) ChannelIDCallCount() int {
   458  	fake.channelIDMutex.RLock()
   459  	defer fake.channelIDMutex.RUnlock()
   460  	return len(fake.channelIDArgsForCall)
   461  }
   462  
   463  func (fake *FakeConsenterSupport) ChannelIDCalls(stub func() string) {
   464  	fake.channelIDMutex.Lock()
   465  	defer fake.channelIDMutex.Unlock()
   466  	fake.ChannelIDStub = stub
   467  }
   468  
   469  func (fake *FakeConsenterSupport) ChannelIDReturns(result1 string) {
   470  	fake.channelIDMutex.Lock()
   471  	defer fake.channelIDMutex.Unlock()
   472  	fake.ChannelIDStub = nil
   473  	fake.channelIDReturns = struct {
   474  		result1 string
   475  	}{result1}
   476  }
   477  
   478  func (fake *FakeConsenterSupport) ChannelIDReturnsOnCall(i int, result1 string) {
   479  	fake.channelIDMutex.Lock()
   480  	defer fake.channelIDMutex.Unlock()
   481  	fake.ChannelIDStub = nil
   482  	if fake.channelIDReturnsOnCall == nil {
   483  		fake.channelIDReturnsOnCall = make(map[int]struct {
   484  			result1 string
   485  		})
   486  	}
   487  	fake.channelIDReturnsOnCall[i] = struct {
   488  		result1 string
   489  	}{result1}
   490  }
   491  
   492  func (fake *FakeConsenterSupport) ClassifyMsg(arg1 *common.ChannelHeader) msgprocessor.Classification {
   493  	fake.classifyMsgMutex.Lock()
   494  	ret, specificReturn := fake.classifyMsgReturnsOnCall[len(fake.classifyMsgArgsForCall)]
   495  	fake.classifyMsgArgsForCall = append(fake.classifyMsgArgsForCall, struct {
   496  		arg1 *common.ChannelHeader
   497  	}{arg1})
   498  	fake.recordInvocation("ClassifyMsg", []interface{}{arg1})
   499  	fake.classifyMsgMutex.Unlock()
   500  	if fake.ClassifyMsgStub != nil {
   501  		return fake.ClassifyMsgStub(arg1)
   502  	}
   503  	if specificReturn {
   504  		return ret.result1
   505  	}
   506  	fakeReturns := fake.classifyMsgReturns
   507  	return fakeReturns.result1
   508  }
   509  
   510  func (fake *FakeConsenterSupport) ClassifyMsgCallCount() int {
   511  	fake.classifyMsgMutex.RLock()
   512  	defer fake.classifyMsgMutex.RUnlock()
   513  	return len(fake.classifyMsgArgsForCall)
   514  }
   515  
   516  func (fake *FakeConsenterSupport) ClassifyMsgCalls(stub func(*common.ChannelHeader) msgprocessor.Classification) {
   517  	fake.classifyMsgMutex.Lock()
   518  	defer fake.classifyMsgMutex.Unlock()
   519  	fake.ClassifyMsgStub = stub
   520  }
   521  
   522  func (fake *FakeConsenterSupport) ClassifyMsgArgsForCall(i int) *common.ChannelHeader {
   523  	fake.classifyMsgMutex.RLock()
   524  	defer fake.classifyMsgMutex.RUnlock()
   525  	argsForCall := fake.classifyMsgArgsForCall[i]
   526  	return argsForCall.arg1
   527  }
   528  
   529  func (fake *FakeConsenterSupport) ClassifyMsgReturns(result1 msgprocessor.Classification) {
   530  	fake.classifyMsgMutex.Lock()
   531  	defer fake.classifyMsgMutex.Unlock()
   532  	fake.ClassifyMsgStub = nil
   533  	fake.classifyMsgReturns = struct {
   534  		result1 msgprocessor.Classification
   535  	}{result1}
   536  }
   537  
   538  func (fake *FakeConsenterSupport) ClassifyMsgReturnsOnCall(i int, result1 msgprocessor.Classification) {
   539  	fake.classifyMsgMutex.Lock()
   540  	defer fake.classifyMsgMutex.Unlock()
   541  	fake.ClassifyMsgStub = nil
   542  	if fake.classifyMsgReturnsOnCall == nil {
   543  		fake.classifyMsgReturnsOnCall = make(map[int]struct {
   544  			result1 msgprocessor.Classification
   545  		})
   546  	}
   547  	fake.classifyMsgReturnsOnCall[i] = struct {
   548  		result1 msgprocessor.Classification
   549  	}{result1}
   550  }
   551  
   552  func (fake *FakeConsenterSupport) CreateNextBlock(arg1 []*common.Envelope) *common.Block {
   553  	var arg1Copy []*common.Envelope
   554  	if arg1 != nil {
   555  		arg1Copy = make([]*common.Envelope, len(arg1))
   556  		copy(arg1Copy, arg1)
   557  	}
   558  	fake.createNextBlockMutex.Lock()
   559  	ret, specificReturn := fake.createNextBlockReturnsOnCall[len(fake.createNextBlockArgsForCall)]
   560  	fake.createNextBlockArgsForCall = append(fake.createNextBlockArgsForCall, struct {
   561  		arg1 []*common.Envelope
   562  	}{arg1Copy})
   563  	fake.recordInvocation("CreateNextBlock", []interface{}{arg1Copy})
   564  	fake.createNextBlockMutex.Unlock()
   565  	if fake.CreateNextBlockStub != nil {
   566  		return fake.CreateNextBlockStub(arg1)
   567  	}
   568  	if specificReturn {
   569  		return ret.result1
   570  	}
   571  	fakeReturns := fake.createNextBlockReturns
   572  	return fakeReturns.result1
   573  }
   574  
   575  func (fake *FakeConsenterSupport) CreateNextBlockCallCount() int {
   576  	fake.createNextBlockMutex.RLock()
   577  	defer fake.createNextBlockMutex.RUnlock()
   578  	return len(fake.createNextBlockArgsForCall)
   579  }
   580  
   581  func (fake *FakeConsenterSupport) CreateNextBlockCalls(stub func([]*common.Envelope) *common.Block) {
   582  	fake.createNextBlockMutex.Lock()
   583  	defer fake.createNextBlockMutex.Unlock()
   584  	fake.CreateNextBlockStub = stub
   585  }
   586  
   587  func (fake *FakeConsenterSupport) CreateNextBlockArgsForCall(i int) []*common.Envelope {
   588  	fake.createNextBlockMutex.RLock()
   589  	defer fake.createNextBlockMutex.RUnlock()
   590  	argsForCall := fake.createNextBlockArgsForCall[i]
   591  	return argsForCall.arg1
   592  }
   593  
   594  func (fake *FakeConsenterSupport) CreateNextBlockReturns(result1 *common.Block) {
   595  	fake.createNextBlockMutex.Lock()
   596  	defer fake.createNextBlockMutex.Unlock()
   597  	fake.CreateNextBlockStub = nil
   598  	fake.createNextBlockReturns = struct {
   599  		result1 *common.Block
   600  	}{result1}
   601  }
   602  
   603  func (fake *FakeConsenterSupport) CreateNextBlockReturnsOnCall(i int, result1 *common.Block) {
   604  	fake.createNextBlockMutex.Lock()
   605  	defer fake.createNextBlockMutex.Unlock()
   606  	fake.CreateNextBlockStub = nil
   607  	if fake.createNextBlockReturnsOnCall == nil {
   608  		fake.createNextBlockReturnsOnCall = make(map[int]struct {
   609  			result1 *common.Block
   610  		})
   611  	}
   612  	fake.createNextBlockReturnsOnCall[i] = struct {
   613  		result1 *common.Block
   614  	}{result1}
   615  }
   616  
   617  func (fake *FakeConsenterSupport) Height() uint64 {
   618  	fake.heightMutex.Lock()
   619  	ret, specificReturn := fake.heightReturnsOnCall[len(fake.heightArgsForCall)]
   620  	fake.heightArgsForCall = append(fake.heightArgsForCall, struct {
   621  	}{})
   622  	fake.recordInvocation("Height", []interface{}{})
   623  	fake.heightMutex.Unlock()
   624  	if fake.HeightStub != nil {
   625  		return fake.HeightStub()
   626  	}
   627  	if specificReturn {
   628  		return ret.result1
   629  	}
   630  	fakeReturns := fake.heightReturns
   631  	return fakeReturns.result1
   632  }
   633  
   634  func (fake *FakeConsenterSupport) HeightCallCount() int {
   635  	fake.heightMutex.RLock()
   636  	defer fake.heightMutex.RUnlock()
   637  	return len(fake.heightArgsForCall)
   638  }
   639  
   640  func (fake *FakeConsenterSupport) HeightCalls(stub func() uint64) {
   641  	fake.heightMutex.Lock()
   642  	defer fake.heightMutex.Unlock()
   643  	fake.HeightStub = stub
   644  }
   645  
   646  func (fake *FakeConsenterSupport) HeightReturns(result1 uint64) {
   647  	fake.heightMutex.Lock()
   648  	defer fake.heightMutex.Unlock()
   649  	fake.HeightStub = nil
   650  	fake.heightReturns = struct {
   651  		result1 uint64
   652  	}{result1}
   653  }
   654  
   655  func (fake *FakeConsenterSupport) HeightReturnsOnCall(i int, result1 uint64) {
   656  	fake.heightMutex.Lock()
   657  	defer fake.heightMutex.Unlock()
   658  	fake.HeightStub = nil
   659  	if fake.heightReturnsOnCall == nil {
   660  		fake.heightReturnsOnCall = make(map[int]struct {
   661  			result1 uint64
   662  		})
   663  	}
   664  	fake.heightReturnsOnCall[i] = struct {
   665  		result1 uint64
   666  	}{result1}
   667  }
   668  
   669  func (fake *FakeConsenterSupport) ProcessConfigMsg(arg1 *common.Envelope) (*common.Envelope, uint64, error) {
   670  	fake.processConfigMsgMutex.Lock()
   671  	ret, specificReturn := fake.processConfigMsgReturnsOnCall[len(fake.processConfigMsgArgsForCall)]
   672  	fake.processConfigMsgArgsForCall = append(fake.processConfigMsgArgsForCall, struct {
   673  		arg1 *common.Envelope
   674  	}{arg1})
   675  	fake.recordInvocation("ProcessConfigMsg", []interface{}{arg1})
   676  	fake.processConfigMsgMutex.Unlock()
   677  	if fake.ProcessConfigMsgStub != nil {
   678  		return fake.ProcessConfigMsgStub(arg1)
   679  	}
   680  	if specificReturn {
   681  		return ret.result1, ret.result2, ret.result3
   682  	}
   683  	fakeReturns := fake.processConfigMsgReturns
   684  	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
   685  }
   686  
   687  func (fake *FakeConsenterSupport) ProcessConfigMsgCallCount() int {
   688  	fake.processConfigMsgMutex.RLock()
   689  	defer fake.processConfigMsgMutex.RUnlock()
   690  	return len(fake.processConfigMsgArgsForCall)
   691  }
   692  
   693  func (fake *FakeConsenterSupport) ProcessConfigMsgCalls(stub func(*common.Envelope) (*common.Envelope, uint64, error)) {
   694  	fake.processConfigMsgMutex.Lock()
   695  	defer fake.processConfigMsgMutex.Unlock()
   696  	fake.ProcessConfigMsgStub = stub
   697  }
   698  
   699  func (fake *FakeConsenterSupport) ProcessConfigMsgArgsForCall(i int) *common.Envelope {
   700  	fake.processConfigMsgMutex.RLock()
   701  	defer fake.processConfigMsgMutex.RUnlock()
   702  	argsForCall := fake.processConfigMsgArgsForCall[i]
   703  	return argsForCall.arg1
   704  }
   705  
   706  func (fake *FakeConsenterSupport) ProcessConfigMsgReturns(result1 *common.Envelope, result2 uint64, result3 error) {
   707  	fake.processConfigMsgMutex.Lock()
   708  	defer fake.processConfigMsgMutex.Unlock()
   709  	fake.ProcessConfigMsgStub = nil
   710  	fake.processConfigMsgReturns = struct {
   711  		result1 *common.Envelope
   712  		result2 uint64
   713  		result3 error
   714  	}{result1, result2, result3}
   715  }
   716  
   717  func (fake *FakeConsenterSupport) ProcessConfigMsgReturnsOnCall(i int, result1 *common.Envelope, result2 uint64, result3 error) {
   718  	fake.processConfigMsgMutex.Lock()
   719  	defer fake.processConfigMsgMutex.Unlock()
   720  	fake.ProcessConfigMsgStub = nil
   721  	if fake.processConfigMsgReturnsOnCall == nil {
   722  		fake.processConfigMsgReturnsOnCall = make(map[int]struct {
   723  			result1 *common.Envelope
   724  			result2 uint64
   725  			result3 error
   726  		})
   727  	}
   728  	fake.processConfigMsgReturnsOnCall[i] = struct {
   729  		result1 *common.Envelope
   730  		result2 uint64
   731  		result3 error
   732  	}{result1, result2, result3}
   733  }
   734  
   735  func (fake *FakeConsenterSupport) ProcessConfigUpdateMsg(arg1 *common.Envelope) (*common.Envelope, uint64, error) {
   736  	fake.processConfigUpdateMsgMutex.Lock()
   737  	ret, specificReturn := fake.processConfigUpdateMsgReturnsOnCall[len(fake.processConfigUpdateMsgArgsForCall)]
   738  	fake.processConfigUpdateMsgArgsForCall = append(fake.processConfigUpdateMsgArgsForCall, struct {
   739  		arg1 *common.Envelope
   740  	}{arg1})
   741  	fake.recordInvocation("ProcessConfigUpdateMsg", []interface{}{arg1})
   742  	fake.processConfigUpdateMsgMutex.Unlock()
   743  	if fake.ProcessConfigUpdateMsgStub != nil {
   744  		return fake.ProcessConfigUpdateMsgStub(arg1)
   745  	}
   746  	if specificReturn {
   747  		return ret.result1, ret.result2, ret.result3
   748  	}
   749  	fakeReturns := fake.processConfigUpdateMsgReturns
   750  	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
   751  }
   752  
   753  func (fake *FakeConsenterSupport) ProcessConfigUpdateMsgCallCount() int {
   754  	fake.processConfigUpdateMsgMutex.RLock()
   755  	defer fake.processConfigUpdateMsgMutex.RUnlock()
   756  	return len(fake.processConfigUpdateMsgArgsForCall)
   757  }
   758  
   759  func (fake *FakeConsenterSupport) ProcessConfigUpdateMsgCalls(stub func(*common.Envelope) (*common.Envelope, uint64, error)) {
   760  	fake.processConfigUpdateMsgMutex.Lock()
   761  	defer fake.processConfigUpdateMsgMutex.Unlock()
   762  	fake.ProcessConfigUpdateMsgStub = stub
   763  }
   764  
   765  func (fake *FakeConsenterSupport) ProcessConfigUpdateMsgArgsForCall(i int) *common.Envelope {
   766  	fake.processConfigUpdateMsgMutex.RLock()
   767  	defer fake.processConfigUpdateMsgMutex.RUnlock()
   768  	argsForCall := fake.processConfigUpdateMsgArgsForCall[i]
   769  	return argsForCall.arg1
   770  }
   771  
   772  func (fake *FakeConsenterSupport) ProcessConfigUpdateMsgReturns(result1 *common.Envelope, result2 uint64, result3 error) {
   773  	fake.processConfigUpdateMsgMutex.Lock()
   774  	defer fake.processConfigUpdateMsgMutex.Unlock()
   775  	fake.ProcessConfigUpdateMsgStub = nil
   776  	fake.processConfigUpdateMsgReturns = struct {
   777  		result1 *common.Envelope
   778  		result2 uint64
   779  		result3 error
   780  	}{result1, result2, result3}
   781  }
   782  
   783  func (fake *FakeConsenterSupport) ProcessConfigUpdateMsgReturnsOnCall(i int, result1 *common.Envelope, result2 uint64, result3 error) {
   784  	fake.processConfigUpdateMsgMutex.Lock()
   785  	defer fake.processConfigUpdateMsgMutex.Unlock()
   786  	fake.ProcessConfigUpdateMsgStub = nil
   787  	if fake.processConfigUpdateMsgReturnsOnCall == nil {
   788  		fake.processConfigUpdateMsgReturnsOnCall = make(map[int]struct {
   789  			result1 *common.Envelope
   790  			result2 uint64
   791  			result3 error
   792  		})
   793  	}
   794  	fake.processConfigUpdateMsgReturnsOnCall[i] = struct {
   795  		result1 *common.Envelope
   796  		result2 uint64
   797  		result3 error
   798  	}{result1, result2, result3}
   799  }
   800  
   801  func (fake *FakeConsenterSupport) ProcessNormalMsg(arg1 *common.Envelope) (uint64, error) {
   802  	fake.processNormalMsgMutex.Lock()
   803  	ret, specificReturn := fake.processNormalMsgReturnsOnCall[len(fake.processNormalMsgArgsForCall)]
   804  	fake.processNormalMsgArgsForCall = append(fake.processNormalMsgArgsForCall, struct {
   805  		arg1 *common.Envelope
   806  	}{arg1})
   807  	fake.recordInvocation("ProcessNormalMsg", []interface{}{arg1})
   808  	fake.processNormalMsgMutex.Unlock()
   809  	if fake.ProcessNormalMsgStub != nil {
   810  		return fake.ProcessNormalMsgStub(arg1)
   811  	}
   812  	if specificReturn {
   813  		return ret.result1, ret.result2
   814  	}
   815  	fakeReturns := fake.processNormalMsgReturns
   816  	return fakeReturns.result1, fakeReturns.result2
   817  }
   818  
   819  func (fake *FakeConsenterSupport) ProcessNormalMsgCallCount() int {
   820  	fake.processNormalMsgMutex.RLock()
   821  	defer fake.processNormalMsgMutex.RUnlock()
   822  	return len(fake.processNormalMsgArgsForCall)
   823  }
   824  
   825  func (fake *FakeConsenterSupport) ProcessNormalMsgCalls(stub func(*common.Envelope) (uint64, error)) {
   826  	fake.processNormalMsgMutex.Lock()
   827  	defer fake.processNormalMsgMutex.Unlock()
   828  	fake.ProcessNormalMsgStub = stub
   829  }
   830  
   831  func (fake *FakeConsenterSupport) ProcessNormalMsgArgsForCall(i int) *common.Envelope {
   832  	fake.processNormalMsgMutex.RLock()
   833  	defer fake.processNormalMsgMutex.RUnlock()
   834  	argsForCall := fake.processNormalMsgArgsForCall[i]
   835  	return argsForCall.arg1
   836  }
   837  
   838  func (fake *FakeConsenterSupport) ProcessNormalMsgReturns(result1 uint64, result2 error) {
   839  	fake.processNormalMsgMutex.Lock()
   840  	defer fake.processNormalMsgMutex.Unlock()
   841  	fake.ProcessNormalMsgStub = nil
   842  	fake.processNormalMsgReturns = struct {
   843  		result1 uint64
   844  		result2 error
   845  	}{result1, result2}
   846  }
   847  
   848  func (fake *FakeConsenterSupport) ProcessNormalMsgReturnsOnCall(i int, result1 uint64, result2 error) {
   849  	fake.processNormalMsgMutex.Lock()
   850  	defer fake.processNormalMsgMutex.Unlock()
   851  	fake.ProcessNormalMsgStub = nil
   852  	if fake.processNormalMsgReturnsOnCall == nil {
   853  		fake.processNormalMsgReturnsOnCall = make(map[int]struct {
   854  			result1 uint64
   855  			result2 error
   856  		})
   857  	}
   858  	fake.processNormalMsgReturnsOnCall[i] = struct {
   859  		result1 uint64
   860  		result2 error
   861  	}{result1, result2}
   862  }
   863  
   864  func (fake *FakeConsenterSupport) Sequence() uint64 {
   865  	fake.sequenceMutex.Lock()
   866  	ret, specificReturn := fake.sequenceReturnsOnCall[len(fake.sequenceArgsForCall)]
   867  	fake.sequenceArgsForCall = append(fake.sequenceArgsForCall, struct {
   868  	}{})
   869  	fake.recordInvocation("Sequence", []interface{}{})
   870  	fake.sequenceMutex.Unlock()
   871  	if fake.SequenceStub != nil {
   872  		return fake.SequenceStub()
   873  	}
   874  	if specificReturn {
   875  		return ret.result1
   876  	}
   877  	fakeReturns := fake.sequenceReturns
   878  	return fakeReturns.result1
   879  }
   880  
   881  func (fake *FakeConsenterSupport) SequenceCallCount() int {
   882  	fake.sequenceMutex.RLock()
   883  	defer fake.sequenceMutex.RUnlock()
   884  	return len(fake.sequenceArgsForCall)
   885  }
   886  
   887  func (fake *FakeConsenterSupport) SequenceCalls(stub func() uint64) {
   888  	fake.sequenceMutex.Lock()
   889  	defer fake.sequenceMutex.Unlock()
   890  	fake.SequenceStub = stub
   891  }
   892  
   893  func (fake *FakeConsenterSupport) SequenceReturns(result1 uint64) {
   894  	fake.sequenceMutex.Lock()
   895  	defer fake.sequenceMutex.Unlock()
   896  	fake.SequenceStub = nil
   897  	fake.sequenceReturns = struct {
   898  		result1 uint64
   899  	}{result1}
   900  }
   901  
   902  func (fake *FakeConsenterSupport) SequenceReturnsOnCall(i int, result1 uint64) {
   903  	fake.sequenceMutex.Lock()
   904  	defer fake.sequenceMutex.Unlock()
   905  	fake.SequenceStub = nil
   906  	if fake.sequenceReturnsOnCall == nil {
   907  		fake.sequenceReturnsOnCall = make(map[int]struct {
   908  			result1 uint64
   909  		})
   910  	}
   911  	fake.sequenceReturnsOnCall[i] = struct {
   912  		result1 uint64
   913  	}{result1}
   914  }
   915  
   916  func (fake *FakeConsenterSupport) Serialize() ([]byte, error) {
   917  	fake.serializeMutex.Lock()
   918  	ret, specificReturn := fake.serializeReturnsOnCall[len(fake.serializeArgsForCall)]
   919  	fake.serializeArgsForCall = append(fake.serializeArgsForCall, struct {
   920  	}{})
   921  	fake.recordInvocation("Serialize", []interface{}{})
   922  	fake.serializeMutex.Unlock()
   923  	if fake.SerializeStub != nil {
   924  		return fake.SerializeStub()
   925  	}
   926  	if specificReturn {
   927  		return ret.result1, ret.result2
   928  	}
   929  	fakeReturns := fake.serializeReturns
   930  	return fakeReturns.result1, fakeReturns.result2
   931  }
   932  
   933  func (fake *FakeConsenterSupport) SerializeCallCount() int {
   934  	fake.serializeMutex.RLock()
   935  	defer fake.serializeMutex.RUnlock()
   936  	return len(fake.serializeArgsForCall)
   937  }
   938  
   939  func (fake *FakeConsenterSupport) SerializeCalls(stub func() ([]byte, error)) {
   940  	fake.serializeMutex.Lock()
   941  	defer fake.serializeMutex.Unlock()
   942  	fake.SerializeStub = stub
   943  }
   944  
   945  func (fake *FakeConsenterSupport) SerializeReturns(result1 []byte, result2 error) {
   946  	fake.serializeMutex.Lock()
   947  	defer fake.serializeMutex.Unlock()
   948  	fake.SerializeStub = nil
   949  	fake.serializeReturns = struct {
   950  		result1 []byte
   951  		result2 error
   952  	}{result1, result2}
   953  }
   954  
   955  func (fake *FakeConsenterSupport) SerializeReturnsOnCall(i int, result1 []byte, result2 error) {
   956  	fake.serializeMutex.Lock()
   957  	defer fake.serializeMutex.Unlock()
   958  	fake.SerializeStub = nil
   959  	if fake.serializeReturnsOnCall == nil {
   960  		fake.serializeReturnsOnCall = make(map[int]struct {
   961  			result1 []byte
   962  			result2 error
   963  		})
   964  	}
   965  	fake.serializeReturnsOnCall[i] = struct {
   966  		result1 []byte
   967  		result2 error
   968  	}{result1, result2}
   969  }
   970  
   971  func (fake *FakeConsenterSupport) SharedConfig() channelconfig.Orderer {
   972  	fake.sharedConfigMutex.Lock()
   973  	ret, specificReturn := fake.sharedConfigReturnsOnCall[len(fake.sharedConfigArgsForCall)]
   974  	fake.sharedConfigArgsForCall = append(fake.sharedConfigArgsForCall, struct {
   975  	}{})
   976  	fake.recordInvocation("SharedConfig", []interface{}{})
   977  	fake.sharedConfigMutex.Unlock()
   978  	if fake.SharedConfigStub != nil {
   979  		return fake.SharedConfigStub()
   980  	}
   981  	if specificReturn {
   982  		return ret.result1
   983  	}
   984  	fakeReturns := fake.sharedConfigReturns
   985  	return fakeReturns.result1
   986  }
   987  
   988  func (fake *FakeConsenterSupport) SharedConfigCallCount() int {
   989  	fake.sharedConfigMutex.RLock()
   990  	defer fake.sharedConfigMutex.RUnlock()
   991  	return len(fake.sharedConfigArgsForCall)
   992  }
   993  
   994  func (fake *FakeConsenterSupport) SharedConfigCalls(stub func() channelconfig.Orderer) {
   995  	fake.sharedConfigMutex.Lock()
   996  	defer fake.sharedConfigMutex.Unlock()
   997  	fake.SharedConfigStub = stub
   998  }
   999  
  1000  func (fake *FakeConsenterSupport) SharedConfigReturns(result1 channelconfig.Orderer) {
  1001  	fake.sharedConfigMutex.Lock()
  1002  	defer fake.sharedConfigMutex.Unlock()
  1003  	fake.SharedConfigStub = nil
  1004  	fake.sharedConfigReturns = struct {
  1005  		result1 channelconfig.Orderer
  1006  	}{result1}
  1007  }
  1008  
  1009  func (fake *FakeConsenterSupport) SharedConfigReturnsOnCall(i int, result1 channelconfig.Orderer) {
  1010  	fake.sharedConfigMutex.Lock()
  1011  	defer fake.sharedConfigMutex.Unlock()
  1012  	fake.SharedConfigStub = nil
  1013  	if fake.sharedConfigReturnsOnCall == nil {
  1014  		fake.sharedConfigReturnsOnCall = make(map[int]struct {
  1015  			result1 channelconfig.Orderer
  1016  		})
  1017  	}
  1018  	fake.sharedConfigReturnsOnCall[i] = struct {
  1019  		result1 channelconfig.Orderer
  1020  	}{result1}
  1021  }
  1022  
  1023  func (fake *FakeConsenterSupport) Sign(arg1 []byte) ([]byte, error) {
  1024  	var arg1Copy []byte
  1025  	if arg1 != nil {
  1026  		arg1Copy = make([]byte, len(arg1))
  1027  		copy(arg1Copy, arg1)
  1028  	}
  1029  	fake.signMutex.Lock()
  1030  	ret, specificReturn := fake.signReturnsOnCall[len(fake.signArgsForCall)]
  1031  	fake.signArgsForCall = append(fake.signArgsForCall, struct {
  1032  		arg1 []byte
  1033  	}{arg1Copy})
  1034  	fake.recordInvocation("Sign", []interface{}{arg1Copy})
  1035  	fake.signMutex.Unlock()
  1036  	if fake.SignStub != nil {
  1037  		return fake.SignStub(arg1)
  1038  	}
  1039  	if specificReturn {
  1040  		return ret.result1, ret.result2
  1041  	}
  1042  	fakeReturns := fake.signReturns
  1043  	return fakeReturns.result1, fakeReturns.result2
  1044  }
  1045  
  1046  func (fake *FakeConsenterSupport) SignCallCount() int {
  1047  	fake.signMutex.RLock()
  1048  	defer fake.signMutex.RUnlock()
  1049  	return len(fake.signArgsForCall)
  1050  }
  1051  
  1052  func (fake *FakeConsenterSupport) SignCalls(stub func([]byte) ([]byte, error)) {
  1053  	fake.signMutex.Lock()
  1054  	defer fake.signMutex.Unlock()
  1055  	fake.SignStub = stub
  1056  }
  1057  
  1058  func (fake *FakeConsenterSupport) SignArgsForCall(i int) []byte {
  1059  	fake.signMutex.RLock()
  1060  	defer fake.signMutex.RUnlock()
  1061  	argsForCall := fake.signArgsForCall[i]
  1062  	return argsForCall.arg1
  1063  }
  1064  
  1065  func (fake *FakeConsenterSupport) SignReturns(result1 []byte, result2 error) {
  1066  	fake.signMutex.Lock()
  1067  	defer fake.signMutex.Unlock()
  1068  	fake.SignStub = nil
  1069  	fake.signReturns = struct {
  1070  		result1 []byte
  1071  		result2 error
  1072  	}{result1, result2}
  1073  }
  1074  
  1075  func (fake *FakeConsenterSupport) SignReturnsOnCall(i int, result1 []byte, result2 error) {
  1076  	fake.signMutex.Lock()
  1077  	defer fake.signMutex.Unlock()
  1078  	fake.SignStub = nil
  1079  	if fake.signReturnsOnCall == nil {
  1080  		fake.signReturnsOnCall = make(map[int]struct {
  1081  			result1 []byte
  1082  			result2 error
  1083  		})
  1084  	}
  1085  	fake.signReturnsOnCall[i] = struct {
  1086  		result1 []byte
  1087  		result2 error
  1088  	}{result1, result2}
  1089  }
  1090  
  1091  func (fake *FakeConsenterSupport) VerifyBlockSignature(arg1 []*protoutil.SignedData, arg2 *common.ConfigEnvelope) error {
  1092  	var arg1Copy []*protoutil.SignedData
  1093  	if arg1 != nil {
  1094  		arg1Copy = make([]*protoutil.SignedData, len(arg1))
  1095  		copy(arg1Copy, arg1)
  1096  	}
  1097  	fake.verifyBlockSignatureMutex.Lock()
  1098  	ret, specificReturn := fake.verifyBlockSignatureReturnsOnCall[len(fake.verifyBlockSignatureArgsForCall)]
  1099  	fake.verifyBlockSignatureArgsForCall = append(fake.verifyBlockSignatureArgsForCall, struct {
  1100  		arg1 []*protoutil.SignedData
  1101  		arg2 *common.ConfigEnvelope
  1102  	}{arg1Copy, arg2})
  1103  	fake.recordInvocation("VerifyBlockSignature", []interface{}{arg1Copy, arg2})
  1104  	fake.verifyBlockSignatureMutex.Unlock()
  1105  	if fake.VerifyBlockSignatureStub != nil {
  1106  		return fake.VerifyBlockSignatureStub(arg1, arg2)
  1107  	}
  1108  	if specificReturn {
  1109  		return ret.result1
  1110  	}
  1111  	fakeReturns := fake.verifyBlockSignatureReturns
  1112  	return fakeReturns.result1
  1113  }
  1114  
  1115  func (fake *FakeConsenterSupport) VerifyBlockSignatureCallCount() int {
  1116  	fake.verifyBlockSignatureMutex.RLock()
  1117  	defer fake.verifyBlockSignatureMutex.RUnlock()
  1118  	return len(fake.verifyBlockSignatureArgsForCall)
  1119  }
  1120  
  1121  func (fake *FakeConsenterSupport) VerifyBlockSignatureCalls(stub func([]*protoutil.SignedData, *common.ConfigEnvelope) error) {
  1122  	fake.verifyBlockSignatureMutex.Lock()
  1123  	defer fake.verifyBlockSignatureMutex.Unlock()
  1124  	fake.VerifyBlockSignatureStub = stub
  1125  }
  1126  
  1127  func (fake *FakeConsenterSupport) VerifyBlockSignatureArgsForCall(i int) ([]*protoutil.SignedData, *common.ConfigEnvelope) {
  1128  	fake.verifyBlockSignatureMutex.RLock()
  1129  	defer fake.verifyBlockSignatureMutex.RUnlock()
  1130  	argsForCall := fake.verifyBlockSignatureArgsForCall[i]
  1131  	return argsForCall.arg1, argsForCall.arg2
  1132  }
  1133  
  1134  func (fake *FakeConsenterSupport) VerifyBlockSignatureReturns(result1 error) {
  1135  	fake.verifyBlockSignatureMutex.Lock()
  1136  	defer fake.verifyBlockSignatureMutex.Unlock()
  1137  	fake.VerifyBlockSignatureStub = nil
  1138  	fake.verifyBlockSignatureReturns = struct {
  1139  		result1 error
  1140  	}{result1}
  1141  }
  1142  
  1143  func (fake *FakeConsenterSupport) VerifyBlockSignatureReturnsOnCall(i int, result1 error) {
  1144  	fake.verifyBlockSignatureMutex.Lock()
  1145  	defer fake.verifyBlockSignatureMutex.Unlock()
  1146  	fake.VerifyBlockSignatureStub = nil
  1147  	if fake.verifyBlockSignatureReturnsOnCall == nil {
  1148  		fake.verifyBlockSignatureReturnsOnCall = make(map[int]struct {
  1149  			result1 error
  1150  		})
  1151  	}
  1152  	fake.verifyBlockSignatureReturnsOnCall[i] = struct {
  1153  		result1 error
  1154  	}{result1}
  1155  }
  1156  
  1157  func (fake *FakeConsenterSupport) WriteBlock(arg1 *common.Block, arg2 []byte) {
  1158  	var arg2Copy []byte
  1159  	if arg2 != nil {
  1160  		arg2Copy = make([]byte, len(arg2))
  1161  		copy(arg2Copy, arg2)
  1162  	}
  1163  	fake.writeBlockMutex.Lock()
  1164  	fake.writeBlockArgsForCall = append(fake.writeBlockArgsForCall, struct {
  1165  		arg1 *common.Block
  1166  		arg2 []byte
  1167  	}{arg1, arg2Copy})
  1168  	fake.recordInvocation("WriteBlock", []interface{}{arg1, arg2Copy})
  1169  	fake.writeBlockMutex.Unlock()
  1170  	if fake.WriteBlockStub != nil {
  1171  		fake.WriteBlockStub(arg1, arg2)
  1172  	}
  1173  }
  1174  
  1175  func (fake *FakeConsenterSupport) WriteBlockCallCount() int {
  1176  	fake.writeBlockMutex.RLock()
  1177  	defer fake.writeBlockMutex.RUnlock()
  1178  	return len(fake.writeBlockArgsForCall)
  1179  }
  1180  
  1181  func (fake *FakeConsenterSupport) WriteBlockCalls(stub func(*common.Block, []byte)) {
  1182  	fake.writeBlockMutex.Lock()
  1183  	defer fake.writeBlockMutex.Unlock()
  1184  	fake.WriteBlockStub = stub
  1185  }
  1186  
  1187  func (fake *FakeConsenterSupport) WriteBlockArgsForCall(i int) (*common.Block, []byte) {
  1188  	fake.writeBlockMutex.RLock()
  1189  	defer fake.writeBlockMutex.RUnlock()
  1190  	argsForCall := fake.writeBlockArgsForCall[i]
  1191  	return argsForCall.arg1, argsForCall.arg2
  1192  }
  1193  
  1194  func (fake *FakeConsenterSupport) WriteConfigBlock(arg1 *common.Block, arg2 []byte) {
  1195  	var arg2Copy []byte
  1196  	if arg2 != nil {
  1197  		arg2Copy = make([]byte, len(arg2))
  1198  		copy(arg2Copy, arg2)
  1199  	}
  1200  	fake.writeConfigBlockMutex.Lock()
  1201  	fake.writeConfigBlockArgsForCall = append(fake.writeConfigBlockArgsForCall, struct {
  1202  		arg1 *common.Block
  1203  		arg2 []byte
  1204  	}{arg1, arg2Copy})
  1205  	fake.recordInvocation("WriteConfigBlock", []interface{}{arg1, arg2Copy})
  1206  	fake.writeConfigBlockMutex.Unlock()
  1207  	if fake.WriteConfigBlockStub != nil {
  1208  		fake.WriteConfigBlockStub(arg1, arg2)
  1209  	}
  1210  }
  1211  
  1212  func (fake *FakeConsenterSupport) WriteConfigBlockCallCount() int {
  1213  	fake.writeConfigBlockMutex.RLock()
  1214  	defer fake.writeConfigBlockMutex.RUnlock()
  1215  	return len(fake.writeConfigBlockArgsForCall)
  1216  }
  1217  
  1218  func (fake *FakeConsenterSupport) WriteConfigBlockCalls(stub func(*common.Block, []byte)) {
  1219  	fake.writeConfigBlockMutex.Lock()
  1220  	defer fake.writeConfigBlockMutex.Unlock()
  1221  	fake.WriteConfigBlockStub = stub
  1222  }
  1223  
  1224  func (fake *FakeConsenterSupport) WriteConfigBlockArgsForCall(i int) (*common.Block, []byte) {
  1225  	fake.writeConfigBlockMutex.RLock()
  1226  	defer fake.writeConfigBlockMutex.RUnlock()
  1227  	argsForCall := fake.writeConfigBlockArgsForCall[i]
  1228  	return argsForCall.arg1, argsForCall.arg2
  1229  }
  1230  
  1231  func (fake *FakeConsenterSupport) Invocations() map[string][][]interface{} {
  1232  	fake.invocationsMutex.RLock()
  1233  	defer fake.invocationsMutex.RUnlock()
  1234  	fake.appendMutex.RLock()
  1235  	defer fake.appendMutex.RUnlock()
  1236  	fake.blockMutex.RLock()
  1237  	defer fake.blockMutex.RUnlock()
  1238  	fake.blockCutterMutex.RLock()
  1239  	defer fake.blockCutterMutex.RUnlock()
  1240  	fake.channelConfigMutex.RLock()
  1241  	defer fake.channelConfigMutex.RUnlock()
  1242  	fake.channelIDMutex.RLock()
  1243  	defer fake.channelIDMutex.RUnlock()
  1244  	fake.classifyMsgMutex.RLock()
  1245  	defer fake.classifyMsgMutex.RUnlock()
  1246  	fake.createNextBlockMutex.RLock()
  1247  	defer fake.createNextBlockMutex.RUnlock()
  1248  	fake.heightMutex.RLock()
  1249  	defer fake.heightMutex.RUnlock()
  1250  	fake.processConfigMsgMutex.RLock()
  1251  	defer fake.processConfigMsgMutex.RUnlock()
  1252  	fake.processConfigUpdateMsgMutex.RLock()
  1253  	defer fake.processConfigUpdateMsgMutex.RUnlock()
  1254  	fake.processNormalMsgMutex.RLock()
  1255  	defer fake.processNormalMsgMutex.RUnlock()
  1256  	fake.sequenceMutex.RLock()
  1257  	defer fake.sequenceMutex.RUnlock()
  1258  	fake.serializeMutex.RLock()
  1259  	defer fake.serializeMutex.RUnlock()
  1260  	fake.sharedConfigMutex.RLock()
  1261  	defer fake.sharedConfigMutex.RUnlock()
  1262  	fake.signMutex.RLock()
  1263  	defer fake.signMutex.RUnlock()
  1264  	fake.verifyBlockSignatureMutex.RLock()
  1265  	defer fake.verifyBlockSignatureMutex.RUnlock()
  1266  	fake.writeBlockMutex.RLock()
  1267  	defer fake.writeBlockMutex.RUnlock()
  1268  	fake.writeConfigBlockMutex.RLock()
  1269  	defer fake.writeConfigBlockMutex.RUnlock()
  1270  	copiedInvocations := map[string][][]interface{}{}
  1271  	for key, value := range fake.invocations {
  1272  		copiedInvocations[key] = value
  1273  	}
  1274  	return copiedInvocations
  1275  }
  1276  
  1277  func (fake *FakeConsenterSupport) recordInvocation(key string, args []interface{}) {
  1278  	fake.invocationsMutex.Lock()
  1279  	defer fake.invocationsMutex.Unlock()
  1280  	if fake.invocations == nil {
  1281  		fake.invocations = map[string][][]interface{}{}
  1282  	}
  1283  	if fake.invocations[key] == nil {
  1284  		fake.invocations[key] = [][]interface{}{}
  1285  	}
  1286  	fake.invocations[key] = append(fake.invocations[key], args)
  1287  }
  1288  
  1289  var _ consensus.ConsenterSupport = new(FakeConsenterSupport)