github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/core/peer/mock/peer_ledger.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package mock 3 4 import ( 5 "sync" 6 7 "github.com/hyperledger/fabric-protos-go/common" 8 peera "github.com/hyperledger/fabric-protos-go/peer" 9 ledgera "github.com/hechain20/hechain/common/ledger" 10 "github.com/hechain20/hechain/core/ledger" 11 ) 12 13 type PeerLedger struct { 14 CancelSnapshotRequestStub func(uint64) error 15 cancelSnapshotRequestMutex sync.RWMutex 16 cancelSnapshotRequestArgsForCall []struct { 17 arg1 uint64 18 } 19 cancelSnapshotRequestReturns struct { 20 result1 error 21 } 22 cancelSnapshotRequestReturnsOnCall map[int]struct { 23 result1 error 24 } 25 CloseStub func() 26 closeMutex sync.RWMutex 27 closeArgsForCall []struct { 28 } 29 CommitLegacyStub func(*ledger.BlockAndPvtData, *ledger.CommitOptions) error 30 commitLegacyMutex sync.RWMutex 31 commitLegacyArgsForCall []struct { 32 arg1 *ledger.BlockAndPvtData 33 arg2 *ledger.CommitOptions 34 } 35 commitLegacyReturns struct { 36 result1 error 37 } 38 commitLegacyReturnsOnCall map[int]struct { 39 result1 error 40 } 41 CommitNotificationsChannelStub func(<-chan struct{}) (<-chan *ledger.CommitNotification, error) 42 commitNotificationsChannelMutex sync.RWMutex 43 commitNotificationsChannelArgsForCall []struct { 44 arg1 <-chan struct{} 45 } 46 commitNotificationsChannelReturns struct { 47 result1 <-chan *ledger.CommitNotification 48 result2 error 49 } 50 commitNotificationsChannelReturnsOnCall map[int]struct { 51 result1 <-chan *ledger.CommitNotification 52 result2 error 53 } 54 CommitPvtDataOfOldBlocksStub func([]*ledger.ReconciledPvtdata, ledger.MissingPvtDataInfo) ([]*ledger.PvtdataHashMismatch, error) 55 commitPvtDataOfOldBlocksMutex sync.RWMutex 56 commitPvtDataOfOldBlocksArgsForCall []struct { 57 arg1 []*ledger.ReconciledPvtdata 58 arg2 ledger.MissingPvtDataInfo 59 } 60 commitPvtDataOfOldBlocksReturns struct { 61 result1 []*ledger.PvtdataHashMismatch 62 result2 error 63 } 64 commitPvtDataOfOldBlocksReturnsOnCall map[int]struct { 65 result1 []*ledger.PvtdataHashMismatch 66 result2 error 67 } 68 DoesPvtDataInfoExistStub func(uint64) (bool, error) 69 doesPvtDataInfoExistMutex sync.RWMutex 70 doesPvtDataInfoExistArgsForCall []struct { 71 arg1 uint64 72 } 73 doesPvtDataInfoExistReturns struct { 74 result1 bool 75 result2 error 76 } 77 doesPvtDataInfoExistReturnsOnCall map[int]struct { 78 result1 bool 79 result2 error 80 } 81 GetBlockByHashStub func([]byte) (*common.Block, error) 82 getBlockByHashMutex sync.RWMutex 83 getBlockByHashArgsForCall []struct { 84 arg1 []byte 85 } 86 getBlockByHashReturns struct { 87 result1 *common.Block 88 result2 error 89 } 90 getBlockByHashReturnsOnCall map[int]struct { 91 result1 *common.Block 92 result2 error 93 } 94 GetBlockByNumberStub func(uint64) (*common.Block, error) 95 getBlockByNumberMutex sync.RWMutex 96 getBlockByNumberArgsForCall []struct { 97 arg1 uint64 98 } 99 getBlockByNumberReturns struct { 100 result1 *common.Block 101 result2 error 102 } 103 getBlockByNumberReturnsOnCall map[int]struct { 104 result1 *common.Block 105 result2 error 106 } 107 GetBlockByTxIDStub func(string) (*common.Block, error) 108 getBlockByTxIDMutex sync.RWMutex 109 getBlockByTxIDArgsForCall []struct { 110 arg1 string 111 } 112 getBlockByTxIDReturns struct { 113 result1 *common.Block 114 result2 error 115 } 116 getBlockByTxIDReturnsOnCall map[int]struct { 117 result1 *common.Block 118 result2 error 119 } 120 GetBlockchainInfoStub func() (*common.BlockchainInfo, error) 121 getBlockchainInfoMutex sync.RWMutex 122 getBlockchainInfoArgsForCall []struct { 123 } 124 getBlockchainInfoReturns struct { 125 result1 *common.BlockchainInfo 126 result2 error 127 } 128 getBlockchainInfoReturnsOnCall map[int]struct { 129 result1 *common.BlockchainInfo 130 result2 error 131 } 132 GetBlocksIteratorStub func(uint64) (ledgera.ResultsIterator, error) 133 getBlocksIteratorMutex sync.RWMutex 134 getBlocksIteratorArgsForCall []struct { 135 arg1 uint64 136 } 137 getBlocksIteratorReturns struct { 138 result1 ledgera.ResultsIterator 139 result2 error 140 } 141 getBlocksIteratorReturnsOnCall map[int]struct { 142 result1 ledgera.ResultsIterator 143 result2 error 144 } 145 GetConfigHistoryRetrieverStub func() (ledger.ConfigHistoryRetriever, error) 146 getConfigHistoryRetrieverMutex sync.RWMutex 147 getConfigHistoryRetrieverArgsForCall []struct { 148 } 149 getConfigHistoryRetrieverReturns struct { 150 result1 ledger.ConfigHistoryRetriever 151 result2 error 152 } 153 getConfigHistoryRetrieverReturnsOnCall map[int]struct { 154 result1 ledger.ConfigHistoryRetriever 155 result2 error 156 } 157 GetMissingPvtDataTrackerStub func() (ledger.MissingPvtDataTracker, error) 158 getMissingPvtDataTrackerMutex sync.RWMutex 159 getMissingPvtDataTrackerArgsForCall []struct { 160 } 161 getMissingPvtDataTrackerReturns struct { 162 result1 ledger.MissingPvtDataTracker 163 result2 error 164 } 165 getMissingPvtDataTrackerReturnsOnCall map[int]struct { 166 result1 ledger.MissingPvtDataTracker 167 result2 error 168 } 169 GetPvtDataAndBlockByNumStub func(uint64, ledger.PvtNsCollFilter) (*ledger.BlockAndPvtData, error) 170 getPvtDataAndBlockByNumMutex sync.RWMutex 171 getPvtDataAndBlockByNumArgsForCall []struct { 172 arg1 uint64 173 arg2 ledger.PvtNsCollFilter 174 } 175 getPvtDataAndBlockByNumReturns struct { 176 result1 *ledger.BlockAndPvtData 177 result2 error 178 } 179 getPvtDataAndBlockByNumReturnsOnCall map[int]struct { 180 result1 *ledger.BlockAndPvtData 181 result2 error 182 } 183 GetPvtDataByNumStub func(uint64, ledger.PvtNsCollFilter) ([]*ledger.TxPvtData, error) 184 getPvtDataByNumMutex sync.RWMutex 185 getPvtDataByNumArgsForCall []struct { 186 arg1 uint64 187 arg2 ledger.PvtNsCollFilter 188 } 189 getPvtDataByNumReturns struct { 190 result1 []*ledger.TxPvtData 191 result2 error 192 } 193 getPvtDataByNumReturnsOnCall map[int]struct { 194 result1 []*ledger.TxPvtData 195 result2 error 196 } 197 GetTransactionByIDStub func(string) (*peera.ProcessedTransaction, error) 198 getTransactionByIDMutex sync.RWMutex 199 getTransactionByIDArgsForCall []struct { 200 arg1 string 201 } 202 getTransactionByIDReturns struct { 203 result1 *peera.ProcessedTransaction 204 result2 error 205 } 206 getTransactionByIDReturnsOnCall map[int]struct { 207 result1 *peera.ProcessedTransaction 208 result2 error 209 } 210 GetTxValidationCodeByTxIDStub func(string) (peera.TxValidationCode, uint64, error) 211 getTxValidationCodeByTxIDMutex sync.RWMutex 212 getTxValidationCodeByTxIDArgsForCall []struct { 213 arg1 string 214 } 215 getTxValidationCodeByTxIDReturns struct { 216 result1 peera.TxValidationCode 217 result2 uint64 218 result3 error 219 } 220 getTxValidationCodeByTxIDReturnsOnCall map[int]struct { 221 result1 peera.TxValidationCode 222 result2 uint64 223 result3 error 224 } 225 NewHistoryQueryExecutorStub func() (ledger.HistoryQueryExecutor, error) 226 newHistoryQueryExecutorMutex sync.RWMutex 227 newHistoryQueryExecutorArgsForCall []struct { 228 } 229 newHistoryQueryExecutorReturns struct { 230 result1 ledger.HistoryQueryExecutor 231 result2 error 232 } 233 newHistoryQueryExecutorReturnsOnCall map[int]struct { 234 result1 ledger.HistoryQueryExecutor 235 result2 error 236 } 237 NewQueryExecutorStub func() (ledger.QueryExecutor, error) 238 newQueryExecutorMutex sync.RWMutex 239 newQueryExecutorArgsForCall []struct { 240 } 241 newQueryExecutorReturns struct { 242 result1 ledger.QueryExecutor 243 result2 error 244 } 245 newQueryExecutorReturnsOnCall map[int]struct { 246 result1 ledger.QueryExecutor 247 result2 error 248 } 249 NewTxSimulatorStub func(string) (ledger.TxSimulator, error) 250 newTxSimulatorMutex sync.RWMutex 251 newTxSimulatorArgsForCall []struct { 252 arg1 string 253 } 254 newTxSimulatorReturns struct { 255 result1 ledger.TxSimulator 256 result2 error 257 } 258 newTxSimulatorReturnsOnCall map[int]struct { 259 result1 ledger.TxSimulator 260 result2 error 261 } 262 PendingSnapshotRequestsStub func() ([]uint64, error) 263 pendingSnapshotRequestsMutex sync.RWMutex 264 pendingSnapshotRequestsArgsForCall []struct { 265 } 266 pendingSnapshotRequestsReturns struct { 267 result1 []uint64 268 result2 error 269 } 270 pendingSnapshotRequestsReturnsOnCall map[int]struct { 271 result1 []uint64 272 result2 error 273 } 274 SubmitSnapshotRequestStub func(uint64) error 275 submitSnapshotRequestMutex sync.RWMutex 276 submitSnapshotRequestArgsForCall []struct { 277 arg1 uint64 278 } 279 submitSnapshotRequestReturns struct { 280 result1 error 281 } 282 submitSnapshotRequestReturnsOnCall map[int]struct { 283 result1 error 284 } 285 TxIDExistsStub func(string) (bool, error) 286 txIDExistsMutex sync.RWMutex 287 txIDExistsArgsForCall []struct { 288 arg1 string 289 } 290 txIDExistsReturns struct { 291 result1 bool 292 result2 error 293 } 294 txIDExistsReturnsOnCall map[int]struct { 295 result1 bool 296 result2 error 297 } 298 invocations map[string][][]interface{} 299 invocationsMutex sync.RWMutex 300 } 301 302 func (fake *PeerLedger) CancelSnapshotRequest(arg1 uint64) error { 303 fake.cancelSnapshotRequestMutex.Lock() 304 ret, specificReturn := fake.cancelSnapshotRequestReturnsOnCall[len(fake.cancelSnapshotRequestArgsForCall)] 305 fake.cancelSnapshotRequestArgsForCall = append(fake.cancelSnapshotRequestArgsForCall, struct { 306 arg1 uint64 307 }{arg1}) 308 fake.recordInvocation("CancelSnapshotRequest", []interface{}{arg1}) 309 fake.cancelSnapshotRequestMutex.Unlock() 310 if fake.CancelSnapshotRequestStub != nil { 311 return fake.CancelSnapshotRequestStub(arg1) 312 } 313 if specificReturn { 314 return ret.result1 315 } 316 fakeReturns := fake.cancelSnapshotRequestReturns 317 return fakeReturns.result1 318 } 319 320 func (fake *PeerLedger) CancelSnapshotRequestCallCount() int { 321 fake.cancelSnapshotRequestMutex.RLock() 322 defer fake.cancelSnapshotRequestMutex.RUnlock() 323 return len(fake.cancelSnapshotRequestArgsForCall) 324 } 325 326 func (fake *PeerLedger) CancelSnapshotRequestCalls(stub func(uint64) error) { 327 fake.cancelSnapshotRequestMutex.Lock() 328 defer fake.cancelSnapshotRequestMutex.Unlock() 329 fake.CancelSnapshotRequestStub = stub 330 } 331 332 func (fake *PeerLedger) CancelSnapshotRequestArgsForCall(i int) uint64 { 333 fake.cancelSnapshotRequestMutex.RLock() 334 defer fake.cancelSnapshotRequestMutex.RUnlock() 335 argsForCall := fake.cancelSnapshotRequestArgsForCall[i] 336 return argsForCall.arg1 337 } 338 339 func (fake *PeerLedger) CancelSnapshotRequestReturns(result1 error) { 340 fake.cancelSnapshotRequestMutex.Lock() 341 defer fake.cancelSnapshotRequestMutex.Unlock() 342 fake.CancelSnapshotRequestStub = nil 343 fake.cancelSnapshotRequestReturns = struct { 344 result1 error 345 }{result1} 346 } 347 348 func (fake *PeerLedger) CancelSnapshotRequestReturnsOnCall(i int, result1 error) { 349 fake.cancelSnapshotRequestMutex.Lock() 350 defer fake.cancelSnapshotRequestMutex.Unlock() 351 fake.CancelSnapshotRequestStub = nil 352 if fake.cancelSnapshotRequestReturnsOnCall == nil { 353 fake.cancelSnapshotRequestReturnsOnCall = make(map[int]struct { 354 result1 error 355 }) 356 } 357 fake.cancelSnapshotRequestReturnsOnCall[i] = struct { 358 result1 error 359 }{result1} 360 } 361 362 func (fake *PeerLedger) Close() { 363 fake.closeMutex.Lock() 364 fake.closeArgsForCall = append(fake.closeArgsForCall, struct { 365 }{}) 366 fake.recordInvocation("Close", []interface{}{}) 367 fake.closeMutex.Unlock() 368 if fake.CloseStub != nil { 369 fake.CloseStub() 370 } 371 } 372 373 func (fake *PeerLedger) CloseCallCount() int { 374 fake.closeMutex.RLock() 375 defer fake.closeMutex.RUnlock() 376 return len(fake.closeArgsForCall) 377 } 378 379 func (fake *PeerLedger) CloseCalls(stub func()) { 380 fake.closeMutex.Lock() 381 defer fake.closeMutex.Unlock() 382 fake.CloseStub = stub 383 } 384 385 func (fake *PeerLedger) CommitLegacy(arg1 *ledger.BlockAndPvtData, arg2 *ledger.CommitOptions) error { 386 fake.commitLegacyMutex.Lock() 387 ret, specificReturn := fake.commitLegacyReturnsOnCall[len(fake.commitLegacyArgsForCall)] 388 fake.commitLegacyArgsForCall = append(fake.commitLegacyArgsForCall, struct { 389 arg1 *ledger.BlockAndPvtData 390 arg2 *ledger.CommitOptions 391 }{arg1, arg2}) 392 fake.recordInvocation("CommitLegacy", []interface{}{arg1, arg2}) 393 fake.commitLegacyMutex.Unlock() 394 if fake.CommitLegacyStub != nil { 395 return fake.CommitLegacyStub(arg1, arg2) 396 } 397 if specificReturn { 398 return ret.result1 399 } 400 fakeReturns := fake.commitLegacyReturns 401 return fakeReturns.result1 402 } 403 404 func (fake *PeerLedger) CommitLegacyCallCount() int { 405 fake.commitLegacyMutex.RLock() 406 defer fake.commitLegacyMutex.RUnlock() 407 return len(fake.commitLegacyArgsForCall) 408 } 409 410 func (fake *PeerLedger) CommitLegacyCalls(stub func(*ledger.BlockAndPvtData, *ledger.CommitOptions) error) { 411 fake.commitLegacyMutex.Lock() 412 defer fake.commitLegacyMutex.Unlock() 413 fake.CommitLegacyStub = stub 414 } 415 416 func (fake *PeerLedger) CommitLegacyArgsForCall(i int) (*ledger.BlockAndPvtData, *ledger.CommitOptions) { 417 fake.commitLegacyMutex.RLock() 418 defer fake.commitLegacyMutex.RUnlock() 419 argsForCall := fake.commitLegacyArgsForCall[i] 420 return argsForCall.arg1, argsForCall.arg2 421 } 422 423 func (fake *PeerLedger) CommitLegacyReturns(result1 error) { 424 fake.commitLegacyMutex.Lock() 425 defer fake.commitLegacyMutex.Unlock() 426 fake.CommitLegacyStub = nil 427 fake.commitLegacyReturns = struct { 428 result1 error 429 }{result1} 430 } 431 432 func (fake *PeerLedger) CommitLegacyReturnsOnCall(i int, result1 error) { 433 fake.commitLegacyMutex.Lock() 434 defer fake.commitLegacyMutex.Unlock() 435 fake.CommitLegacyStub = nil 436 if fake.commitLegacyReturnsOnCall == nil { 437 fake.commitLegacyReturnsOnCall = make(map[int]struct { 438 result1 error 439 }) 440 } 441 fake.commitLegacyReturnsOnCall[i] = struct { 442 result1 error 443 }{result1} 444 } 445 446 func (fake *PeerLedger) CommitNotificationsChannel(arg1 <-chan struct{}) (<-chan *ledger.CommitNotification, error) { 447 fake.commitNotificationsChannelMutex.Lock() 448 ret, specificReturn := fake.commitNotificationsChannelReturnsOnCall[len(fake.commitNotificationsChannelArgsForCall)] 449 fake.commitNotificationsChannelArgsForCall = append(fake.commitNotificationsChannelArgsForCall, struct { 450 arg1 <-chan struct{} 451 }{arg1}) 452 fake.recordInvocation("CommitNotificationsChannel", []interface{}{arg1}) 453 fake.commitNotificationsChannelMutex.Unlock() 454 if fake.CommitNotificationsChannelStub != nil { 455 return fake.CommitNotificationsChannelStub(arg1) 456 } 457 if specificReturn { 458 return ret.result1, ret.result2 459 } 460 fakeReturns := fake.commitNotificationsChannelReturns 461 return fakeReturns.result1, fakeReturns.result2 462 } 463 464 func (fake *PeerLedger) CommitNotificationsChannelCallCount() int { 465 fake.commitNotificationsChannelMutex.RLock() 466 defer fake.commitNotificationsChannelMutex.RUnlock() 467 return len(fake.commitNotificationsChannelArgsForCall) 468 } 469 470 func (fake *PeerLedger) CommitNotificationsChannelCalls(stub func(<-chan struct{}) (<-chan *ledger.CommitNotification, error)) { 471 fake.commitNotificationsChannelMutex.Lock() 472 defer fake.commitNotificationsChannelMutex.Unlock() 473 fake.CommitNotificationsChannelStub = stub 474 } 475 476 func (fake *PeerLedger) CommitNotificationsChannelArgsForCall(i int) <-chan struct{} { 477 fake.commitNotificationsChannelMutex.RLock() 478 defer fake.commitNotificationsChannelMutex.RUnlock() 479 argsForCall := fake.commitNotificationsChannelArgsForCall[i] 480 return argsForCall.arg1 481 } 482 483 func (fake *PeerLedger) CommitNotificationsChannelReturns(result1 <-chan *ledger.CommitNotification, result2 error) { 484 fake.commitNotificationsChannelMutex.Lock() 485 defer fake.commitNotificationsChannelMutex.Unlock() 486 fake.CommitNotificationsChannelStub = nil 487 fake.commitNotificationsChannelReturns = struct { 488 result1 <-chan *ledger.CommitNotification 489 result2 error 490 }{result1, result2} 491 } 492 493 func (fake *PeerLedger) CommitNotificationsChannelReturnsOnCall(i int, result1 <-chan *ledger.CommitNotification, result2 error) { 494 fake.commitNotificationsChannelMutex.Lock() 495 defer fake.commitNotificationsChannelMutex.Unlock() 496 fake.CommitNotificationsChannelStub = nil 497 if fake.commitNotificationsChannelReturnsOnCall == nil { 498 fake.commitNotificationsChannelReturnsOnCall = make(map[int]struct { 499 result1 <-chan *ledger.CommitNotification 500 result2 error 501 }) 502 } 503 fake.commitNotificationsChannelReturnsOnCall[i] = struct { 504 result1 <-chan *ledger.CommitNotification 505 result2 error 506 }{result1, result2} 507 } 508 509 func (fake *PeerLedger) CommitPvtDataOfOldBlocks(arg1 []*ledger.ReconciledPvtdata, arg2 ledger.MissingPvtDataInfo) ([]*ledger.PvtdataHashMismatch, error) { 510 var arg1Copy []*ledger.ReconciledPvtdata 511 if arg1 != nil { 512 arg1Copy = make([]*ledger.ReconciledPvtdata, len(arg1)) 513 copy(arg1Copy, arg1) 514 } 515 fake.commitPvtDataOfOldBlocksMutex.Lock() 516 ret, specificReturn := fake.commitPvtDataOfOldBlocksReturnsOnCall[len(fake.commitPvtDataOfOldBlocksArgsForCall)] 517 fake.commitPvtDataOfOldBlocksArgsForCall = append(fake.commitPvtDataOfOldBlocksArgsForCall, struct { 518 arg1 []*ledger.ReconciledPvtdata 519 arg2 ledger.MissingPvtDataInfo 520 }{arg1Copy, arg2}) 521 fake.recordInvocation("CommitPvtDataOfOldBlocks", []interface{}{arg1Copy, arg2}) 522 fake.commitPvtDataOfOldBlocksMutex.Unlock() 523 if fake.CommitPvtDataOfOldBlocksStub != nil { 524 return fake.CommitPvtDataOfOldBlocksStub(arg1, arg2) 525 } 526 if specificReturn { 527 return ret.result1, ret.result2 528 } 529 fakeReturns := fake.commitPvtDataOfOldBlocksReturns 530 return fakeReturns.result1, fakeReturns.result2 531 } 532 533 func (fake *PeerLedger) CommitPvtDataOfOldBlocksCallCount() int { 534 fake.commitPvtDataOfOldBlocksMutex.RLock() 535 defer fake.commitPvtDataOfOldBlocksMutex.RUnlock() 536 return len(fake.commitPvtDataOfOldBlocksArgsForCall) 537 } 538 539 func (fake *PeerLedger) CommitPvtDataOfOldBlocksCalls(stub func([]*ledger.ReconciledPvtdata, ledger.MissingPvtDataInfo) ([]*ledger.PvtdataHashMismatch, error)) { 540 fake.commitPvtDataOfOldBlocksMutex.Lock() 541 defer fake.commitPvtDataOfOldBlocksMutex.Unlock() 542 fake.CommitPvtDataOfOldBlocksStub = stub 543 } 544 545 func (fake *PeerLedger) CommitPvtDataOfOldBlocksArgsForCall(i int) ([]*ledger.ReconciledPvtdata, ledger.MissingPvtDataInfo) { 546 fake.commitPvtDataOfOldBlocksMutex.RLock() 547 defer fake.commitPvtDataOfOldBlocksMutex.RUnlock() 548 argsForCall := fake.commitPvtDataOfOldBlocksArgsForCall[i] 549 return argsForCall.arg1, argsForCall.arg2 550 } 551 552 func (fake *PeerLedger) CommitPvtDataOfOldBlocksReturns(result1 []*ledger.PvtdataHashMismatch, result2 error) { 553 fake.commitPvtDataOfOldBlocksMutex.Lock() 554 defer fake.commitPvtDataOfOldBlocksMutex.Unlock() 555 fake.CommitPvtDataOfOldBlocksStub = nil 556 fake.commitPvtDataOfOldBlocksReturns = struct { 557 result1 []*ledger.PvtdataHashMismatch 558 result2 error 559 }{result1, result2} 560 } 561 562 func (fake *PeerLedger) CommitPvtDataOfOldBlocksReturnsOnCall(i int, result1 []*ledger.PvtdataHashMismatch, result2 error) { 563 fake.commitPvtDataOfOldBlocksMutex.Lock() 564 defer fake.commitPvtDataOfOldBlocksMutex.Unlock() 565 fake.CommitPvtDataOfOldBlocksStub = nil 566 if fake.commitPvtDataOfOldBlocksReturnsOnCall == nil { 567 fake.commitPvtDataOfOldBlocksReturnsOnCall = make(map[int]struct { 568 result1 []*ledger.PvtdataHashMismatch 569 result2 error 570 }) 571 } 572 fake.commitPvtDataOfOldBlocksReturnsOnCall[i] = struct { 573 result1 []*ledger.PvtdataHashMismatch 574 result2 error 575 }{result1, result2} 576 } 577 578 func (fake *PeerLedger) DoesPvtDataInfoExist(arg1 uint64) (bool, error) { 579 fake.doesPvtDataInfoExistMutex.Lock() 580 ret, specificReturn := fake.doesPvtDataInfoExistReturnsOnCall[len(fake.doesPvtDataInfoExistArgsForCall)] 581 fake.doesPvtDataInfoExistArgsForCall = append(fake.doesPvtDataInfoExistArgsForCall, struct { 582 arg1 uint64 583 }{arg1}) 584 fake.recordInvocation("DoesPvtDataInfoExist", []interface{}{arg1}) 585 fake.doesPvtDataInfoExistMutex.Unlock() 586 if fake.DoesPvtDataInfoExistStub != nil { 587 return fake.DoesPvtDataInfoExistStub(arg1) 588 } 589 if specificReturn { 590 return ret.result1, ret.result2 591 } 592 fakeReturns := fake.doesPvtDataInfoExistReturns 593 return fakeReturns.result1, fakeReturns.result2 594 } 595 596 func (fake *PeerLedger) DoesPvtDataInfoExistCallCount() int { 597 fake.doesPvtDataInfoExistMutex.RLock() 598 defer fake.doesPvtDataInfoExistMutex.RUnlock() 599 return len(fake.doesPvtDataInfoExistArgsForCall) 600 } 601 602 func (fake *PeerLedger) DoesPvtDataInfoExistCalls(stub func(uint64) (bool, error)) { 603 fake.doesPvtDataInfoExistMutex.Lock() 604 defer fake.doesPvtDataInfoExistMutex.Unlock() 605 fake.DoesPvtDataInfoExistStub = stub 606 } 607 608 func (fake *PeerLedger) DoesPvtDataInfoExistArgsForCall(i int) uint64 { 609 fake.doesPvtDataInfoExistMutex.RLock() 610 defer fake.doesPvtDataInfoExistMutex.RUnlock() 611 argsForCall := fake.doesPvtDataInfoExistArgsForCall[i] 612 return argsForCall.arg1 613 } 614 615 func (fake *PeerLedger) DoesPvtDataInfoExistReturns(result1 bool, result2 error) { 616 fake.doesPvtDataInfoExistMutex.Lock() 617 defer fake.doesPvtDataInfoExistMutex.Unlock() 618 fake.DoesPvtDataInfoExistStub = nil 619 fake.doesPvtDataInfoExistReturns = struct { 620 result1 bool 621 result2 error 622 }{result1, result2} 623 } 624 625 func (fake *PeerLedger) DoesPvtDataInfoExistReturnsOnCall(i int, result1 bool, result2 error) { 626 fake.doesPvtDataInfoExistMutex.Lock() 627 defer fake.doesPvtDataInfoExistMutex.Unlock() 628 fake.DoesPvtDataInfoExistStub = nil 629 if fake.doesPvtDataInfoExistReturnsOnCall == nil { 630 fake.doesPvtDataInfoExistReturnsOnCall = make(map[int]struct { 631 result1 bool 632 result2 error 633 }) 634 } 635 fake.doesPvtDataInfoExistReturnsOnCall[i] = struct { 636 result1 bool 637 result2 error 638 }{result1, result2} 639 } 640 641 func (fake *PeerLedger) GetBlockByHash(arg1 []byte) (*common.Block, error) { 642 var arg1Copy []byte 643 if arg1 != nil { 644 arg1Copy = make([]byte, len(arg1)) 645 copy(arg1Copy, arg1) 646 } 647 fake.getBlockByHashMutex.Lock() 648 ret, specificReturn := fake.getBlockByHashReturnsOnCall[len(fake.getBlockByHashArgsForCall)] 649 fake.getBlockByHashArgsForCall = append(fake.getBlockByHashArgsForCall, struct { 650 arg1 []byte 651 }{arg1Copy}) 652 fake.recordInvocation("GetBlockByHash", []interface{}{arg1Copy}) 653 fake.getBlockByHashMutex.Unlock() 654 if fake.GetBlockByHashStub != nil { 655 return fake.GetBlockByHashStub(arg1) 656 } 657 if specificReturn { 658 return ret.result1, ret.result2 659 } 660 fakeReturns := fake.getBlockByHashReturns 661 return fakeReturns.result1, fakeReturns.result2 662 } 663 664 func (fake *PeerLedger) GetBlockByHashCallCount() int { 665 fake.getBlockByHashMutex.RLock() 666 defer fake.getBlockByHashMutex.RUnlock() 667 return len(fake.getBlockByHashArgsForCall) 668 } 669 670 func (fake *PeerLedger) GetBlockByHashCalls(stub func([]byte) (*common.Block, error)) { 671 fake.getBlockByHashMutex.Lock() 672 defer fake.getBlockByHashMutex.Unlock() 673 fake.GetBlockByHashStub = stub 674 } 675 676 func (fake *PeerLedger) GetBlockByHashArgsForCall(i int) []byte { 677 fake.getBlockByHashMutex.RLock() 678 defer fake.getBlockByHashMutex.RUnlock() 679 argsForCall := fake.getBlockByHashArgsForCall[i] 680 return argsForCall.arg1 681 } 682 683 func (fake *PeerLedger) GetBlockByHashReturns(result1 *common.Block, result2 error) { 684 fake.getBlockByHashMutex.Lock() 685 defer fake.getBlockByHashMutex.Unlock() 686 fake.GetBlockByHashStub = nil 687 fake.getBlockByHashReturns = struct { 688 result1 *common.Block 689 result2 error 690 }{result1, result2} 691 } 692 693 func (fake *PeerLedger) GetBlockByHashReturnsOnCall(i int, result1 *common.Block, result2 error) { 694 fake.getBlockByHashMutex.Lock() 695 defer fake.getBlockByHashMutex.Unlock() 696 fake.GetBlockByHashStub = nil 697 if fake.getBlockByHashReturnsOnCall == nil { 698 fake.getBlockByHashReturnsOnCall = make(map[int]struct { 699 result1 *common.Block 700 result2 error 701 }) 702 } 703 fake.getBlockByHashReturnsOnCall[i] = struct { 704 result1 *common.Block 705 result2 error 706 }{result1, result2} 707 } 708 709 func (fake *PeerLedger) GetBlockByNumber(arg1 uint64) (*common.Block, error) { 710 fake.getBlockByNumberMutex.Lock() 711 ret, specificReturn := fake.getBlockByNumberReturnsOnCall[len(fake.getBlockByNumberArgsForCall)] 712 fake.getBlockByNumberArgsForCall = append(fake.getBlockByNumberArgsForCall, struct { 713 arg1 uint64 714 }{arg1}) 715 fake.recordInvocation("GetBlockByNumber", []interface{}{arg1}) 716 fake.getBlockByNumberMutex.Unlock() 717 if fake.GetBlockByNumberStub != nil { 718 return fake.GetBlockByNumberStub(arg1) 719 } 720 if specificReturn { 721 return ret.result1, ret.result2 722 } 723 fakeReturns := fake.getBlockByNumberReturns 724 return fakeReturns.result1, fakeReturns.result2 725 } 726 727 func (fake *PeerLedger) GetBlockByNumberCallCount() int { 728 fake.getBlockByNumberMutex.RLock() 729 defer fake.getBlockByNumberMutex.RUnlock() 730 return len(fake.getBlockByNumberArgsForCall) 731 } 732 733 func (fake *PeerLedger) GetBlockByNumberCalls(stub func(uint64) (*common.Block, error)) { 734 fake.getBlockByNumberMutex.Lock() 735 defer fake.getBlockByNumberMutex.Unlock() 736 fake.GetBlockByNumberStub = stub 737 } 738 739 func (fake *PeerLedger) GetBlockByNumberArgsForCall(i int) uint64 { 740 fake.getBlockByNumberMutex.RLock() 741 defer fake.getBlockByNumberMutex.RUnlock() 742 argsForCall := fake.getBlockByNumberArgsForCall[i] 743 return argsForCall.arg1 744 } 745 746 func (fake *PeerLedger) GetBlockByNumberReturns(result1 *common.Block, result2 error) { 747 fake.getBlockByNumberMutex.Lock() 748 defer fake.getBlockByNumberMutex.Unlock() 749 fake.GetBlockByNumberStub = nil 750 fake.getBlockByNumberReturns = struct { 751 result1 *common.Block 752 result2 error 753 }{result1, result2} 754 } 755 756 func (fake *PeerLedger) GetBlockByNumberReturnsOnCall(i int, result1 *common.Block, result2 error) { 757 fake.getBlockByNumberMutex.Lock() 758 defer fake.getBlockByNumberMutex.Unlock() 759 fake.GetBlockByNumberStub = nil 760 if fake.getBlockByNumberReturnsOnCall == nil { 761 fake.getBlockByNumberReturnsOnCall = make(map[int]struct { 762 result1 *common.Block 763 result2 error 764 }) 765 } 766 fake.getBlockByNumberReturnsOnCall[i] = struct { 767 result1 *common.Block 768 result2 error 769 }{result1, result2} 770 } 771 772 func (fake *PeerLedger) GetBlockByTxID(arg1 string) (*common.Block, error) { 773 fake.getBlockByTxIDMutex.Lock() 774 ret, specificReturn := fake.getBlockByTxIDReturnsOnCall[len(fake.getBlockByTxIDArgsForCall)] 775 fake.getBlockByTxIDArgsForCall = append(fake.getBlockByTxIDArgsForCall, struct { 776 arg1 string 777 }{arg1}) 778 fake.recordInvocation("GetBlockByTxID", []interface{}{arg1}) 779 fake.getBlockByTxIDMutex.Unlock() 780 if fake.GetBlockByTxIDStub != nil { 781 return fake.GetBlockByTxIDStub(arg1) 782 } 783 if specificReturn { 784 return ret.result1, ret.result2 785 } 786 fakeReturns := fake.getBlockByTxIDReturns 787 return fakeReturns.result1, fakeReturns.result2 788 } 789 790 func (fake *PeerLedger) GetBlockByTxIDCallCount() int { 791 fake.getBlockByTxIDMutex.RLock() 792 defer fake.getBlockByTxIDMutex.RUnlock() 793 return len(fake.getBlockByTxIDArgsForCall) 794 } 795 796 func (fake *PeerLedger) GetBlockByTxIDCalls(stub func(string) (*common.Block, error)) { 797 fake.getBlockByTxIDMutex.Lock() 798 defer fake.getBlockByTxIDMutex.Unlock() 799 fake.GetBlockByTxIDStub = stub 800 } 801 802 func (fake *PeerLedger) GetBlockByTxIDArgsForCall(i int) string { 803 fake.getBlockByTxIDMutex.RLock() 804 defer fake.getBlockByTxIDMutex.RUnlock() 805 argsForCall := fake.getBlockByTxIDArgsForCall[i] 806 return argsForCall.arg1 807 } 808 809 func (fake *PeerLedger) GetBlockByTxIDReturns(result1 *common.Block, result2 error) { 810 fake.getBlockByTxIDMutex.Lock() 811 defer fake.getBlockByTxIDMutex.Unlock() 812 fake.GetBlockByTxIDStub = nil 813 fake.getBlockByTxIDReturns = struct { 814 result1 *common.Block 815 result2 error 816 }{result1, result2} 817 } 818 819 func (fake *PeerLedger) GetBlockByTxIDReturnsOnCall(i int, result1 *common.Block, result2 error) { 820 fake.getBlockByTxIDMutex.Lock() 821 defer fake.getBlockByTxIDMutex.Unlock() 822 fake.GetBlockByTxIDStub = nil 823 if fake.getBlockByTxIDReturnsOnCall == nil { 824 fake.getBlockByTxIDReturnsOnCall = make(map[int]struct { 825 result1 *common.Block 826 result2 error 827 }) 828 } 829 fake.getBlockByTxIDReturnsOnCall[i] = struct { 830 result1 *common.Block 831 result2 error 832 }{result1, result2} 833 } 834 835 func (fake *PeerLedger) GetBlockchainInfo() (*common.BlockchainInfo, error) { 836 fake.getBlockchainInfoMutex.Lock() 837 ret, specificReturn := fake.getBlockchainInfoReturnsOnCall[len(fake.getBlockchainInfoArgsForCall)] 838 fake.getBlockchainInfoArgsForCall = append(fake.getBlockchainInfoArgsForCall, struct { 839 }{}) 840 fake.recordInvocation("GetBlockchainInfo", []interface{}{}) 841 fake.getBlockchainInfoMutex.Unlock() 842 if fake.GetBlockchainInfoStub != nil { 843 return fake.GetBlockchainInfoStub() 844 } 845 if specificReturn { 846 return ret.result1, ret.result2 847 } 848 fakeReturns := fake.getBlockchainInfoReturns 849 return fakeReturns.result1, fakeReturns.result2 850 } 851 852 func (fake *PeerLedger) GetBlockchainInfoCallCount() int { 853 fake.getBlockchainInfoMutex.RLock() 854 defer fake.getBlockchainInfoMutex.RUnlock() 855 return len(fake.getBlockchainInfoArgsForCall) 856 } 857 858 func (fake *PeerLedger) GetBlockchainInfoCalls(stub func() (*common.BlockchainInfo, error)) { 859 fake.getBlockchainInfoMutex.Lock() 860 defer fake.getBlockchainInfoMutex.Unlock() 861 fake.GetBlockchainInfoStub = stub 862 } 863 864 func (fake *PeerLedger) GetBlockchainInfoReturns(result1 *common.BlockchainInfo, result2 error) { 865 fake.getBlockchainInfoMutex.Lock() 866 defer fake.getBlockchainInfoMutex.Unlock() 867 fake.GetBlockchainInfoStub = nil 868 fake.getBlockchainInfoReturns = struct { 869 result1 *common.BlockchainInfo 870 result2 error 871 }{result1, result2} 872 } 873 874 func (fake *PeerLedger) GetBlockchainInfoReturnsOnCall(i int, result1 *common.BlockchainInfo, result2 error) { 875 fake.getBlockchainInfoMutex.Lock() 876 defer fake.getBlockchainInfoMutex.Unlock() 877 fake.GetBlockchainInfoStub = nil 878 if fake.getBlockchainInfoReturnsOnCall == nil { 879 fake.getBlockchainInfoReturnsOnCall = make(map[int]struct { 880 result1 *common.BlockchainInfo 881 result2 error 882 }) 883 } 884 fake.getBlockchainInfoReturnsOnCall[i] = struct { 885 result1 *common.BlockchainInfo 886 result2 error 887 }{result1, result2} 888 } 889 890 func (fake *PeerLedger) GetBlocksIterator(arg1 uint64) (ledgera.ResultsIterator, error) { 891 fake.getBlocksIteratorMutex.Lock() 892 ret, specificReturn := fake.getBlocksIteratorReturnsOnCall[len(fake.getBlocksIteratorArgsForCall)] 893 fake.getBlocksIteratorArgsForCall = append(fake.getBlocksIteratorArgsForCall, struct { 894 arg1 uint64 895 }{arg1}) 896 fake.recordInvocation("GetBlocksIterator", []interface{}{arg1}) 897 fake.getBlocksIteratorMutex.Unlock() 898 if fake.GetBlocksIteratorStub != nil { 899 return fake.GetBlocksIteratorStub(arg1) 900 } 901 if specificReturn { 902 return ret.result1, ret.result2 903 } 904 fakeReturns := fake.getBlocksIteratorReturns 905 return fakeReturns.result1, fakeReturns.result2 906 } 907 908 func (fake *PeerLedger) GetBlocksIteratorCallCount() int { 909 fake.getBlocksIteratorMutex.RLock() 910 defer fake.getBlocksIteratorMutex.RUnlock() 911 return len(fake.getBlocksIteratorArgsForCall) 912 } 913 914 func (fake *PeerLedger) GetBlocksIteratorCalls(stub func(uint64) (ledgera.ResultsIterator, error)) { 915 fake.getBlocksIteratorMutex.Lock() 916 defer fake.getBlocksIteratorMutex.Unlock() 917 fake.GetBlocksIteratorStub = stub 918 } 919 920 func (fake *PeerLedger) GetBlocksIteratorArgsForCall(i int) uint64 { 921 fake.getBlocksIteratorMutex.RLock() 922 defer fake.getBlocksIteratorMutex.RUnlock() 923 argsForCall := fake.getBlocksIteratorArgsForCall[i] 924 return argsForCall.arg1 925 } 926 927 func (fake *PeerLedger) GetBlocksIteratorReturns(result1 ledgera.ResultsIterator, result2 error) { 928 fake.getBlocksIteratorMutex.Lock() 929 defer fake.getBlocksIteratorMutex.Unlock() 930 fake.GetBlocksIteratorStub = nil 931 fake.getBlocksIteratorReturns = struct { 932 result1 ledgera.ResultsIterator 933 result2 error 934 }{result1, result2} 935 } 936 937 func (fake *PeerLedger) GetBlocksIteratorReturnsOnCall(i int, result1 ledgera.ResultsIterator, result2 error) { 938 fake.getBlocksIteratorMutex.Lock() 939 defer fake.getBlocksIteratorMutex.Unlock() 940 fake.GetBlocksIteratorStub = nil 941 if fake.getBlocksIteratorReturnsOnCall == nil { 942 fake.getBlocksIteratorReturnsOnCall = make(map[int]struct { 943 result1 ledgera.ResultsIterator 944 result2 error 945 }) 946 } 947 fake.getBlocksIteratorReturnsOnCall[i] = struct { 948 result1 ledgera.ResultsIterator 949 result2 error 950 }{result1, result2} 951 } 952 953 func (fake *PeerLedger) GetConfigHistoryRetriever() (ledger.ConfigHistoryRetriever, error) { 954 fake.getConfigHistoryRetrieverMutex.Lock() 955 ret, specificReturn := fake.getConfigHistoryRetrieverReturnsOnCall[len(fake.getConfigHistoryRetrieverArgsForCall)] 956 fake.getConfigHistoryRetrieverArgsForCall = append(fake.getConfigHistoryRetrieverArgsForCall, struct { 957 }{}) 958 fake.recordInvocation("GetConfigHistoryRetriever", []interface{}{}) 959 fake.getConfigHistoryRetrieverMutex.Unlock() 960 if fake.GetConfigHistoryRetrieverStub != nil { 961 return fake.GetConfigHistoryRetrieverStub() 962 } 963 if specificReturn { 964 return ret.result1, ret.result2 965 } 966 fakeReturns := fake.getConfigHistoryRetrieverReturns 967 return fakeReturns.result1, fakeReturns.result2 968 } 969 970 func (fake *PeerLedger) GetConfigHistoryRetrieverCallCount() int { 971 fake.getConfigHistoryRetrieverMutex.RLock() 972 defer fake.getConfigHistoryRetrieverMutex.RUnlock() 973 return len(fake.getConfigHistoryRetrieverArgsForCall) 974 } 975 976 func (fake *PeerLedger) GetConfigHistoryRetrieverCalls(stub func() (ledger.ConfigHistoryRetriever, error)) { 977 fake.getConfigHistoryRetrieverMutex.Lock() 978 defer fake.getConfigHistoryRetrieverMutex.Unlock() 979 fake.GetConfigHistoryRetrieverStub = stub 980 } 981 982 func (fake *PeerLedger) GetConfigHistoryRetrieverReturns(result1 ledger.ConfigHistoryRetriever, result2 error) { 983 fake.getConfigHistoryRetrieverMutex.Lock() 984 defer fake.getConfigHistoryRetrieverMutex.Unlock() 985 fake.GetConfigHistoryRetrieverStub = nil 986 fake.getConfigHistoryRetrieverReturns = struct { 987 result1 ledger.ConfigHistoryRetriever 988 result2 error 989 }{result1, result2} 990 } 991 992 func (fake *PeerLedger) GetConfigHistoryRetrieverReturnsOnCall(i int, result1 ledger.ConfigHistoryRetriever, result2 error) { 993 fake.getConfigHistoryRetrieverMutex.Lock() 994 defer fake.getConfigHistoryRetrieverMutex.Unlock() 995 fake.GetConfigHistoryRetrieverStub = nil 996 if fake.getConfigHistoryRetrieverReturnsOnCall == nil { 997 fake.getConfigHistoryRetrieverReturnsOnCall = make(map[int]struct { 998 result1 ledger.ConfigHistoryRetriever 999 result2 error 1000 }) 1001 } 1002 fake.getConfigHistoryRetrieverReturnsOnCall[i] = struct { 1003 result1 ledger.ConfigHistoryRetriever 1004 result2 error 1005 }{result1, result2} 1006 } 1007 1008 func (fake *PeerLedger) GetMissingPvtDataTracker() (ledger.MissingPvtDataTracker, error) { 1009 fake.getMissingPvtDataTrackerMutex.Lock() 1010 ret, specificReturn := fake.getMissingPvtDataTrackerReturnsOnCall[len(fake.getMissingPvtDataTrackerArgsForCall)] 1011 fake.getMissingPvtDataTrackerArgsForCall = append(fake.getMissingPvtDataTrackerArgsForCall, struct { 1012 }{}) 1013 fake.recordInvocation("GetMissingPvtDataTracker", []interface{}{}) 1014 fake.getMissingPvtDataTrackerMutex.Unlock() 1015 if fake.GetMissingPvtDataTrackerStub != nil { 1016 return fake.GetMissingPvtDataTrackerStub() 1017 } 1018 if specificReturn { 1019 return ret.result1, ret.result2 1020 } 1021 fakeReturns := fake.getMissingPvtDataTrackerReturns 1022 return fakeReturns.result1, fakeReturns.result2 1023 } 1024 1025 func (fake *PeerLedger) GetMissingPvtDataTrackerCallCount() int { 1026 fake.getMissingPvtDataTrackerMutex.RLock() 1027 defer fake.getMissingPvtDataTrackerMutex.RUnlock() 1028 return len(fake.getMissingPvtDataTrackerArgsForCall) 1029 } 1030 1031 func (fake *PeerLedger) GetMissingPvtDataTrackerCalls(stub func() (ledger.MissingPvtDataTracker, error)) { 1032 fake.getMissingPvtDataTrackerMutex.Lock() 1033 defer fake.getMissingPvtDataTrackerMutex.Unlock() 1034 fake.GetMissingPvtDataTrackerStub = stub 1035 } 1036 1037 func (fake *PeerLedger) GetMissingPvtDataTrackerReturns(result1 ledger.MissingPvtDataTracker, result2 error) { 1038 fake.getMissingPvtDataTrackerMutex.Lock() 1039 defer fake.getMissingPvtDataTrackerMutex.Unlock() 1040 fake.GetMissingPvtDataTrackerStub = nil 1041 fake.getMissingPvtDataTrackerReturns = struct { 1042 result1 ledger.MissingPvtDataTracker 1043 result2 error 1044 }{result1, result2} 1045 } 1046 1047 func (fake *PeerLedger) GetMissingPvtDataTrackerReturnsOnCall(i int, result1 ledger.MissingPvtDataTracker, result2 error) { 1048 fake.getMissingPvtDataTrackerMutex.Lock() 1049 defer fake.getMissingPvtDataTrackerMutex.Unlock() 1050 fake.GetMissingPvtDataTrackerStub = nil 1051 if fake.getMissingPvtDataTrackerReturnsOnCall == nil { 1052 fake.getMissingPvtDataTrackerReturnsOnCall = make(map[int]struct { 1053 result1 ledger.MissingPvtDataTracker 1054 result2 error 1055 }) 1056 } 1057 fake.getMissingPvtDataTrackerReturnsOnCall[i] = struct { 1058 result1 ledger.MissingPvtDataTracker 1059 result2 error 1060 }{result1, result2} 1061 } 1062 1063 func (fake *PeerLedger) GetPvtDataAndBlockByNum(arg1 uint64, arg2 ledger.PvtNsCollFilter) (*ledger.BlockAndPvtData, error) { 1064 fake.getPvtDataAndBlockByNumMutex.Lock() 1065 ret, specificReturn := fake.getPvtDataAndBlockByNumReturnsOnCall[len(fake.getPvtDataAndBlockByNumArgsForCall)] 1066 fake.getPvtDataAndBlockByNumArgsForCall = append(fake.getPvtDataAndBlockByNumArgsForCall, struct { 1067 arg1 uint64 1068 arg2 ledger.PvtNsCollFilter 1069 }{arg1, arg2}) 1070 fake.recordInvocation("GetPvtDataAndBlockByNum", []interface{}{arg1, arg2}) 1071 fake.getPvtDataAndBlockByNumMutex.Unlock() 1072 if fake.GetPvtDataAndBlockByNumStub != nil { 1073 return fake.GetPvtDataAndBlockByNumStub(arg1, arg2) 1074 } 1075 if specificReturn { 1076 return ret.result1, ret.result2 1077 } 1078 fakeReturns := fake.getPvtDataAndBlockByNumReturns 1079 return fakeReturns.result1, fakeReturns.result2 1080 } 1081 1082 func (fake *PeerLedger) GetPvtDataAndBlockByNumCallCount() int { 1083 fake.getPvtDataAndBlockByNumMutex.RLock() 1084 defer fake.getPvtDataAndBlockByNumMutex.RUnlock() 1085 return len(fake.getPvtDataAndBlockByNumArgsForCall) 1086 } 1087 1088 func (fake *PeerLedger) GetPvtDataAndBlockByNumCalls(stub func(uint64, ledger.PvtNsCollFilter) (*ledger.BlockAndPvtData, error)) { 1089 fake.getPvtDataAndBlockByNumMutex.Lock() 1090 defer fake.getPvtDataAndBlockByNumMutex.Unlock() 1091 fake.GetPvtDataAndBlockByNumStub = stub 1092 } 1093 1094 func (fake *PeerLedger) GetPvtDataAndBlockByNumArgsForCall(i int) (uint64, ledger.PvtNsCollFilter) { 1095 fake.getPvtDataAndBlockByNumMutex.RLock() 1096 defer fake.getPvtDataAndBlockByNumMutex.RUnlock() 1097 argsForCall := fake.getPvtDataAndBlockByNumArgsForCall[i] 1098 return argsForCall.arg1, argsForCall.arg2 1099 } 1100 1101 func (fake *PeerLedger) GetPvtDataAndBlockByNumReturns(result1 *ledger.BlockAndPvtData, result2 error) { 1102 fake.getPvtDataAndBlockByNumMutex.Lock() 1103 defer fake.getPvtDataAndBlockByNumMutex.Unlock() 1104 fake.GetPvtDataAndBlockByNumStub = nil 1105 fake.getPvtDataAndBlockByNumReturns = struct { 1106 result1 *ledger.BlockAndPvtData 1107 result2 error 1108 }{result1, result2} 1109 } 1110 1111 func (fake *PeerLedger) GetPvtDataAndBlockByNumReturnsOnCall(i int, result1 *ledger.BlockAndPvtData, result2 error) { 1112 fake.getPvtDataAndBlockByNumMutex.Lock() 1113 defer fake.getPvtDataAndBlockByNumMutex.Unlock() 1114 fake.GetPvtDataAndBlockByNumStub = nil 1115 if fake.getPvtDataAndBlockByNumReturnsOnCall == nil { 1116 fake.getPvtDataAndBlockByNumReturnsOnCall = make(map[int]struct { 1117 result1 *ledger.BlockAndPvtData 1118 result2 error 1119 }) 1120 } 1121 fake.getPvtDataAndBlockByNumReturnsOnCall[i] = struct { 1122 result1 *ledger.BlockAndPvtData 1123 result2 error 1124 }{result1, result2} 1125 } 1126 1127 func (fake *PeerLedger) GetPvtDataByNum(arg1 uint64, arg2 ledger.PvtNsCollFilter) ([]*ledger.TxPvtData, error) { 1128 fake.getPvtDataByNumMutex.Lock() 1129 ret, specificReturn := fake.getPvtDataByNumReturnsOnCall[len(fake.getPvtDataByNumArgsForCall)] 1130 fake.getPvtDataByNumArgsForCall = append(fake.getPvtDataByNumArgsForCall, struct { 1131 arg1 uint64 1132 arg2 ledger.PvtNsCollFilter 1133 }{arg1, arg2}) 1134 fake.recordInvocation("GetPvtDataByNum", []interface{}{arg1, arg2}) 1135 fake.getPvtDataByNumMutex.Unlock() 1136 if fake.GetPvtDataByNumStub != nil { 1137 return fake.GetPvtDataByNumStub(arg1, arg2) 1138 } 1139 if specificReturn { 1140 return ret.result1, ret.result2 1141 } 1142 fakeReturns := fake.getPvtDataByNumReturns 1143 return fakeReturns.result1, fakeReturns.result2 1144 } 1145 1146 func (fake *PeerLedger) GetPvtDataByNumCallCount() int { 1147 fake.getPvtDataByNumMutex.RLock() 1148 defer fake.getPvtDataByNumMutex.RUnlock() 1149 return len(fake.getPvtDataByNumArgsForCall) 1150 } 1151 1152 func (fake *PeerLedger) GetPvtDataByNumCalls(stub func(uint64, ledger.PvtNsCollFilter) ([]*ledger.TxPvtData, error)) { 1153 fake.getPvtDataByNumMutex.Lock() 1154 defer fake.getPvtDataByNumMutex.Unlock() 1155 fake.GetPvtDataByNumStub = stub 1156 } 1157 1158 func (fake *PeerLedger) GetPvtDataByNumArgsForCall(i int) (uint64, ledger.PvtNsCollFilter) { 1159 fake.getPvtDataByNumMutex.RLock() 1160 defer fake.getPvtDataByNumMutex.RUnlock() 1161 argsForCall := fake.getPvtDataByNumArgsForCall[i] 1162 return argsForCall.arg1, argsForCall.arg2 1163 } 1164 1165 func (fake *PeerLedger) GetPvtDataByNumReturns(result1 []*ledger.TxPvtData, result2 error) { 1166 fake.getPvtDataByNumMutex.Lock() 1167 defer fake.getPvtDataByNumMutex.Unlock() 1168 fake.GetPvtDataByNumStub = nil 1169 fake.getPvtDataByNumReturns = struct { 1170 result1 []*ledger.TxPvtData 1171 result2 error 1172 }{result1, result2} 1173 } 1174 1175 func (fake *PeerLedger) GetPvtDataByNumReturnsOnCall(i int, result1 []*ledger.TxPvtData, result2 error) { 1176 fake.getPvtDataByNumMutex.Lock() 1177 defer fake.getPvtDataByNumMutex.Unlock() 1178 fake.GetPvtDataByNumStub = nil 1179 if fake.getPvtDataByNumReturnsOnCall == nil { 1180 fake.getPvtDataByNumReturnsOnCall = make(map[int]struct { 1181 result1 []*ledger.TxPvtData 1182 result2 error 1183 }) 1184 } 1185 fake.getPvtDataByNumReturnsOnCall[i] = struct { 1186 result1 []*ledger.TxPvtData 1187 result2 error 1188 }{result1, result2} 1189 } 1190 1191 func (fake *PeerLedger) GetTransactionByID(arg1 string) (*peera.ProcessedTransaction, error) { 1192 fake.getTransactionByIDMutex.Lock() 1193 ret, specificReturn := fake.getTransactionByIDReturnsOnCall[len(fake.getTransactionByIDArgsForCall)] 1194 fake.getTransactionByIDArgsForCall = append(fake.getTransactionByIDArgsForCall, struct { 1195 arg1 string 1196 }{arg1}) 1197 fake.recordInvocation("GetTransactionByID", []interface{}{arg1}) 1198 fake.getTransactionByIDMutex.Unlock() 1199 if fake.GetTransactionByIDStub != nil { 1200 return fake.GetTransactionByIDStub(arg1) 1201 } 1202 if specificReturn { 1203 return ret.result1, ret.result2 1204 } 1205 fakeReturns := fake.getTransactionByIDReturns 1206 return fakeReturns.result1, fakeReturns.result2 1207 } 1208 1209 func (fake *PeerLedger) GetTransactionByIDCallCount() int { 1210 fake.getTransactionByIDMutex.RLock() 1211 defer fake.getTransactionByIDMutex.RUnlock() 1212 return len(fake.getTransactionByIDArgsForCall) 1213 } 1214 1215 func (fake *PeerLedger) GetTransactionByIDCalls(stub func(string) (*peera.ProcessedTransaction, error)) { 1216 fake.getTransactionByIDMutex.Lock() 1217 defer fake.getTransactionByIDMutex.Unlock() 1218 fake.GetTransactionByIDStub = stub 1219 } 1220 1221 func (fake *PeerLedger) GetTransactionByIDArgsForCall(i int) string { 1222 fake.getTransactionByIDMutex.RLock() 1223 defer fake.getTransactionByIDMutex.RUnlock() 1224 argsForCall := fake.getTransactionByIDArgsForCall[i] 1225 return argsForCall.arg1 1226 } 1227 1228 func (fake *PeerLedger) GetTransactionByIDReturns(result1 *peera.ProcessedTransaction, result2 error) { 1229 fake.getTransactionByIDMutex.Lock() 1230 defer fake.getTransactionByIDMutex.Unlock() 1231 fake.GetTransactionByIDStub = nil 1232 fake.getTransactionByIDReturns = struct { 1233 result1 *peera.ProcessedTransaction 1234 result2 error 1235 }{result1, result2} 1236 } 1237 1238 func (fake *PeerLedger) GetTransactionByIDReturnsOnCall(i int, result1 *peera.ProcessedTransaction, result2 error) { 1239 fake.getTransactionByIDMutex.Lock() 1240 defer fake.getTransactionByIDMutex.Unlock() 1241 fake.GetTransactionByIDStub = nil 1242 if fake.getTransactionByIDReturnsOnCall == nil { 1243 fake.getTransactionByIDReturnsOnCall = make(map[int]struct { 1244 result1 *peera.ProcessedTransaction 1245 result2 error 1246 }) 1247 } 1248 fake.getTransactionByIDReturnsOnCall[i] = struct { 1249 result1 *peera.ProcessedTransaction 1250 result2 error 1251 }{result1, result2} 1252 } 1253 1254 func (fake *PeerLedger) GetTxValidationCodeByTxID(arg1 string) (peera.TxValidationCode, uint64, error) { 1255 fake.getTxValidationCodeByTxIDMutex.Lock() 1256 ret, specificReturn := fake.getTxValidationCodeByTxIDReturnsOnCall[len(fake.getTxValidationCodeByTxIDArgsForCall)] 1257 fake.getTxValidationCodeByTxIDArgsForCall = append(fake.getTxValidationCodeByTxIDArgsForCall, struct { 1258 arg1 string 1259 }{arg1}) 1260 fake.recordInvocation("GetTxValidationCodeByTxID", []interface{}{arg1}) 1261 fake.getTxValidationCodeByTxIDMutex.Unlock() 1262 if fake.GetTxValidationCodeByTxIDStub != nil { 1263 return fake.GetTxValidationCodeByTxIDStub(arg1) 1264 } 1265 if specificReturn { 1266 return ret.result1, ret.result2, ret.result3 1267 } 1268 fakeReturns := fake.getTxValidationCodeByTxIDReturns 1269 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 1270 } 1271 1272 func (fake *PeerLedger) GetTxValidationCodeByTxIDCallCount() int { 1273 fake.getTxValidationCodeByTxIDMutex.RLock() 1274 defer fake.getTxValidationCodeByTxIDMutex.RUnlock() 1275 return len(fake.getTxValidationCodeByTxIDArgsForCall) 1276 } 1277 1278 func (fake *PeerLedger) GetTxValidationCodeByTxIDCalls(stub func(string) (peera.TxValidationCode, uint64, error)) { 1279 fake.getTxValidationCodeByTxIDMutex.Lock() 1280 defer fake.getTxValidationCodeByTxIDMutex.Unlock() 1281 fake.GetTxValidationCodeByTxIDStub = stub 1282 } 1283 1284 func (fake *PeerLedger) GetTxValidationCodeByTxIDArgsForCall(i int) string { 1285 fake.getTxValidationCodeByTxIDMutex.RLock() 1286 defer fake.getTxValidationCodeByTxIDMutex.RUnlock() 1287 argsForCall := fake.getTxValidationCodeByTxIDArgsForCall[i] 1288 return argsForCall.arg1 1289 } 1290 1291 func (fake *PeerLedger) GetTxValidationCodeByTxIDReturns(result1 peera.TxValidationCode, result2 uint64, result3 error) { 1292 fake.getTxValidationCodeByTxIDMutex.Lock() 1293 defer fake.getTxValidationCodeByTxIDMutex.Unlock() 1294 fake.GetTxValidationCodeByTxIDStub = nil 1295 fake.getTxValidationCodeByTxIDReturns = struct { 1296 result1 peera.TxValidationCode 1297 result2 uint64 1298 result3 error 1299 }{result1, result2, result3} 1300 } 1301 1302 func (fake *PeerLedger) GetTxValidationCodeByTxIDReturnsOnCall(i int, result1 peera.TxValidationCode, result2 uint64, result3 error) { 1303 fake.getTxValidationCodeByTxIDMutex.Lock() 1304 defer fake.getTxValidationCodeByTxIDMutex.Unlock() 1305 fake.GetTxValidationCodeByTxIDStub = nil 1306 if fake.getTxValidationCodeByTxIDReturnsOnCall == nil { 1307 fake.getTxValidationCodeByTxIDReturnsOnCall = make(map[int]struct { 1308 result1 peera.TxValidationCode 1309 result2 uint64 1310 result3 error 1311 }) 1312 } 1313 fake.getTxValidationCodeByTxIDReturnsOnCall[i] = struct { 1314 result1 peera.TxValidationCode 1315 result2 uint64 1316 result3 error 1317 }{result1, result2, result3} 1318 } 1319 1320 func (fake *PeerLedger) NewHistoryQueryExecutor() (ledger.HistoryQueryExecutor, error) { 1321 fake.newHistoryQueryExecutorMutex.Lock() 1322 ret, specificReturn := fake.newHistoryQueryExecutorReturnsOnCall[len(fake.newHistoryQueryExecutorArgsForCall)] 1323 fake.newHistoryQueryExecutorArgsForCall = append(fake.newHistoryQueryExecutorArgsForCall, struct { 1324 }{}) 1325 fake.recordInvocation("NewHistoryQueryExecutor", []interface{}{}) 1326 fake.newHistoryQueryExecutorMutex.Unlock() 1327 if fake.NewHistoryQueryExecutorStub != nil { 1328 return fake.NewHistoryQueryExecutorStub() 1329 } 1330 if specificReturn { 1331 return ret.result1, ret.result2 1332 } 1333 fakeReturns := fake.newHistoryQueryExecutorReturns 1334 return fakeReturns.result1, fakeReturns.result2 1335 } 1336 1337 func (fake *PeerLedger) NewHistoryQueryExecutorCallCount() int { 1338 fake.newHistoryQueryExecutorMutex.RLock() 1339 defer fake.newHistoryQueryExecutorMutex.RUnlock() 1340 return len(fake.newHistoryQueryExecutorArgsForCall) 1341 } 1342 1343 func (fake *PeerLedger) NewHistoryQueryExecutorCalls(stub func() (ledger.HistoryQueryExecutor, error)) { 1344 fake.newHistoryQueryExecutorMutex.Lock() 1345 defer fake.newHistoryQueryExecutorMutex.Unlock() 1346 fake.NewHistoryQueryExecutorStub = stub 1347 } 1348 1349 func (fake *PeerLedger) NewHistoryQueryExecutorReturns(result1 ledger.HistoryQueryExecutor, result2 error) { 1350 fake.newHistoryQueryExecutorMutex.Lock() 1351 defer fake.newHistoryQueryExecutorMutex.Unlock() 1352 fake.NewHistoryQueryExecutorStub = nil 1353 fake.newHistoryQueryExecutorReturns = struct { 1354 result1 ledger.HistoryQueryExecutor 1355 result2 error 1356 }{result1, result2} 1357 } 1358 1359 func (fake *PeerLedger) NewHistoryQueryExecutorReturnsOnCall(i int, result1 ledger.HistoryQueryExecutor, result2 error) { 1360 fake.newHistoryQueryExecutorMutex.Lock() 1361 defer fake.newHistoryQueryExecutorMutex.Unlock() 1362 fake.NewHistoryQueryExecutorStub = nil 1363 if fake.newHistoryQueryExecutorReturnsOnCall == nil { 1364 fake.newHistoryQueryExecutorReturnsOnCall = make(map[int]struct { 1365 result1 ledger.HistoryQueryExecutor 1366 result2 error 1367 }) 1368 } 1369 fake.newHistoryQueryExecutorReturnsOnCall[i] = struct { 1370 result1 ledger.HistoryQueryExecutor 1371 result2 error 1372 }{result1, result2} 1373 } 1374 1375 func (fake *PeerLedger) NewQueryExecutor() (ledger.QueryExecutor, error) { 1376 fake.newQueryExecutorMutex.Lock() 1377 ret, specificReturn := fake.newQueryExecutorReturnsOnCall[len(fake.newQueryExecutorArgsForCall)] 1378 fake.newQueryExecutorArgsForCall = append(fake.newQueryExecutorArgsForCall, struct { 1379 }{}) 1380 fake.recordInvocation("NewQueryExecutor", []interface{}{}) 1381 fake.newQueryExecutorMutex.Unlock() 1382 if fake.NewQueryExecutorStub != nil { 1383 return fake.NewQueryExecutorStub() 1384 } 1385 if specificReturn { 1386 return ret.result1, ret.result2 1387 } 1388 fakeReturns := fake.newQueryExecutorReturns 1389 return fakeReturns.result1, fakeReturns.result2 1390 } 1391 1392 func (fake *PeerLedger) NewQueryExecutorCallCount() int { 1393 fake.newQueryExecutorMutex.RLock() 1394 defer fake.newQueryExecutorMutex.RUnlock() 1395 return len(fake.newQueryExecutorArgsForCall) 1396 } 1397 1398 func (fake *PeerLedger) NewQueryExecutorCalls(stub func() (ledger.QueryExecutor, error)) { 1399 fake.newQueryExecutorMutex.Lock() 1400 defer fake.newQueryExecutorMutex.Unlock() 1401 fake.NewQueryExecutorStub = stub 1402 } 1403 1404 func (fake *PeerLedger) NewQueryExecutorReturns(result1 ledger.QueryExecutor, result2 error) { 1405 fake.newQueryExecutorMutex.Lock() 1406 defer fake.newQueryExecutorMutex.Unlock() 1407 fake.NewQueryExecutorStub = nil 1408 fake.newQueryExecutorReturns = struct { 1409 result1 ledger.QueryExecutor 1410 result2 error 1411 }{result1, result2} 1412 } 1413 1414 func (fake *PeerLedger) NewQueryExecutorReturnsOnCall(i int, result1 ledger.QueryExecutor, result2 error) { 1415 fake.newQueryExecutorMutex.Lock() 1416 defer fake.newQueryExecutorMutex.Unlock() 1417 fake.NewQueryExecutorStub = nil 1418 if fake.newQueryExecutorReturnsOnCall == nil { 1419 fake.newQueryExecutorReturnsOnCall = make(map[int]struct { 1420 result1 ledger.QueryExecutor 1421 result2 error 1422 }) 1423 } 1424 fake.newQueryExecutorReturnsOnCall[i] = struct { 1425 result1 ledger.QueryExecutor 1426 result2 error 1427 }{result1, result2} 1428 } 1429 1430 func (fake *PeerLedger) NewTxSimulator(arg1 string) (ledger.TxSimulator, error) { 1431 fake.newTxSimulatorMutex.Lock() 1432 ret, specificReturn := fake.newTxSimulatorReturnsOnCall[len(fake.newTxSimulatorArgsForCall)] 1433 fake.newTxSimulatorArgsForCall = append(fake.newTxSimulatorArgsForCall, struct { 1434 arg1 string 1435 }{arg1}) 1436 fake.recordInvocation("NewTxSimulator", []interface{}{arg1}) 1437 fake.newTxSimulatorMutex.Unlock() 1438 if fake.NewTxSimulatorStub != nil { 1439 return fake.NewTxSimulatorStub(arg1) 1440 } 1441 if specificReturn { 1442 return ret.result1, ret.result2 1443 } 1444 fakeReturns := fake.newTxSimulatorReturns 1445 return fakeReturns.result1, fakeReturns.result2 1446 } 1447 1448 func (fake *PeerLedger) NewTxSimulatorCallCount() int { 1449 fake.newTxSimulatorMutex.RLock() 1450 defer fake.newTxSimulatorMutex.RUnlock() 1451 return len(fake.newTxSimulatorArgsForCall) 1452 } 1453 1454 func (fake *PeerLedger) NewTxSimulatorCalls(stub func(string) (ledger.TxSimulator, error)) { 1455 fake.newTxSimulatorMutex.Lock() 1456 defer fake.newTxSimulatorMutex.Unlock() 1457 fake.NewTxSimulatorStub = stub 1458 } 1459 1460 func (fake *PeerLedger) NewTxSimulatorArgsForCall(i int) string { 1461 fake.newTxSimulatorMutex.RLock() 1462 defer fake.newTxSimulatorMutex.RUnlock() 1463 argsForCall := fake.newTxSimulatorArgsForCall[i] 1464 return argsForCall.arg1 1465 } 1466 1467 func (fake *PeerLedger) NewTxSimulatorReturns(result1 ledger.TxSimulator, result2 error) { 1468 fake.newTxSimulatorMutex.Lock() 1469 defer fake.newTxSimulatorMutex.Unlock() 1470 fake.NewTxSimulatorStub = nil 1471 fake.newTxSimulatorReturns = struct { 1472 result1 ledger.TxSimulator 1473 result2 error 1474 }{result1, result2} 1475 } 1476 1477 func (fake *PeerLedger) NewTxSimulatorReturnsOnCall(i int, result1 ledger.TxSimulator, result2 error) { 1478 fake.newTxSimulatorMutex.Lock() 1479 defer fake.newTxSimulatorMutex.Unlock() 1480 fake.NewTxSimulatorStub = nil 1481 if fake.newTxSimulatorReturnsOnCall == nil { 1482 fake.newTxSimulatorReturnsOnCall = make(map[int]struct { 1483 result1 ledger.TxSimulator 1484 result2 error 1485 }) 1486 } 1487 fake.newTxSimulatorReturnsOnCall[i] = struct { 1488 result1 ledger.TxSimulator 1489 result2 error 1490 }{result1, result2} 1491 } 1492 1493 func (fake *PeerLedger) PendingSnapshotRequests() ([]uint64, error) { 1494 fake.pendingSnapshotRequestsMutex.Lock() 1495 ret, specificReturn := fake.pendingSnapshotRequestsReturnsOnCall[len(fake.pendingSnapshotRequestsArgsForCall)] 1496 fake.pendingSnapshotRequestsArgsForCall = append(fake.pendingSnapshotRequestsArgsForCall, struct { 1497 }{}) 1498 fake.recordInvocation("PendingSnapshotRequests", []interface{}{}) 1499 fake.pendingSnapshotRequestsMutex.Unlock() 1500 if fake.PendingSnapshotRequestsStub != nil { 1501 return fake.PendingSnapshotRequestsStub() 1502 } 1503 if specificReturn { 1504 return ret.result1, ret.result2 1505 } 1506 fakeReturns := fake.pendingSnapshotRequestsReturns 1507 return fakeReturns.result1, fakeReturns.result2 1508 } 1509 1510 func (fake *PeerLedger) PendingSnapshotRequestsCallCount() int { 1511 fake.pendingSnapshotRequestsMutex.RLock() 1512 defer fake.pendingSnapshotRequestsMutex.RUnlock() 1513 return len(fake.pendingSnapshotRequestsArgsForCall) 1514 } 1515 1516 func (fake *PeerLedger) PendingSnapshotRequestsCalls(stub func() ([]uint64, error)) { 1517 fake.pendingSnapshotRequestsMutex.Lock() 1518 defer fake.pendingSnapshotRequestsMutex.Unlock() 1519 fake.PendingSnapshotRequestsStub = stub 1520 } 1521 1522 func (fake *PeerLedger) PendingSnapshotRequestsReturns(result1 []uint64, result2 error) { 1523 fake.pendingSnapshotRequestsMutex.Lock() 1524 defer fake.pendingSnapshotRequestsMutex.Unlock() 1525 fake.PendingSnapshotRequestsStub = nil 1526 fake.pendingSnapshotRequestsReturns = struct { 1527 result1 []uint64 1528 result2 error 1529 }{result1, result2} 1530 } 1531 1532 func (fake *PeerLedger) PendingSnapshotRequestsReturnsOnCall(i int, result1 []uint64, result2 error) { 1533 fake.pendingSnapshotRequestsMutex.Lock() 1534 defer fake.pendingSnapshotRequestsMutex.Unlock() 1535 fake.PendingSnapshotRequestsStub = nil 1536 if fake.pendingSnapshotRequestsReturnsOnCall == nil { 1537 fake.pendingSnapshotRequestsReturnsOnCall = make(map[int]struct { 1538 result1 []uint64 1539 result2 error 1540 }) 1541 } 1542 fake.pendingSnapshotRequestsReturnsOnCall[i] = struct { 1543 result1 []uint64 1544 result2 error 1545 }{result1, result2} 1546 } 1547 1548 func (fake *PeerLedger) SubmitSnapshotRequest(arg1 uint64) error { 1549 fake.submitSnapshotRequestMutex.Lock() 1550 ret, specificReturn := fake.submitSnapshotRequestReturnsOnCall[len(fake.submitSnapshotRequestArgsForCall)] 1551 fake.submitSnapshotRequestArgsForCall = append(fake.submitSnapshotRequestArgsForCall, struct { 1552 arg1 uint64 1553 }{arg1}) 1554 fake.recordInvocation("SubmitSnapshotRequest", []interface{}{arg1}) 1555 fake.submitSnapshotRequestMutex.Unlock() 1556 if fake.SubmitSnapshotRequestStub != nil { 1557 return fake.SubmitSnapshotRequestStub(arg1) 1558 } 1559 if specificReturn { 1560 return ret.result1 1561 } 1562 fakeReturns := fake.submitSnapshotRequestReturns 1563 return fakeReturns.result1 1564 } 1565 1566 func (fake *PeerLedger) SubmitSnapshotRequestCallCount() int { 1567 fake.submitSnapshotRequestMutex.RLock() 1568 defer fake.submitSnapshotRequestMutex.RUnlock() 1569 return len(fake.submitSnapshotRequestArgsForCall) 1570 } 1571 1572 func (fake *PeerLedger) SubmitSnapshotRequestCalls(stub func(uint64) error) { 1573 fake.submitSnapshotRequestMutex.Lock() 1574 defer fake.submitSnapshotRequestMutex.Unlock() 1575 fake.SubmitSnapshotRequestStub = stub 1576 } 1577 1578 func (fake *PeerLedger) SubmitSnapshotRequestArgsForCall(i int) uint64 { 1579 fake.submitSnapshotRequestMutex.RLock() 1580 defer fake.submitSnapshotRequestMutex.RUnlock() 1581 argsForCall := fake.submitSnapshotRequestArgsForCall[i] 1582 return argsForCall.arg1 1583 } 1584 1585 func (fake *PeerLedger) SubmitSnapshotRequestReturns(result1 error) { 1586 fake.submitSnapshotRequestMutex.Lock() 1587 defer fake.submitSnapshotRequestMutex.Unlock() 1588 fake.SubmitSnapshotRequestStub = nil 1589 fake.submitSnapshotRequestReturns = struct { 1590 result1 error 1591 }{result1} 1592 } 1593 1594 func (fake *PeerLedger) SubmitSnapshotRequestReturnsOnCall(i int, result1 error) { 1595 fake.submitSnapshotRequestMutex.Lock() 1596 defer fake.submitSnapshotRequestMutex.Unlock() 1597 fake.SubmitSnapshotRequestStub = nil 1598 if fake.submitSnapshotRequestReturnsOnCall == nil { 1599 fake.submitSnapshotRequestReturnsOnCall = make(map[int]struct { 1600 result1 error 1601 }) 1602 } 1603 fake.submitSnapshotRequestReturnsOnCall[i] = struct { 1604 result1 error 1605 }{result1} 1606 } 1607 1608 func (fake *PeerLedger) TxIDExists(arg1 string) (bool, error) { 1609 fake.txIDExistsMutex.Lock() 1610 ret, specificReturn := fake.txIDExistsReturnsOnCall[len(fake.txIDExistsArgsForCall)] 1611 fake.txIDExistsArgsForCall = append(fake.txIDExistsArgsForCall, struct { 1612 arg1 string 1613 }{arg1}) 1614 fake.recordInvocation("TxIDExists", []interface{}{arg1}) 1615 fake.txIDExistsMutex.Unlock() 1616 if fake.TxIDExistsStub != nil { 1617 return fake.TxIDExistsStub(arg1) 1618 } 1619 if specificReturn { 1620 return ret.result1, ret.result2 1621 } 1622 fakeReturns := fake.txIDExistsReturns 1623 return fakeReturns.result1, fakeReturns.result2 1624 } 1625 1626 func (fake *PeerLedger) TxIDExistsCallCount() int { 1627 fake.txIDExistsMutex.RLock() 1628 defer fake.txIDExistsMutex.RUnlock() 1629 return len(fake.txIDExistsArgsForCall) 1630 } 1631 1632 func (fake *PeerLedger) TxIDExistsCalls(stub func(string) (bool, error)) { 1633 fake.txIDExistsMutex.Lock() 1634 defer fake.txIDExistsMutex.Unlock() 1635 fake.TxIDExistsStub = stub 1636 } 1637 1638 func (fake *PeerLedger) TxIDExistsArgsForCall(i int) string { 1639 fake.txIDExistsMutex.RLock() 1640 defer fake.txIDExistsMutex.RUnlock() 1641 argsForCall := fake.txIDExistsArgsForCall[i] 1642 return argsForCall.arg1 1643 } 1644 1645 func (fake *PeerLedger) TxIDExistsReturns(result1 bool, result2 error) { 1646 fake.txIDExistsMutex.Lock() 1647 defer fake.txIDExistsMutex.Unlock() 1648 fake.TxIDExistsStub = nil 1649 fake.txIDExistsReturns = struct { 1650 result1 bool 1651 result2 error 1652 }{result1, result2} 1653 } 1654 1655 func (fake *PeerLedger) TxIDExistsReturnsOnCall(i int, result1 bool, result2 error) { 1656 fake.txIDExistsMutex.Lock() 1657 defer fake.txIDExistsMutex.Unlock() 1658 fake.TxIDExistsStub = nil 1659 if fake.txIDExistsReturnsOnCall == nil { 1660 fake.txIDExistsReturnsOnCall = make(map[int]struct { 1661 result1 bool 1662 result2 error 1663 }) 1664 } 1665 fake.txIDExistsReturnsOnCall[i] = struct { 1666 result1 bool 1667 result2 error 1668 }{result1, result2} 1669 } 1670 1671 func (fake *PeerLedger) Invocations() map[string][][]interface{} { 1672 fake.invocationsMutex.RLock() 1673 defer fake.invocationsMutex.RUnlock() 1674 fake.cancelSnapshotRequestMutex.RLock() 1675 defer fake.cancelSnapshotRequestMutex.RUnlock() 1676 fake.closeMutex.RLock() 1677 defer fake.closeMutex.RUnlock() 1678 fake.commitLegacyMutex.RLock() 1679 defer fake.commitLegacyMutex.RUnlock() 1680 fake.commitNotificationsChannelMutex.RLock() 1681 defer fake.commitNotificationsChannelMutex.RUnlock() 1682 fake.commitPvtDataOfOldBlocksMutex.RLock() 1683 defer fake.commitPvtDataOfOldBlocksMutex.RUnlock() 1684 fake.doesPvtDataInfoExistMutex.RLock() 1685 defer fake.doesPvtDataInfoExistMutex.RUnlock() 1686 fake.getBlockByHashMutex.RLock() 1687 defer fake.getBlockByHashMutex.RUnlock() 1688 fake.getBlockByNumberMutex.RLock() 1689 defer fake.getBlockByNumberMutex.RUnlock() 1690 fake.getBlockByTxIDMutex.RLock() 1691 defer fake.getBlockByTxIDMutex.RUnlock() 1692 fake.getBlockchainInfoMutex.RLock() 1693 defer fake.getBlockchainInfoMutex.RUnlock() 1694 fake.getBlocksIteratorMutex.RLock() 1695 defer fake.getBlocksIteratorMutex.RUnlock() 1696 fake.getConfigHistoryRetrieverMutex.RLock() 1697 defer fake.getConfigHistoryRetrieverMutex.RUnlock() 1698 fake.getMissingPvtDataTrackerMutex.RLock() 1699 defer fake.getMissingPvtDataTrackerMutex.RUnlock() 1700 fake.getPvtDataAndBlockByNumMutex.RLock() 1701 defer fake.getPvtDataAndBlockByNumMutex.RUnlock() 1702 fake.getPvtDataByNumMutex.RLock() 1703 defer fake.getPvtDataByNumMutex.RUnlock() 1704 fake.getTransactionByIDMutex.RLock() 1705 defer fake.getTransactionByIDMutex.RUnlock() 1706 fake.getTxValidationCodeByTxIDMutex.RLock() 1707 defer fake.getTxValidationCodeByTxIDMutex.RUnlock() 1708 fake.newHistoryQueryExecutorMutex.RLock() 1709 defer fake.newHistoryQueryExecutorMutex.RUnlock() 1710 fake.newQueryExecutorMutex.RLock() 1711 defer fake.newQueryExecutorMutex.RUnlock() 1712 fake.newTxSimulatorMutex.RLock() 1713 defer fake.newTxSimulatorMutex.RUnlock() 1714 fake.pendingSnapshotRequestsMutex.RLock() 1715 defer fake.pendingSnapshotRequestsMutex.RUnlock() 1716 fake.submitSnapshotRequestMutex.RLock() 1717 defer fake.submitSnapshotRequestMutex.RUnlock() 1718 fake.txIDExistsMutex.RLock() 1719 defer fake.txIDExistsMutex.RUnlock() 1720 copiedInvocations := map[string][][]interface{}{} 1721 for key, value := range fake.invocations { 1722 copiedInvocations[key] = value 1723 } 1724 return copiedInvocations 1725 } 1726 1727 func (fake *PeerLedger) recordInvocation(key string, args []interface{}) { 1728 fake.invocationsMutex.Lock() 1729 defer fake.invocationsMutex.Unlock() 1730 if fake.invocations == nil { 1731 fake.invocations = map[string][][]interface{}{} 1732 } 1733 if fake.invocations[key] == nil { 1734 fake.invocations[key] = [][]interface{}{} 1735 } 1736 fake.invocations[key] = append(fake.invocations[key], args) 1737 }